From b3c33c66a00b93ec2c10a12b0b8ee336e22a5ecb Mon Sep 17 00:00:00 2001 From: msdx <645079761@qq.com> Date: Sun, 28 Jun 2015 13:24:20 +0800 Subject: [PATCH 1/3] Update README to show the lastest version in jcenter. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8e782b..fda1c97 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # IconButton for Android +[ ![Download](https://api.bintray.com/packages/pnc/maven/iconbutton/images/download.svg) ](https://bintray.com/pnc/maven/iconbutton/_latestVersion) IconButton is an Android button widget that allows you to center both the button's text and an icon. @@ -19,7 +20,7 @@ Make sure you declare the JCenter repository in your project's `build.gradle`: Then add a compile-time dependency on this library, adding the `dependencies` section to `build.gradle` if it doesn't already exist: dependencies { - compile 'com.githang:com-phillipcalvin-iconbutton:1.0.1@aar' + compile 'com.githang:com-phillipcalvin-iconbutton:1.1.0@aar' } ### For Old Version From 9003eeb0a77e4c96d65bb8cc1bf571fe7d7869bd Mon Sep 17 00:00:00 2001 From: msdx <645079761@qq.com> Date: Sun, 28 Jun 2015 13:29:12 +0800 Subject: [PATCH 2/3] Update bintray script. --- library/bintray.gradle | 101 ----------------------------------------- library/build.gradle | 2 +- 2 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 library/bintray.gradle diff --git a/library/bintray.gradle b/library/bintray.gradle deleted file mode 100644 index 08b6347..0000000 --- a/library/bintray.gradle +++ /dev/null @@ -1,101 +0,0 @@ -group = PROJ_GROUP -version = PROJ_VERSION - -apply plugin: 'com.jfrog.bintray' -apply plugin: 'maven-publish' - -task androidJavadocs(type: Javadoc) { - source = android.sourceSets.main.java -} - -task androidJavadocsJar(type: Jar) { - classifier = 'javadoc' - from androidJavadocs.destinationDir -} - -task androidLibJar(type: Jar) { - from fileTree(dir: './build/intermediates/classes/release') -} - -task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs -} - -artifacts { - archives androidSourcesJar -} - -def pomConfig = { - licenses { - license { - name "The Apache Software License, Version 2.0" - url "http://www.apache.org/licenses/LICENSE-2.0.txt" - distribution "repo" - } - } - developers { - developer { - id 'pnc' - name 'Phillip Calvin' - } - developer { - id DEVELOPER_ID - name DEVELOPER_NAME - email DEVELOPER_EMAIL - } - } -} - -publishing { - publications { - mavenJava(MavenPublication) { - artifactId PROJ_ARTIFACTID - - artifact androidSourcesJar - artifact androidJavadocsJar - artifact bundleRelease - - pom.withXml { - def root = asNode() - root.appendNode('description', PROJ_DESCRIPTION) - root.children().last() + pomConfig - } - } - } -} - -bintray { - //Do not share your username and key. - // Config it in ~/.gradle/gradle.properties or local.properties - user = bintrayUser - key = bintrayKey - - publications = ['mavenJava'] //When uploading Maven-based publication files - // - AND/OR - - filesSpec { //When uploading any arbitrary files ('filesSpec' is a standard Gradle CopySpec) - from 'arbitrary-files' - into 'standalone_files/level1' - rename '(.+)\\.(.+)', '$1-suffix.$2' - } - dryRun = false //Whether to run this as dry-run, without deploying - publish = true //If version should be auto published after an upload - pkg { - repo = 'maven' - // userOrg = 'myorg' //An optional organization name when the repo belongs to one of the user's orgs - name = PROJ_NAME - desc = PROJ_DESCRIPTION - websiteUrl = PROJ_WEBSITEURL - issueTrackerUrl = PROJ_ISSUETRACKERURL - vcsUrl = PROJ_VCSURL - licenses = ['Apache-2.0'] - // labels = ['gear', 'gore', 'gorilla'] - publicDownloadNumbers = true - //attributes= ['a': ['ay1', 'ay2'], 'b': ['bee'], c: 'cee'] //Optional package-level attributes - //Optional version descriptor - version { - name = PROJ_VERSION //Bintray logical version name - vcsTag = PROJ_VERSION - } - } -} diff --git a/library/build.gradle b/library/build.gradle index 24d22d7..5dfbf09 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -36,4 +36,4 @@ dependencies { } // this script was used to upload files to bintray. -apply from: 'bintray.gradle' +apply from: 'https://raw.githubusercontent.com/msdx/gradle-publish/master/bintray.gradle' From 5bd163e2c105ccdfa3d313a401de89636f8e0cde Mon Sep 17 00:00:00 2001 From: msdx <645079761@qq.com> Date: Wed, 1 Jul 2015 09:19:33 +0800 Subject: [PATCH 3/3] Checked in the bintray.gradle file. --- library/bintray.gradle | 81 ++++++++++++++++++++++++++++++++++++++++++ library/build.gradle | 2 +- 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 library/bintray.gradle diff --git a/library/bintray.gradle b/library/bintray.gradle new file mode 100644 index 0000000..42b2ed3 --- /dev/null +++ b/library/bintray.gradle @@ -0,0 +1,81 @@ +group = PROJ_GROUP +version = PROJ_VERSION +project.archivesBaseName = PROJ_ARTIFACTID +apply plugin: 'com.jfrog.bintray' +apply plugin: 'maven-publish' +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} +task javadoc(type: Javadoc) { + source = android.sourceSets.main.java.srcDirs + classpath += configurations.compile + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) +} +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} +javadoc { + options{ + encoding "UTF-8" + charSet 'UTF-8' + author true + version true + links "http://docs.oracle.com/javase/7/docs/api" + title PROJ_ARTIFACTID + } +} +artifacts { + archives javadocJar + archives sourcesJar +} +def pomConfig = { + licenses { + license { + name "The Apache Software License, Version 2.0" + url "http://www.apache.org/licenses/LICENSE-2.0.txt" + distribution "repo" + } + } + developers { + developer { + id DEVELOPER_ID + name DEVELOPER_NAME + email DEVELOPER_EMAIL + } + } +} +publishing { + publications { + mavenJava(MavenPublication) { + artifactId PROJ_ARTIFACTID + pom{ + packaging 'aar' + } + pom.withXml { + def root = asNode() + root.appendNode('description', PROJ_DESCRIPTION) + root.children().last() + pomConfig + } + } + } +} +bintray { + user = hasProperty("bintrayUser")?getProperty("bintrayUser"):getProperty("BINTRAY_USER") + key = hasProperty("bintrayKey")?getProperty("bintrayKey"):getProperty("BINTRAY_KEY") + configurations = ['archives'] + publications = ['mavenJava'] + dryRun = false //Whether to run this as dry-run, without deploying + publish = true + pkg { + repo = 'maven' + name = PROJ_NAME + desc = PROJ_DESCRIPTION + websiteUrl = PROJ_WEBSITEURL + issueTrackerUrl = PROJ_ISSUETRACKERURL + vcsUrl = PROJ_VCSURL + licenses = ['Apache-2.0'] + publicDownloadNumbers = true + } +} \ No newline at end of file diff --git a/library/build.gradle b/library/build.gradle index 5dfbf09..24d22d7 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -36,4 +36,4 @@ dependencies { } // this script was used to upload files to bintray. -apply from: 'https://raw.githubusercontent.com/msdx/gradle-publish/master/bintray.gradle' +apply from: 'bintray.gradle'