From 223b8045c80383c908046468cc4624c61cb7414f Mon Sep 17 00:00:00 2001 From: brucezz Date: Tue, 17 Jan 2017 17:42:36 +0800 Subject: [PATCH] prepare to publish --- build.gradle | 3 +- bundler-annotations/build.gradle | 34 ++------------------- bundler-compiler/build.gradle | 39 +++++------------------- bundler-parceler/build.gradle | 31 ------------------- gradle/bintray-android-v1.gradle | 52 -------------------------------- gradle/bintray-java-v1.gradle | 47 ----------------------------- gradle/install-v1.gradle | 42 -------------------------- 7 files changed, 12 insertions(+), 236 deletions(-) delete mode 100644 gradle/bintray-android-v1.gradle delete mode 100644 gradle/bintray-java-v1.gradle delete mode 100644 gradle/install-v1.gradle diff --git a/build.gradle b/build.gradle index dc36305..b6b8970 100644 --- a/build.gradle +++ b/build.gradle @@ -7,8 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/bundler-annotations/build.gradle b/bundler-annotations/build.gradle index e46ae5c..5c72c49 100644 --- a/bundler-annotations/build.gradle +++ b/bundler-annotations/build.gradle @@ -1,7 +1,10 @@ apply plugin: 'java' +apply plugin: 'com.github.dcendents.android-maven' targetCompatibility = JavaVersion.VERSION_1_7 sourceCompatibility = JavaVersion.VERSION_1_7 +group = 'com.github.brucezz' + configurations { provided compile.extendsFrom provided @@ -11,34 +14,3 @@ dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) provided deps.android } - -ext { - bintrayRepo = 'maven' - bintrayName = 'bundler-annotations' - orgName = 'workarounds' - - publishedGroupId = 'in.workarounds.bundler' - libraryName = 'Bundler' - artifact = 'bundler-annotations' - - libraryDescription = 'Annotations for bundler library' - - siteUrl = 'https://github.com/workarounds/bundler' - gitUrl = 'https://github.com/workarounds/bundler.git' - - libraryVersion = rootProject.ext.libraryVersion - - developerId = 'workarounds' - developerName = 'Workarounds' - developerEmail = 'contact@workarounds.in' - - licenseName = 'The Apache Software License, Version 2.0' - licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - allLicenses = ["Apache-2.0"] -} - - -if (project.rootProject.file('local.properties').exists()) { - apply from: rootProject.file('gradle/install-v1.gradle') - apply from: rootProject.file('gradle/bintray-java-v1.gradle') -} \ No newline at end of file diff --git a/bundler-compiler/build.gradle b/bundler-compiler/build.gradle index 1110dbe..6cb0dbe 100644 --- a/bundler-compiler/build.gradle +++ b/bundler-compiler/build.gradle @@ -1,7 +1,15 @@ apply plugin: 'java' +apply plugin: 'com.github.dcendents.android-maven' targetCompatibility = JavaVersion.VERSION_1_7 sourceCompatibility = JavaVersion.VERSION_1_7 +group='com.github.brucezz' + +configurations { + provided + compile.extendsFrom provided +} + dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile project(':bundler-annotations') @@ -16,34 +24,3 @@ dependencies { testCompile deps.robolectric testCompile deps.compiletesting } - -ext { - bintrayRepo = 'maven' - bintrayName = 'bundler-compiler' - orgName = 'workarounds' - - publishedGroupId = 'in.workarounds.bundler' - libraryName = 'Bundler' - artifact = 'bundler-compiler' - - libraryDescription = 'Compiler for bundler library' - - siteUrl = 'https://github.com/workarounds/bundler' - gitUrl = 'https://github.com/workarounds/bundler.git' - - libraryVersion = rootProject.ext.libraryVersion - - developerId = 'workarounds' - developerName = 'Workarounds' - developerEmail = 'contact@workarounds.in' - - licenseName = 'The Apache Software License, Version 2.0' - licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - allLicenses = ["Apache-2.0"] -} - - -if (project.rootProject.file('local.properties').exists()) { - apply from: rootProject.file('gradle/install-v1.gradle') - apply from: rootProject.file('gradle/bintray-java-v1.gradle') -} diff --git a/bundler-parceler/build.gradle b/bundler-parceler/build.gradle index 6b095ad..2b8929a 100644 --- a/bundler-parceler/build.gradle +++ b/bundler-parceler/build.gradle @@ -14,34 +14,3 @@ dependencies { provided project(':bundler-annotations') provided 'org.parceler:parceler-api:1.0.4' } - -ext { - bintrayRepo = 'maven' - bintrayName = 'bundler-parceler' - orgName = 'workarounds' - - publishedGroupId = 'in.workarounds.bundler' - libraryName = 'Bundler' - artifact = 'bundler-parceler' - - libraryDescription = 'Annotations for bundler library' - - siteUrl = 'https://github.com/workarounds/bundler' - gitUrl = 'https://github.com/workarounds/bundler.git' - - libraryVersion = rootProject.ext.libraryVersion - - developerId = 'workarounds' - developerName = 'Workarounds' - developerEmail = 'contact@workarounds.in' - - licenseName = 'The Apache Software License, Version 2.0' - licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - allLicenses = ["Apache-2.0"] -} - - -if (project.rootProject.file('local.properties').exists()) { - apply from: rootProject.file('gradle/install-v1.gradle') - apply from: rootProject.file('gradle/bintray-java-v1.gradle') -} diff --git a/gradle/bintray-android-v1.gradle b/gradle/bintray-android-v1.gradle deleted file mode 100644 index 0101dd5..0000000 --- a/gradle/bintray-android-v1.gradle +++ /dev/null @@ -1,52 +0,0 @@ -apply plugin: 'com.jfrog.bintray' - -version = libraryVersion - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' -} - -task javadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} -artifacts { - archives javadocJar - archives sourcesJar -} - -// Bintray -Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) - -bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") - - configurations = ['archives'] - pkg { - repo = bintrayRepo - name = bintrayName - desc = libraryDescription - userOrg = orgName - websiteUrl = siteUrl - vcsUrl = gitUrl - licenses = allLicenses - publish = true - publicDownloadNumbers = true - version { - desc = libraryDescription - gpg { - sign = true //Determines whether to GPG sign the files. The default is false - passphrase = properties.getProperty("bintray.gpg.password") - //Optional. The passphrase for GPG signing' - } - } - } -} \ No newline at end of file diff --git a/gradle/bintray-java-v1.gradle b/gradle/bintray-java-v1.gradle deleted file mode 100644 index bf470a6..0000000 --- a/gradle/bintray-java-v1.gradle +++ /dev/null @@ -1,47 +0,0 @@ -apply plugin: 'com.jfrog.bintray' - -version = libraryVersion - -task sourcesJar(type: Jar) { - from sourceSets.main.allSource - classifier = 'sources' -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} -artifacts { - archives javadocJar - archives sourcesJar -} - -// Bintray -Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) - -bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") - - configurations = ['archives'] - pkg { - repo = bintrayRepo - name = bintrayName - desc = libraryDescription - userOrg = orgName - websiteUrl = siteUrl - vcsUrl = gitUrl - licenses = allLicenses - publish = true - publicDownloadNumbers = true - version { - desc = libraryDescription - gpg { - sign = true //Determines whether to GPG sign the files. The default is false - passphrase = properties.getProperty("bintray.gpg.password") - //Optional. The passphrase for GPG signing' - } - } - } -} \ No newline at end of file diff --git a/gradle/install-v1.gradle b/gradle/install-v1.gradle deleted file mode 100644 index cdb363c..0000000 --- a/gradle/install-v1.gradle +++ /dev/null @@ -1,42 +0,0 @@ -apply plugin: 'com.github.dcendents.android-maven' - -group = publishedGroupId // Maven Group ID for the artifact - -install { - repositories.mavenInstaller { - // This generates POM.xml with proper parameters - pom { - project { - packaging 'aar' - groupId publishedGroupId - artifactId artifact - - // Add your description here - name libraryName - description libraryDescription - url siteUrl - - // Set your license - licenses { - license { - name licenseName - url licenseUrl - } - } - developers { - developer { - id developerId - name developerName - email developerEmail - } - } - scm { - connection gitUrl - developerConnection gitUrl - url siteUrl - - } - } - } - } -} \ No newline at end of file