From 236c5c2eb6802c8c4727f01df8ff7d71d44942be Mon Sep 17 00:00:00 2001 From: kifile Date: Thu, 20 Aug 2015 00:06:28 +0800 Subject: [PATCH] Upload aar to maven repo. --- .gitignore | 1 + framework/build.gradle | 56 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/.gitignore b/.gitignore index 4db003b..54cc17b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ proguard/ # Log Files *.log +/*/gradle.properties diff --git a/framework/build.gradle b/framework/build.gradle index 8e6d313..61f5632 100644 --- a/framework/build.gradle +++ b/framework/build.gradle @@ -1,4 +1,6 @@ apply plugin: 'com.android.library' +apply plugin: 'maven' +apply plugin: 'signing' android { compileSdkVersion 22 @@ -21,3 +23,57 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) } + +signing { + sign configurations.archives +} + +group = 'com.kifile.android.cornerstone' +archivesBaseName = 'Cornerstone' +version = '0.1' + +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 'Cornerstone' + packaging 'aar' + description 'This project is build to let the view looks like a material design widget when touched. ' + url 'https://github.com/kifile/Cornerstone' + + scm { + connection 'scm:git:https://github.com/kifile/Cornerstone.git' + developerConnection 'scm:git:https://github.com/kifile/Cornerstone.git' + url 'https://github.com/kifile/Cornerstone.git' + } + + licenses { + license { + name 'The Apache License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + + developers { + developer { + id 'kifile' + name 'Kifile Chou' + email 'kifile@kifile.com' + } + } + } + } + } +}