From d4edb81d8767ee1eb7a2867db01eeae77307b10b Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Sun, 4 Nov 2018 16:55:33 +0100 Subject: [PATCH] Pull up remaining common config to root --- build.gradle | 69 +++++++++++++++++++++++++++++++++++++++++++-- common/build.gradle | 67 ------------------------------------------- 2 files changed, 67 insertions(+), 69 deletions(-) delete mode 100644 common/build.gradle diff --git a/build.gradle b/build.gradle index 648c6f887b..e929c32fa8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,15 @@ -plugins { - id 'java-base' +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.5' + classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.0' + } +} + +configure(rootProject) { + apply plugin: 'java-base' } configure(subprojects) { @@ -40,3 +50,58 @@ configure(project(':assets')) { testCompile 'junit:junit:4.12' } } + +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" + + protobuf { + protoc { + artifact = "com.google.protobuf:protoc:$protobufVersion" + } + } + + 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 "com.google.protobuf:protobuf-java:$protobufVersion" + compile 'com.google.code.gson:gson:2.7' + compile('com.googlecode.json-simple:json-simple:1.1.1') { + exclude(module: 'junit') + } + compile 'org.springframework:spring-core:4.3.6.RELEASE' + compile 'org.slf4j:slf4j-api:1.7.22' + compile 'ch.qos.logback:logback-core:1.1.10' + compile 'ch.qos.logback:logback-classic:1.1.10' + compile 'com.google.code.findbugs:jsr305:3.0.1' + compile 'com.google.guava:guava:20.0' + compile('com.google.inject:guice:4.1.0') { + exclude(module: 'guava') + } + compile('network.bisq.libdohj:libdohj-core:d4ace7bc') { + exclude(module: 'jsr305') + exclude(module: 'slf4j-api') + exclude(module: 'guava') + exclude(module: 'protobuf-java') + } + compile 'org.jetbrains:annotations:13.0' + runtime 'org.bouncycastle:bcprov-jdk15on:1.56' + compile 'org.bouncycastle:bcpg-jdk15on:1.56' + compile 'commons-io:commons-io:2.4' + compile 'org.apache.commons:commons-lang3:3.4' + compileOnly 'org.projectlombok:lombok:1.18.2' + annotationProcessor 'org.projectlombok:lombok:1.18.2' + testCompile 'junit:junit:4.12' + } +} diff --git a/common/build.gradle b/common/build.gradle deleted file mode 100644 index ff2aa756ac..0000000000 --- a/common/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -// Note, version 1.6.0 of osdetector-gradle-plugin cannot be applied with a plugins block -// So a buildscript block is used -// See https://github.com/google/osdetector-gradle-plugin/issues/15 -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.0' - } -} - -plugins { - id 'com.google.protobuf' version '0.8.5' -} - -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" - -protobuf { - protoc { - artifact = "com.google.protobuf:protoc:$protobufVersion" - } -} - -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 "com.google.protobuf:protobuf-java:$protobufVersion" - compile 'com.google.code.gson:gson:2.7' - compile('com.googlecode.json-simple:json-simple:1.1.1') { - exclude(module: 'junit') - } - compile 'org.springframework:spring-core:4.3.6.RELEASE' - compile 'org.slf4j:slf4j-api:1.7.22' - compile 'ch.qos.logback:logback-core:1.1.10' - compile 'ch.qos.logback:logback-classic:1.1.10' - compile 'com.google.code.findbugs:jsr305:3.0.1' - compile 'com.google.guava:guava:20.0' - compile('com.google.inject:guice:4.1.0') { - exclude(module: 'guava') - } - compile('network.bisq.libdohj:libdohj-core:d4ace7bc') { - exclude(module: 'jsr305') - exclude(module: 'slf4j-api') - exclude(module: 'guava') - exclude(module: 'protobuf-java') - } - compile 'org.jetbrains:annotations:13.0' - runtime 'org.bouncycastle:bcprov-jdk15on:1.56' - compile 'org.bouncycastle:bcpg-jdk15on:1.56' - compile 'commons-io:commons-io:2.4' - compile 'org.apache.commons:commons-lang3:3.4' - compileOnly 'org.projectlombok:lombok:1.18.2' - annotationProcessor 'org.projectlombok:lombok:1.18.2' - testCompile 'junit:junit:4.12' -}