From a67b2f2c91439da0ba715d4008a4c7b27e7d101d Mon Sep 17 00:00:00 2001 From: Emux Date: Tue, 2 Jan 2018 13:27:54 +0200 Subject: [PATCH] Gradle 4 / Android plugin 3 transitive dependencies, fix #433 --- docs/Changelog.md | 1 + jni/build.gradle | 2 +- vtm-android-example/build.gradle | 6 ------ vtm-android/build.gradle | 3 +-- vtm-app/build.gradle | 2 +- vtm-desktop/build.gradle | 9 ++------- vtm-extras/build.gradle | 9 ++++----- vtm-gdx/build.gradle | 3 +-- vtm-http/build.gradle | 3 +-- vtm-ios-example/build.gradle | 9 +-------- vtm-ios/build.gradle | 9 ++++----- vtm-jeo/build.gradle | 4 ++-- vtm-json/build.gradle | 2 +- vtm-jts/build.gradle | 3 +-- vtm-playground/build.gradle | 10 ++++------ vtm-playground/src/simplelogger.properties | 2 -- vtm-tests/build.gradle | 1 - vtm-theme-comparator/build.gradle | 6 ++++-- vtm-web-app/build.gradle | 4 ---- vtm-web-js/build.gradle | 5 ----- vtm-web/build.gradle | 9 +++------ vtm/build.gradle | 2 +- 22 files changed, 33 insertions(+), 71 deletions(-) delete mode 100644 vtm-playground/src/simplelogger.properties diff --git a/docs/Changelog.md b/docs/Changelog.md index 88b128bd..f80b93b5 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -2,6 +2,7 @@ ## New since 0.9.1 +- Gradle fix transitive dependencies [#433](https://github.com/mapsforge/vtm/issues/433) - libGDX 1.9.8 [#464](https://github.com/mapsforge/vtm/issues/464) - Many other minor improvements and bug fixes - [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.10.0) diff --git a/jni/build.gradle b/jni/build.gradle index f5978ebc..5e1d086f 100644 --- a/jni/build.gradle +++ b/jni/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'java-library' dependencies { - implementation "com.badlogicgames.gdx:gdx-jnigen:$gdxVersion" + api "com.badlogicgames.gdx:gdx-jnigen:$gdxVersion" } sourceSets { diff --git a/vtm-android-example/build.gradle b/vtm-android-example/build.gradle index 9e3e5212..6d0f2b91 100644 --- a/vtm-android-example/build.gradle +++ b/vtm-android-example/build.gradle @@ -11,12 +11,6 @@ dependencies { implementation project(':vtm-json') implementation project(':vtm-jts') implementation project(':vtm-themes') - implementation('org.jeo:jeo:0-SNAPSHOT') { - exclude group: 'org.slf4j', module: 'slf4j-jdk14' - } - implementation('org.jeo:jeo-render:0-SNAPSHOT') { - exclude group: 'org.slf4j', module: 'slf4j-jdk14' - } implementation "org.slf4j:slf4j-android:$slf4jVersion" implementation project(':vtm-android-gdx') diff --git a/vtm-android/build.gradle b/vtm-android/build.gradle index cb2964f5..623544e1 100644 --- a/vtm-android/build.gradle +++ b/vtm-android/build.gradle @@ -3,8 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven' dependencies { api project(':vtm') - implementation 'com.caverock:androidsvg:1.2.2-beta-1' - implementation "org.slf4j:slf4j-api:$slf4jVersion" + api 'com.caverock:androidsvg:1.2.2-beta-1' } android { diff --git a/vtm-app/build.gradle b/vtm-app/build.gradle index 3dcbe77f..1a2c7520 100644 --- a/vtm-app/build.gradle +++ b/vtm-app/build.gradle @@ -2,8 +2,8 @@ apply plugin: 'com.android.application' dependencies { implementation project(':vtm-android') - implementation project(':vtm-themes') implementation project(':vtm-extras') + implementation project(':vtm-themes') implementation 'com.squareup.okhttp3:okhttp:3.8.0' implementation "org.slf4j:slf4j-android:$slf4jVersion" } diff --git a/vtm-desktop/build.gradle b/vtm-desktop/build.gradle index d1aa1082..73477333 100644 --- a/vtm-desktop/build.gradle +++ b/vtm-desktop/build.gradle @@ -3,13 +3,8 @@ apply plugin: 'maven' dependencies { api project(':vtm-gdx') - file('natives').eachDir() { dir -> - api files(dir.path) - } - implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" - implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" - implementation 'com.metsci.ext.com.kitfox.svg:svg-salamander:0.1.19' - implementation "org.slf4j:slf4j-api:$slf4jVersion" + api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + api 'com.metsci.ext.com.kitfox.svg:svg-salamander:0.1.19' } sourceSets { diff --git a/vtm-extras/build.gradle b/vtm-extras/build.gradle index 5a4b3ac4..98c7c884 100644 --- a/vtm-extras/build.gradle +++ b/vtm-extras/build.gradle @@ -3,11 +3,10 @@ apply plugin: 'maven' dependencies { api project(':vtm') - implementation 'com.fasterxml.jackson.core:jackson-core:2.8.4' - implementation 'com.google.protobuf:protobuf-java:2.6.1' - implementation 'com.vividsolutions:jts:1.13' - implementation 'org.openstreetmap.osmosis:osmosis-osm-binary:0.45' - implementation "org.slf4j:slf4j-api:$slf4jVersion" + api 'com.fasterxml.jackson.core:jackson-core:2.8.4' + api 'com.google.protobuf:protobuf-java:2.6.1' + api 'com.vividsolutions:jts:1.13' + api 'org.openstreetmap.osmosis:osmosis-osm-binary:0.45' } sourceSets { diff --git a/vtm-gdx/build.gradle b/vtm-gdx/build.gradle index aa85bc79..2b7187d7 100644 --- a/vtm-gdx/build.gradle +++ b/vtm-gdx/build.gradle @@ -4,8 +4,7 @@ apply plugin: 'maven' dependencies { api project(':vtm') api project(':vtm-themes') - implementation "com.badlogicgames.gdx:gdx:$gdxVersion" - implementation "org.slf4j:slf4j-api:$slf4jVersion" + api "com.badlogicgames.gdx:gdx:$gdxVersion" } sourceSets { diff --git a/vtm-http/build.gradle b/vtm-http/build.gradle index 69061524..88e07e0f 100644 --- a/vtm-http/build.gradle +++ b/vtm-http/build.gradle @@ -3,8 +3,7 @@ apply plugin: 'maven' dependencies { api project(':vtm') - implementation 'com.squareup.okhttp3:okhttp:3.8.0' - implementation "org.slf4j:slf4j-api:$slf4jVersion" + api 'com.squareup.okhttp3:okhttp:3.8.0' } sourceSets { diff --git a/vtm-ios-example/build.gradle b/vtm-ios-example/build.gradle index cdf2cf6d..68f2fe13 100644 --- a/vtm-ios-example/build.gradle +++ b/vtm-ios-example/build.gradle @@ -25,15 +25,8 @@ launchIOSDevice.dependsOn build createIPA.dependsOn build dependencies { - implementation project(':vtm') - implementation project(':vtm-gdx') - implementation project(':vtm-jts') implementation project(':vtm-ios') - implementation project(':vtm-themes') - implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" - implementation "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" - implementation "com.mobidevelop.robovm:robovm-rt:$roboVMVersion" - implementation "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion" + implementation project(':vtm-jts') implementation "org.slf4j:slf4j-simple:$slf4jVersion" } diff --git a/vtm-ios/build.gradle b/vtm-ios/build.gradle index c93e9037..2012799c 100644 --- a/vtm-ios/build.gradle +++ b/vtm-ios/build.gradle @@ -27,11 +27,10 @@ createIPA.dependsOn build dependencies { api project(':vtm-gdx') - implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" - implementation "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" - implementation "com.mobidevelop.robovm:robovm-rt:$roboVMVersion" - implementation "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion" - implementation "org.slf4j:slf4j-api:$slf4jVersion" + api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" + api "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" + api "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion" + api "com.mobidevelop.robovm:robovm-rt:$roboVMVersion" } task copyVtmResources(type: Copy) { diff --git a/vtm-jeo/build.gradle b/vtm-jeo/build.gradle index 4ed0e538..283e829e 100644 --- a/vtm-jeo/build.gradle +++ b/vtm-jeo/build.gradle @@ -3,10 +3,10 @@ apply plugin: 'maven' dependencies { api project(':vtm') - implementation('org.jeo:jeo:0-SNAPSHOT') { + api('org.jeo:jeo:0-SNAPSHOT') { exclude group: 'org.slf4j', module: 'slf4j-jdk14' } - implementation('org.jeo:jeo-carto:0-SNAPSHOT') { + api('org.jeo:jeo-carto:0-SNAPSHOT') { exclude group: 'org.slf4j', module: 'slf4j-jdk14' } } diff --git a/vtm-json/build.gradle b/vtm-json/build.gradle index 59e889c9..2060150e 100644 --- a/vtm-json/build.gradle +++ b/vtm-json/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'maven' dependencies { api project(':vtm') - implementation 'com.fasterxml.jackson.core:jackson-core:2.8.4' + api 'com.fasterxml.jackson.core:jackson-core:2.8.4' } sourceSets { diff --git a/vtm-jts/build.gradle b/vtm-jts/build.gradle index e1990851..f24ba90e 100644 --- a/vtm-jts/build.gradle +++ b/vtm-jts/build.gradle @@ -3,8 +3,7 @@ apply plugin: 'maven' dependencies { api project(':vtm') - implementation 'com.vividsolutions:jts:1.13' - implementation "org.slf4j:slf4j-api:$slf4jVersion" + api 'com.vividsolutions:jts:1.13' } sourceSets { diff --git a/vtm-playground/build.gradle b/vtm-playground/build.gradle index af02e4d4..12de8206 100644 --- a/vtm-playground/build.gradle +++ b/vtm-playground/build.gradle @@ -2,16 +2,14 @@ apply plugin: 'application' dependencies { implementation project(':vtm-desktop') - implementation project(':vtm-extras') + file("${rootDir}/vtm-desktop/natives").eachDir() { dir -> + implementation files(dir.path) + } implementation project(':vtm-http') implementation project(':vtm-jeo') implementation project(':vtm-json') implementation project(':vtm-jts') - implementation "com.badlogicgames.gdx:gdx:$gdxVersion" - implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" - implementation 'com.squareup.okhttp3:okhttp:3.8.0' - implementation 'org.jeo:jeo:0-SNAPSHOT' - implementation 'org.jeo:jeo-render:0-SNAPSHOT' + implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" implementation "org.slf4j:slf4j-jdk14:$slf4jVersion" } diff --git a/vtm-playground/src/simplelogger.properties b/vtm-playground/src/simplelogger.properties deleted file mode 100644 index bda47e68..00000000 --- a/vtm-playground/src/simplelogger.properties +++ /dev/null @@ -1,2 +0,0 @@ -org.slf4j.simpleLogger.defaultLogLevel=debug -#org.slf4j.simpleLogger.showThreadName=true \ No newline at end of file diff --git a/vtm-tests/build.gradle b/vtm-tests/build.gradle index 301cd476..5e466bae 100644 --- a/vtm-tests/build.gradle +++ b/vtm-tests/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'java' dependencies { implementation project(':vtm-http') - implementation 'com.squareup.okhttp3:okhttp:3.8.0' testImplementation 'com.squareup.okhttp3:mockwebserver:3.8.0' testImplementation 'junit:junit:4.12' testImplementation 'org.easytesting:fest-assert-core:2.0M10' diff --git a/vtm-theme-comparator/build.gradle b/vtm-theme-comparator/build.gradle index 1bb16ab3..4216507e 100644 --- a/vtm-theme-comparator/build.gradle +++ b/vtm-theme-comparator/build.gradle @@ -6,9 +6,11 @@ repositories { dependencies { implementation project(':vtm-desktop') + file("${rootDir}/vtm-desktop/natives").eachDir() { dir -> + implementation files(dir.path) + } implementation 'ch.qos.logback:logback-classic:1.2.3' - implementation "com.badlogicgames.gdx:gdx:$gdxVersion" - implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" implementation 'com.fifesoft:rsyntaxtextarea:2.6.1' implementation 'com.jtattoo:JTattoo:1.6.11' diff --git a/vtm-web-app/build.gradle b/vtm-web-app/build.gradle index 186a9d0e..f0856113 100644 --- a/vtm-web-app/build.gradle +++ b/vtm-web-app/build.gradle @@ -18,10 +18,6 @@ sourceSets { dependencies { providedCompile project(':vtm-web') - providedCompile "com.badlogicgames.gdx:gdx:$gdxVersion:sources" - providedCompile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" - providedCompile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" - providedCompile "org.slf4j:slf4j-api:$slf4jVersion" providedCompile 'ru.finam:slf4j-gwt:1.7.7.1' } diff --git a/vtm-web-js/build.gradle b/vtm-web-js/build.gradle index fbd97836..dd2d43b2 100644 --- a/vtm-web-js/build.gradle +++ b/vtm-web-js/build.gradle @@ -18,11 +18,6 @@ sourceSets { dependencies { providedCompile project(':vtm-web') - providedCompile project(':vtm-extras') - providedCompile "com.badlogicgames.gdx:gdx:$gdxVersion:sources" - providedCompile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" - providedCompile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" - providedCompile "org.slf4j:slf4j-api:$slf4jVersion" providedCompile 'org.timepedia.exporter:gwtexporter:2.5.1' providedCompile 'ru.finam:slf4j-gwt:1.7.7.1' } diff --git a/vtm-web/build.gradle b/vtm-web/build.gradle index df251ad9..e0bef236 100644 --- a/vtm-web/build.gradle +++ b/vtm-web/build.gradle @@ -17,12 +17,9 @@ sourceSets { dependencies { api project(':vtm-gdx') - api project(':vtm-extras') - implementation "com.badlogicgames.gdx:gdx:$gdxVersion:sources" - implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" - implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" - implementation "org.slf4j:slf4j-api:$slf4jVersion" - implementation 'ru.finam:slf4j-gwt:1.7.7.1' + api "com.badlogicgames.gdx:gdx:$gdxVersion:sources" + api "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" + api "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" } // explicit dependencies for org.gradle.configureondemand=true diff --git a/vtm/build.gradle b/vtm/build.gradle index 367aa510..784984db 100644 --- a/vtm/build.gradle +++ b/vtm/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'java-library' apply plugin: 'maven' dependencies { - implementation "org.slf4j:slf4j-api:$slf4jVersion" + api "org.slf4j:slf4j-api:$slf4jVersion" compileOnly 'com.google.code.findbugs:jsr305:3.0.1' }