gradle: Fix Gradle 6 warnings
Most of these are easy "replace X with Y."
The CreateStartScripts changes were because the scripts were being included in
the output zip/tar multiple times. The was because they were all using the same
output directory, and the entire output directory was being included for each.
The output directory tmp/ was particularly poor because other tasks were
dumping things into it, so our zip/tar was including those junk files as well.
diff --git a/benchmarks/build.gradle b/benchmarks/build.gradle
index b3137ca..b653a9d 100644
--- a/benchmarks/build.gradle
+++ b/benchmarks/build.gradle
@@ -60,7 +60,7 @@
defaultJvmOpts = [
"-javaagent:" + configurations.alpnagent.asPath
].plus(vmArgs)
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
@@ -70,14 +70,14 @@
defaultJvmOpts = [
"-javaagent:" + configurations.alpnagent.asPath
].plus(vmArgs)
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
task qps_server(type: CreateStartScripts) {
mainClassName = "io.grpc.benchmarks.qps.AsyncServer"
applicationName = "qps_server"
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
@@ -87,7 +87,7 @@
defaultJvmOpts = [
"-javaagent:" + configurations.alpnagent.asPath
].plus(vmArgs)
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
diff --git a/build.gradle b/build.gradle
index 083475b..aaf4794 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,7 +10,6 @@
subprojects {
apply plugin: "checkstyle"
- apply plugin: "maven"
apply plugin: "idea"
apply plugin: "signing"
apply plugin: "jacoco"
@@ -286,7 +285,7 @@
jacoco { toolVersion = "0.8.2" }
checkstyle {
- configDir = file("$rootDir/buildscripts")
+ configDirectory = file("$rootDir/buildscripts")
toolVersion = "6.17"
ignoreFailures = false
if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
@@ -315,7 +314,7 @@
targetCompatibility = 1.7
dependencies {
- testCompile libraries.junit,
+ testImplementation libraries.junit,
libraries.mockito,
libraries.truth
}
diff --git a/gae-interop-testing/gae-jdk8/build.gradle b/gae-interop-testing/gae-jdk8/build.gradle
index 5991b20..8ed1bc5 100644
--- a/gae-interop-testing/gae-jdk8/build.gradle
+++ b/gae-interop-testing/gae-jdk8/build.gradle
@@ -20,7 +20,7 @@
url "https://maven-central.storage-download.googleapis.com/maven2/" }
}
dependencies {
- classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.5'
+ classpath 'com.google.cloud.tools:appengine-gradle-plugin:2.3.0'
classpath 'com.squareup.okhttp:okhttp:2.7.4'
}
}
@@ -75,6 +75,7 @@
deploy {
// deploy configuration
+ projectId = 'GCLOUD_CONFIG'
// default - stop the current version
stopPreviousVersion = System.getProperty('gaeStopPreviousVersion') ?: true
// default - do not make this the promoted version
diff --git a/interop-testing/build.gradle b/interop-testing/build.gradle
index 5f529c6..c4ddcc5 100644
--- a/interop-testing/build.gradle
+++ b/interop-testing/build.gradle
@@ -63,7 +63,7 @@
defaultJvmOpts = [
"-javaagent:JAVAAGENT_APP_HOME" + configurations.alpnagent.singleFile.name
]
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
doLast {
unixScript.text = unixScript.text.replace('JAVAAGENT_APP_HOME', '\$APP_HOME/lib/')
@@ -74,21 +74,21 @@
task test_server(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.TestServiceServer"
applicationName = "test-server"
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
task reconnect_test_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.ReconnectTestClient"
applicationName = "reconnect-test-client"
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
task stresstest_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.StressTestClient"
applicationName = "stresstest-client"
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
defaultJvmOpts = [
"-verbose:gc",
@@ -99,14 +99,14 @@
task http2_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.Http2Client"
applicationName = "http2-client"
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
task grpclb_long_lived_affinity_test_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.GrpclbLongLivedAffinityTestClient"
applicationName = "grpclb-long-lived-affinity-test-client"
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
defaultJvmOpts = [
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
@@ -116,8 +116,8 @@
task grpclb_fallback_test_client (type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.GrpclbFallbackTestClient"
applicationName = "grpclb-fallback-test-client"
- outputDir = new File(project.buildDir, 'tmp')
- classpath = jar.outputs.files + configurations.runtime
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
+ classpath = startScripts.classpath
defaultJvmOpts = [
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
]
@@ -126,14 +126,14 @@
task xds_test_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.XdsTestClient"
applicationName = "xds-test-client"
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
task xds_test_server(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.XdsTestServer"
applicationName = "xds-test-server"
- outputDir = new File(project.buildDir, 'tmp')
+ outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
diff --git a/settings.gradle b/settings.gradle
index 2891d91..9592c7e 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -9,7 +9,7 @@
id "digital.wup.android-maven-publish" version "3.6.2"
id "me.champeau.gradle.japicmp" version "0.2.5"
id "me.champeau.gradle.jmh" version "0.5.0"
- id "net.ltgt.errorprone" version "0.8.1"
+ id "net.ltgt.errorprone" version "1.2.1"
id "ru.vyarus.animalsniffer" version "1.5.0"
}
resolutionStrategy {
diff --git a/testing-proto/build.gradle b/testing-proto/build.gradle
index 145ded4..f12fe92 100644
--- a/testing-proto/build.gradle
+++ b/testing-proto/build.gradle
@@ -12,7 +12,7 @@
project(':grpc-stub')
compileOnly libraries.javax_annotation
testImplementation libraries.truth
- testRuntime libraries.javax_annotation
+ testRuntimeOnly libraries.javax_annotation
}
configureProtoCompilation()