From 735208562a1adcad3d7db7af521fb7faade907f5 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Fri, 17 Nov 2017 14:09:37 +0000 Subject: [PATCH] Use java-library plugin for Java modules. --- bramble-api/build.gradle | 18 +++++++++--------- bramble-core/build.gradle | 18 ++++++++++++------ bramble-j2se/build.gradle | 19 +++++++++++++------ briar-android/build.gradle | 7 +++++++ briar-api/build.gradle | 4 ++-- briar-core/build.gradle | 26 ++++++++++++++++---------- 6 files changed, 59 insertions(+), 33 deletions(-) diff --git a/bramble-api/build.gradle b/bramble-api/build.gradle index 059af0012..76bc23409 100644 --- a/bramble-api/build.gradle +++ b/bramble-api/build.gradle @@ -1,19 +1,19 @@ -apply plugin: 'java' +apply plugin: 'java-library' sourceCompatibility = 1.8 targetCompatibility = 1.8 apply plugin: 'witness' dependencies { - compile "com.google.dagger:dagger:2.0.2" - compile 'com.google.code.findbugs:jsr305:3.0.2' + implementation "com.google.dagger:dagger:2.0.2" + implementation 'com.google.code.findbugs:jsr305:3.0.2' - testCompile 'junit:junit:4.12' - testCompile "org.jmock:jmock:2.8.2" - testCompile "org.jmock:jmock-junit4:2.8.2" - testCompile "org.jmock:jmock-legacy:2.8.2" - testCompile "org.hamcrest:hamcrest-library:1.3" - testCompile "org.hamcrest:hamcrest-core:1.3" + testImplementation 'junit:junit:4.12' + testImplementation "org.jmock:jmock:2.8.2" + testImplementation "org.jmock:jmock-junit4:2.8.2" + testImplementation "org.jmock:jmock-legacy:2.8.2" + testImplementation "org.hamcrest:hamcrest-library:1.3" + testImplementation "org.hamcrest:hamcrest-core:1.3" } dependencyVerification { diff --git a/bramble-core/build.gradle b/bramble-core/build.gradle index a4c28dd22..853b76008 100644 --- a/bramble-core/build.gradle +++ b/bramble-core/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' sourceCompatibility = 1.8 targetCompatibility = 1.8 @@ -7,14 +7,20 @@ apply plugin: 'idea' apply plugin: 'witness' dependencies { - compile project(path: ':bramble-api', configuration: 'default') - compile 'com.madgag.spongycastle:core:1.58.0.0' - compile 'com.h2database:h2:1.4.192' // This is the last version that supports Java 1.6 - compile 'org.bitlet:weupnp:0.1.4' + implementation project(path: ':bramble-api', configuration: 'default') + implementation 'com.madgag.spongycastle:core:1.58.0.0' + implementation 'com.h2database:h2:1.4.192' // This is the last version that supports Java 1.6 + implementation 'org.bitlet:weupnp:0.1.4' apt 'com.google.dagger:dagger-compiler:2.0.2' - testCompile project(path: ':bramble-api', configuration: 'testOutput') + testImplementation project(path: ':bramble-api', configuration: 'testOutput') + testImplementation 'junit:junit:4.12' + testImplementation "org.jmock:jmock:2.8.2" + testImplementation "org.jmock:jmock-junit4:2.8.2" + testImplementation "org.jmock:jmock-legacy:2.8.2" + testImplementation "org.hamcrest:hamcrest-library:1.3" + testImplementation "org.hamcrest:hamcrest-core:1.3" testApt 'com.google.dagger:dagger-compiler:2.0.2' } diff --git a/bramble-j2se/build.gradle b/bramble-j2se/build.gradle index 5a77dee5b..7294bff5c 100644 --- a/bramble-j2se/build.gradle +++ b/bramble-j2se/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' sourceCompatibility = 1.8 targetCompatibility = 1.8 @@ -7,14 +7,21 @@ apply plugin: 'idea' apply plugin: 'witness' dependencies { - compile project(path: ':bramble-core', configuration: 'default') - compile fileTree(dir: 'libs', include: '*.jar') - compile 'net.java.dev.jna:jna:4.4.0' - compile 'net.java.dev.jna:jna-platform:4.4.0' + implementation project(path: ':bramble-core', configuration: 'default') + implementation fileTree(dir: 'libs', include: '*.jar') + implementation 'net.java.dev.jna:jna:4.4.0' + implementation 'net.java.dev.jna:jna-platform:4.4.0' apt 'com.google.dagger:dagger-compiler:2.0.2' - testCompile project(path: ':bramble-core', configuration: 'testOutput') + testImplementation project(path: ':bramble-api', configuration: 'testOutput') + testImplementation project(path: ':bramble-core', configuration: 'testOutput') + testImplementation 'junit:junit:4.12' + testImplementation "org.jmock:jmock:2.8.2" + testImplementation "org.jmock:jmock-junit4:2.8.2" + testImplementation "org.jmock:jmock-legacy:2.8.2" + testImplementation "org.hamcrest:hamcrest-library:1.3" + testImplementation "org.hamcrest:hamcrest-core:1.3" } dependencyVerification { diff --git a/briar-android/build.gradle b/briar-android/build.gradle index 3252755af..6423ab8de 100644 --- a/briar-android/build.gradle +++ b/briar-android/build.gradle @@ -38,10 +38,17 @@ dependencies { compileOnly 'javax.annotation:jsr250-api:1.0' + testImplementation project(path: ':bramble-api', configuration: 'testOutput') testImplementation project(path: ':bramble-core', configuration: 'testOutput') testImplementation 'org.robolectric:robolectric:3.5.1' testImplementation 'org.robolectric:shadows-support-v4:3.0' testCompile 'org.mockito:mockito-core:2.8.9' + testImplementation 'junit:junit:4.12' + testImplementation "org.jmock:jmock:2.8.2" + testImplementation "org.jmock:jmock-junit4:2.8.2" + testImplementation "org.jmock:jmock-legacy:2.8.2" + testImplementation "org.hamcrest:hamcrest-library:1.3" + testImplementation "org.hamcrest:hamcrest-core:1.3" } dependencyVerification { diff --git a/briar-api/build.gradle b/briar-api/build.gradle index 7b41b6fc0..333d904df 100644 --- a/briar-api/build.gradle +++ b/briar-api/build.gradle @@ -1,11 +1,11 @@ -apply plugin: 'java' +apply plugin: 'java-library' sourceCompatibility = 1.8 targetCompatibility = 1.8 apply plugin: 'witness' dependencies { - compile project(path: ':bramble-api', configuration: 'default') + implementation project(path: ':bramble-api', configuration: 'default') } dependencyVerification { diff --git a/briar-core/build.gradle b/briar-core/build.gradle index 6ee6909b0..2965e48d4 100644 --- a/briar-core/build.gradle +++ b/briar-core/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' sourceCompatibility = 1.8 targetCompatibility = 1.8 @@ -7,18 +7,24 @@ apply plugin: 'idea' apply plugin: 'witness' dependencies { - compile project(path: ':briar-api', configuration: 'default') - compile 'com.rometools:rome:1.7.3' - compile 'org.jdom:jdom2:2.0.6' - compile 'com.squareup.okhttp3:okhttp:3.8.0' - compile 'org.jsoup:jsoup:1.10.3' + implementation project(path: ':briar-api', configuration: 'default') + implementation 'com.rometools:rome:1.7.3' + implementation 'org.jdom:jdom2:2.0.6' + implementation 'com.squareup.okhttp3:okhttp:3.8.0' + implementation 'org.jsoup:jsoup:1.10.3' apt 'com.google.dagger:dagger-compiler:2.0.2' - testCompile project(path: ':bramble-core', configuration: 'default') - testCompile project(path: ':bramble-core', configuration: 'testOutput') - testCompile project(path: ':bramble-api', configuration: 'testOutput') - testCompile 'net.jodah:concurrentunit:0.4.2' + testImplementation project(path: ':bramble-core', configuration: 'default') + testImplementation project(path: ':bramble-core', configuration: 'testOutput') + testImplementation project(path: ':bramble-api', configuration: 'testOutput') + testImplementation 'net.jodah:concurrentunit:0.4.2' + testImplementation 'junit:junit:4.12' + testImplementation "org.jmock:jmock:2.8.2" + testImplementation "org.jmock:jmock-junit4:2.8.2" + testImplementation "org.jmock:jmock-legacy:2.8.2" + testImplementation "org.hamcrest:hamcrest-library:1.3" + testImplementation "org.hamcrest:hamcrest-core:1.3" testApt 'com.google.dagger:dagger-compiler:2.0.2' }