Skip to content

Update readme and bintray publish script #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, thanks!

}

### For Old Version
Expand Down
82 changes: 31 additions & 51 deletions library/bintray.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
group = PROJ_GROUP
version = PROJ_VERSION

project.archivesBaseName = PROJ_ARTIFACTID
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'

task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task androidJavadocsJar(type: Jar) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += configurations.compile
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task androidLibJar(type: Jar) {
from fileTree(dir: './build/intermediates/classes/release')
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
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 androidSourcesJar
archives javadocJar
archives sourcesJar
}

def pomConfig = {
licenses {
license {
Expand All @@ -35,27 +39,20 @@ def pomConfig = {
}
}
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{
packaging 'aar'
}
pom.withXml {
def root = asNode()
root.appendNode('description', PROJ_DESCRIPTION)
Expand All @@ -64,38 +61,21 @@ publishing {
}
}
}

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'
}
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 //If version should be auto published after an upload
publish = true
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
}
}
}
}