From 3a264777bd4b05bf53381b63eba3037b79df61d1 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 7 Mar 2018 07:50:48 +0100 Subject: [PATCH] Use AnimalSniffer to check for Android API compatiblity --- build.gradle | 15 +++++++++++++++ smack-android/build.gradle | 11 ----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 7358cf718..5ca3b2ac1 100644 --- a/build.gradle +++ b/build.gradle @@ -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')) { diff --git a/smack-android/build.gradle b/smack-android/build.gradle index caeaae305..f71ef735f 100644 --- a/smack-android/build.gradle +++ b/smack-android/build.gradle @@ -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 }