Use AnimalSniffer to check for Android API compatiblity

This commit is contained in:
Florian Schmaus 2018-03-07 07:50:48 +01:00
parent dddf62763e
commit 3a264777bd
2 changed files with 15 additions and 11 deletions

View File

@ -13,6 +13,11 @@ buildscript {
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.10'
}
}
plugins {
id 'ru.vyarus.animalsniffer' version '1.4.3'
}
apply plugin: 'org.kordamp.gradle.markdown'
apply from: 'version.gradle'
@ -417,6 +422,16 @@ subprojects {
}
}
configure (androidProjects) {
apply plugin: 'ru.vyarus.animalsniffer'
dependencies {
signature "net.sf.androidscents.signature:android-api-level-${smackMinAndroidSdk}:2.2_r3@signature"
}
animalsniffer {
sourceSets = [sourceSets.main]
}
}
// There is no need to ever clirr integration test projects and the
// smack-repl project.
configure(integrationTestProjects + project(':smack-repl')) {

View File

@ -17,14 +17,3 @@ dependencies {
// Add the Android jar to the Eclipse .classpath.
compile files(androidBootClasspath)
}
configure (androidProjects) {
task compileAndroid(type: JavaCompile) {
source = compileJava.source
classpath = compileJava.classpath
destinationDir = new File(buildDir, 'android')
options.bootClasspath = androidBootClasspath
}
}
test { dependsOn androidProjects*.compileAndroid }