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'