From cb4f6edd9a52fcace6228f4084dc08481f530eac Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Sun, 4 Nov 2018 18:16:07 +0100 Subject: [PATCH] Minimize common subproject javafx dependencies --- build.gradle | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 693f3c0177..56b3696b93 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,12 @@ configure(rootProject) { configure(subprojects) { apply plugin: 'java' + apply plugin: 'com.google.osdetector' + sourceCompatibility = 1.10 + ext { + os = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os + } repositories { jcenter() @@ -56,11 +61,9 @@ configure(project(':assets')) { configure(project(':common')) { apply plugin: 'com.google.protobuf' - apply plugin: 'com.google.osdetector' ext { protobufVersion = '3.5.1' - platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os } sourceSets.main.java.srcDir "$buildDir/generated/source/proto/main/java" @@ -72,12 +75,8 @@ configure(project(':common')) { } dependencies { - compile "org.openjfx:javafx-base:11:$platform" - compile "org.openjfx:javafx-graphics:11:$platform" - compile "org.openjfx:javafx-controls:11:$platform" - compile "org.openjfx:javafx-fxml:11:$platform" - compile "org.openjfx:javafx-swing:11:$platform" - + compile "org.openjfx:javafx-base:11:$os" + compile "org.openjfx:javafx-graphics:11:$os" compile "com.google.protobuf:protobuf-java:$protobufVersion" compile 'com.google.code.gson:gson:2.7' compile('com.googlecode.json-simple:json-simple:1.1.1') { @@ -211,6 +210,9 @@ configure(project(':desktop')) { compile 'de.jensd:fontawesomefx-materialdesignfont:2.0.26-9.1.2' compile 'com.googlecode.jcsv:jcsv:1.4.0' compile 'com.github.sarxos:webcam-capture:0.3.12' + compile "org.openjfx:javafx-controls:11:$os" + compile "org.openjfx:javafx-fxml:11:$os" + compile "org.openjfx:javafx-swing:11:$os" compileOnly 'org.projectlombok:lombok:1.18.2' annotationProcessor 'org.projectlombok:lombok:1.18.2'