From 1ce0778af33c9aba077d3cf2c21868156bf01c1c Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Mon, 9 Feb 2015 22:36:34 +0100 Subject: feat: publish to maven --- aboutit/build.gradle | 69 +++++++++++++++++++++++++++++++++++++++++++--- aboutit/proguard-rules.pro | 1 + 2 files changed, 66 insertions(+), 4 deletions(-) (limited to 'aboutit') diff --git a/aboutit/build.gradle b/aboutit/build.gradle index db556e0..302bde7 100644 --- a/aboutit/build.gradle +++ b/aboutit/build.gradle @@ -1,4 +1,11 @@ apply plugin: 'com.android.library' +apply plugin: 'maven' +apply plugin: 'signing' +apply plugin: 'nexus-workflow' + +group = "com.snilius" +archivesBaseName = "aboutit" +version = "1.0.1" android { compileSdkVersion 21 @@ -7,18 +14,72 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 21 - versionCode 1 - versionName "1.0" + versionCode 2 + versionName version } buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.3' } + +configurations { + archives { + extendsFrom configurations.default + } +} + +signing { + sign configurations.archives +} + +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + pom.project { + name 'AboutIt' + packaging 'jar' + // optionally artifactId can be defined here + description 'A About-page creator' + url 'https://github.com/victorhaggqvist/AboutIt' + + scm { + connection 'scm:git:https://github.com/victorhaggqvist/AboutIt.git' + developerConnection 'scm:git:https://github.com/victorhaggqvist/AboutIt.git' + url 'https://github.com/victorhaggqvist/AboutIt' + } + + licenses { + license { + name 'The Apache License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + + developers { + developer { + id 'atriix' + name 'Victor Häggqvist' + email 'victor@snilius.com' + } + } + } + } + } +} \ No newline at end of file diff --git a/aboutit/proguard-rules.pro b/aboutit/proguard-rules.pro index 7873ee5..ec2de89 100644 --- a/aboutit/proguard-rules.pro +++ b/aboutit/proguard-rules.pro @@ -15,3 +15,4 @@ #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} +-dontshrink \ No newline at end of file -- cgit v1.2.3