From 3ec9d6dbd2c33b5bfa5dcd4f970de164cadb72eb Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Tue, 3 Feb 2015 11:13:11 +0200 Subject: [PATCH] Proper gradle --- OsmAnd-java/build.gradle | 19 +++++++++++++------ OsmAnd/build.gradle | 2 +- settings.gradle | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/OsmAnd-java/build.gradle b/OsmAnd-java/build.gradle index 69a76ae3e8..55d9132bfb 100644 --- a/OsmAnd-java/build.gradle +++ b/OsmAnd-java/build.gradle @@ -3,16 +3,23 @@ apply plugin: 'java' sourceSets { main { java { - srcDirs = [ - "src" - ] + srcDirs = ["src"] } } } -// This is Android-specific -jar { - exclude "**/PlatformUtil.*" +configurations { + android +} + +task androidJar(type: Jar) { + appendix = "android" + from sourceSets.main.output + exclude("**/PlatformUtil.*") +} + +artifacts { + android androidJar } dependencies { diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 77b0670aed..7175168a22 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -299,7 +299,7 @@ repositories { } dependencies { - compile project(":OsmAnd-java") + compile project(path: ":OsmAnd-java", configuration: "android") compile fileTree( dir: "libs", include: ["*.jar"], diff --git a/settings.gradle b/settings.gradle index debb02529f..b3903c848d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ -include ':OsmAnd' include ':OsmAnd-java' +include ':OsmAnd'