summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2015-02-09 22:36:34 +0100
committerVictor Häggqvist <[email protected]>2015-02-09 22:36:34 +0100
commit1ce0778af33c9aba077d3cf2c21868156bf01c1c (patch)
treedf30a0525a97f9dfe5091d53c3f1e48f723d207a
parentb07898fdd0d63d1349022e0167efaadc7f867305 (diff)
feat: publish to maven
-rw-r--r--aboutit/build.gradle69
-rw-r--r--aboutit/proguard-rules.pro1
-rw-r--r--build.gradle1
3 files changed, 67 insertions, 4 deletions
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'
+ }
+ }
+ }
+ }
+ }
+} \ 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
diff --git a/build.gradle b/build.gradle
index 6356aab..e8f41cf 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,6 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
+ classpath 'com.adaptc.gradle:nexus-workflow:0.6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files