diff --git a/README.md b/README.md index c511ab0..6c4c282 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ # Spruce Android Animation Library [![CircleCI Build Status](https://circleci.com/gh/willowtreeapps/spruce-android.svg?style=shield)](https://circleci.com/gh/willowtreeapps/spruce-android) [![License MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)]() -[![Public Yes](https://img.shields.io/badge/Public-no-red.svg?style=flat)]() +[![Public Yes](https://img.shields.io/badge/Public-yes-green.svg?style=flat)]() ## What is it? Spruce is a lightweight animation library that helps choreograph the animations on the screen. With so many different animation libraries out there, developers need to make sure that each view is animating at the appropriate time. Spruce can help designers request complex multi-view animations and not have the developers cringe at the prototype.
- +
### Gradle diff --git a/build.gradle b/build.gradle index 74b2ab0..cf38853 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/lib/build.gradle b/lib/build.gradle index 83d8e3a..9060b2c 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -21,6 +21,8 @@ */ apply plugin: 'com.android.library' +apply plugin: 'com.jfrog.bintray' +apply plugin: 'com.github.dcendents.android-maven' android { compileSdkVersion 25 @@ -29,8 +31,8 @@ android { minSdkVersion 16 targetSdkVersion 25 versionCode 1 - versionName "1.0" - setProperty("archivesBaseName", "spruce-lib-$versionName") + versionName "1.0.0" + setProperty("archivesBaseName", "spruce-android") } buildTypes { release { @@ -42,6 +44,7 @@ android { testOptions { unitTests.returnDefaultValues = true } + } task javadocs(type: Javadoc) { @@ -55,8 +58,96 @@ dependencies { androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:25.2.0' + compile 'com.android.support:appcompat-v7:25.3.0' testCompile 'junit:junit:4.12' testCompile 'org.mockito:mockito-core:2.7.17' testCompile 'org.robolectric:robolectric:3.3.1' } + +def siteUrl = 'https://github.com/willowtreeapps/spruce-android' +def gitUrl = 'https://github.com/willowtreeapps/spruce-android.git' +group = "com.willowtreeapps.spruce" +version = "1.0.0" + +install { + repositories.mavenInstaller { + // This generates POM.xml with proper parameters + pom { + project { + packaging 'aar' + + name 'spruce-android' + description = 'lightweight animation library' + url siteUrl + + licenses { + license { + name 'MIT License' + url 'https://opensource.org/licenses/MIT' + } + } + developers { + developer { + id 'willowtreeapps' + name 'WillowTree Inc' + email 'developer@willowtreeapps.com' + } + } + scm { + connection gitUrl + developerConnection gitUrl + url siteUrl + } + } + } + } +} + +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 +} + +if (project.hasProperty("bintrayUser") && + project.hasProperty("bintrayApikey") && + project.hasProperty("bintrayGpgPassword")) { + + bintray { + user = project.properties.bintrayUser + key = project.properties.bintrayApikey + + configurations = ['archives'] + pkg { + repo = "maven" + name = "com.willowtreeapps.spruce" + websiteUrl = siteUrl + vcsUrl = gitUrl + licenses = ["MIT"] + publish = true + version { + name = '1.0.0' + vcsTag = '1.0.0' + gpg { + sign = true + passphrase = project.properties.bintrayGpgPassword + } + } + } + } + +} \ No newline at end of file