| // You should change this after releasing a new version of the Baku Toolkit. See the |
| // list of published versions at https://repo1.maven.org/maven2/io/v/baku-toolkit. |
| def releaseVersion = '0.1' |
| |
| apply plugin: 'com.android.library' |
| apply plugin: 'com.jfrog.bintray' |
| apply plugin: 'maven-publish' |
| /* |
| You might have to download JDK8 and set JAVA8_HOME (or set the jdk to Java 8 via Project Structure). |
| For detailed instructions, see https://github.com/evant/gradle-retrolambda |
| */ |
| apply plugin: 'me.tatarka.retrolambda' |
| |
| android { |
| compileOptions { |
| sourceCompatibility JavaVersion.VERSION_1_8 |
| targetCompatibility JavaVersion.VERSION_1_8 |
| } |
| compileSdkVersion 21 |
| buildToolsVersion "21.1.2" |
| |
| defaultConfig { |
| minSdkVersion 21 |
| targetSdkVersion 21 |
| versionCode 1 |
| versionName "1.0" |
| } |
| } |
| |
| dependencies { |
| provided( |
| /* If the application wishes to use support libraries, it should include them as compile |
| dependencies in its own build.gradle. */ |
| 'com.android.support:appcompat-v7:23.0.1', |
| |
| 'org.glassfish:javax.annotation:10.0-b28', |
| /* |
| https://projectlombok.org/setup/android.html |
| Follow Android Studio instructions at the bottom of the page to install the Lombok |
| Plugin. |
| */ |
| 'org.projectlombok:lombok:1.16.6', |
| 'org.slf4j:slf4j-api:1.7.12' |
| ) |
| |
| |
| testCompile( |
| 'org.mockito:mockito-core:1.10.19', |
| 'org.powermock:powermock-module-junit4:1.6.3', |
| 'org.slf4j:slf4j-simple:1.7.12' |
| ) |
| |
| testCompile('org.powermock:powermock-api-mockito:1.6.3') { |
| exclude module: 'mockito-all' |
| } |
| |
| compile( |
| 'com.jakewharton.rxbinding:rxbinding:0.3.0', |
| 'io.reactivex:rxandroid:1.0.1', |
| 'io.reactivex:rxjava:1.0.16', |
| 'io.reactivex:rxjava-async-util:0.21.0', |
| 'io.v:vanadium:0.1', |
| 'io.v:vanadium-android:0.1', |
| 'net.sourceforge.streamsupport:streamsupport:1.3.2' |
| ) |
| compile fileTree(dir: 'libs', include: ['*.jar']) |
| |
| /* |
| Word of caution: for local unit tests, Android log statements fail with |
| UnsatisfiedLinkError (hence the slf4j-simple implementation for testCompile). |
| |
| Applications should include a suitable runtime binding, such as |
| apk ('org.slf4j:slf4j-android:1.7.12') |
| */ |
| } |
| |
| task sourceJar(type: Jar) { |
| from android.sourceSets.main.java.srcDirs |
| classifier "source" |
| } |
| |
| publishing { |
| publications { |
| androidLibrary(MavenPublication) { |
| groupId 'io.v' |
| artifactId 'baku-toolkit' |
| version releaseVersion |
| artifact sourceJar |
| artifact "$buildDir/outputs/aar/bakutoolkit-release.aar" |
| } |
| } |
| } |
| |
| tasks.bintrayUpload.dependsOn(tasks.assemble) |
| |
| bintray { |
| user = project.properties.bintrayUsername |
| key = project.properties.bintrayApiKey |
| pkg { |
| desc = 'Java libraries for writing Vanadium Android applications with Baku' |
| websiteUrl = 'https://github.com/vanadium/java' |
| vcsUrl = 'https://github.com/vanadium/java.git' |
| repo = 'io.v' |
| name = 'baku-toolkit' |
| licenses = ['BSD New'] |
| version { |
| name = releaseVersion |
| gpg { |
| sign = true |
| } |
| } |
| userOrg = 'vanadium' |
| } |
| publications = ['androidLibrary'] |
| } |