mirror of https://github.com/grpc/grpc-java.git
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.
This commit is contained in:
parent
96a5c5df57
commit
026673cff5
|
|
@ -60,7 +60,7 @@ task qps_client(type: CreateStartScripts) {
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-javaagent:" + configurations.alpnagent.asPath
|
"-javaagent:" + configurations.alpnagent.asPath
|
||||||
].plus(vmArgs)
|
].plus(vmArgs)
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,14 +70,14 @@ task openloop_client(type: CreateStartScripts) {
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-javaagent:" + configurations.alpnagent.asPath
|
"-javaagent:" + configurations.alpnagent.asPath
|
||||||
].plus(vmArgs)
|
].plus(vmArgs)
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
task qps_server(type: CreateStartScripts) {
|
task qps_server(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.benchmarks.qps.AsyncServer"
|
mainClassName = "io.grpc.benchmarks.qps.AsyncServer"
|
||||||
applicationName = "qps_server"
|
applicationName = "qps_server"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,7 +87,7 @@ task benchmark_worker(type: CreateStartScripts) {
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-javaagent:" + configurations.alpnagent.asPath
|
"-javaagent:" + configurations.alpnagent.asPath
|
||||||
].plus(vmArgs)
|
].plus(vmArgs)
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import net.ltgt.gradle.errorprone.CheckSeverity
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
apply plugin: "checkstyle"
|
apply plugin: "checkstyle"
|
||||||
apply plugin: "maven"
|
|
||||||
apply plugin: "idea"
|
apply plugin: "idea"
|
||||||
apply plugin: "signing"
|
apply plugin: "signing"
|
||||||
apply plugin: "jacoco"
|
apply plugin: "jacoco"
|
||||||
|
|
@ -286,7 +285,7 @@ subprojects {
|
||||||
jacoco { toolVersion = "0.8.2" }
|
jacoco { toolVersion = "0.8.2" }
|
||||||
|
|
||||||
checkstyle {
|
checkstyle {
|
||||||
configDir = file("$rootDir/buildscripts")
|
configDirectory = file("$rootDir/buildscripts")
|
||||||
toolVersion = "6.17"
|
toolVersion = "6.17"
|
||||||
ignoreFailures = false
|
ignoreFailures = false
|
||||||
if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
|
if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
|
||||||
|
|
@ -315,7 +314,7 @@ subprojects {
|
||||||
targetCompatibility = 1.7
|
targetCompatibility = 1.7
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompile libraries.junit,
|
testImplementation libraries.junit,
|
||||||
libraries.mockito,
|
libraries.mockito,
|
||||||
libraries.truth
|
libraries.truth
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ buildscript {
|
||||||
url "https://maven-central.storage-download.googleapis.com/maven2/" }
|
url "https://maven-central.storage-download.googleapis.com/maven2/" }
|
||||||
}
|
}
|
||||||
dependencies {
|
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'
|
classpath 'com.squareup.okhttp:okhttp:2.7.4'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -75,6 +75,7 @@ appengine {
|
||||||
|
|
||||||
deploy {
|
deploy {
|
||||||
// deploy configuration
|
// deploy configuration
|
||||||
|
projectId = 'GCLOUD_CONFIG'
|
||||||
// default - stop the current version
|
// default - stop the current version
|
||||||
stopPreviousVersion = System.getProperty('gaeStopPreviousVersion') ?: true
|
stopPreviousVersion = System.getProperty('gaeStopPreviousVersion') ?: true
|
||||||
// default - do not make this the promoted version
|
// default - do not make this the promoted version
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ task test_client(type: CreateStartScripts) {
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-javaagent:JAVAAGENT_APP_HOME" + configurations.alpnagent.singleFile.name
|
"-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
|
classpath = startScripts.classpath
|
||||||
doLast {
|
doLast {
|
||||||
unixScript.text = unixScript.text.replace('JAVAAGENT_APP_HOME', '\$APP_HOME/lib/')
|
unixScript.text = unixScript.text.replace('JAVAAGENT_APP_HOME', '\$APP_HOME/lib/')
|
||||||
|
|
@ -74,21 +74,21 @@ task test_client(type: CreateStartScripts) {
|
||||||
task test_server(type: CreateStartScripts) {
|
task test_server(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.TestServiceServer"
|
mainClassName = "io.grpc.testing.integration.TestServiceServer"
|
||||||
applicationName = "test-server"
|
applicationName = "test-server"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
task reconnect_test_client(type: CreateStartScripts) {
|
task reconnect_test_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.ReconnectTestClient"
|
mainClassName = "io.grpc.testing.integration.ReconnectTestClient"
|
||||||
applicationName = "reconnect-test-client"
|
applicationName = "reconnect-test-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
task stresstest_client(type: CreateStartScripts) {
|
task stresstest_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.StressTestClient"
|
mainClassName = "io.grpc.testing.integration.StressTestClient"
|
||||||
applicationName = "stresstest-client"
|
applicationName = "stresstest-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-verbose:gc",
|
"-verbose:gc",
|
||||||
|
|
@ -99,14 +99,14 @@ task stresstest_client(type: CreateStartScripts) {
|
||||||
task http2_client(type: CreateStartScripts) {
|
task http2_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.Http2Client"
|
mainClassName = "io.grpc.testing.integration.Http2Client"
|
||||||
applicationName = "http2-client"
|
applicationName = "http2-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
task grpclb_long_lived_affinity_test_client(type: CreateStartScripts) {
|
task grpclb_long_lived_affinity_test_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.GrpclbLongLivedAffinityTestClient"
|
mainClassName = "io.grpc.testing.integration.GrpclbLongLivedAffinityTestClient"
|
||||||
applicationName = "grpclb-long-lived-affinity-test-client"
|
applicationName = "grpclb-long-lived-affinity-test-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
|
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
|
||||||
|
|
@ -116,8 +116,8 @@ task grpclb_long_lived_affinity_test_client(type: CreateStartScripts) {
|
||||||
task grpclb_fallback_test_client (type: CreateStartScripts) {
|
task grpclb_fallback_test_client (type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.GrpclbFallbackTestClient"
|
mainClassName = "io.grpc.testing.integration.GrpclbFallbackTestClient"
|
||||||
applicationName = "grpclb-fallback-test-client"
|
applicationName = "grpclb-fallback-test-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = jar.outputs.files + configurations.runtime
|
classpath = startScripts.classpath
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
|
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
|
||||||
]
|
]
|
||||||
|
|
@ -126,14 +126,14 @@ task grpclb_fallback_test_client (type: CreateStartScripts) {
|
||||||
task xds_test_client(type: CreateStartScripts) {
|
task xds_test_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.XdsTestClient"
|
mainClassName = "io.grpc.testing.integration.XdsTestClient"
|
||||||
applicationName = "xds-test-client"
|
applicationName = "xds-test-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
task xds_test_server(type: CreateStartScripts) {
|
task xds_test_server(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.XdsTestServer"
|
mainClassName = "io.grpc.testing.integration.XdsTestServer"
|
||||||
applicationName = "xds-test-server"
|
applicationName = "xds-test-server"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ pluginManagement {
|
||||||
id "digital.wup.android-maven-publish" version "3.6.2"
|
id "digital.wup.android-maven-publish" version "3.6.2"
|
||||||
id "me.champeau.gradle.japicmp" version "0.2.5"
|
id "me.champeau.gradle.japicmp" version "0.2.5"
|
||||||
id "me.champeau.gradle.jmh" version "0.5.0"
|
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"
|
id "ru.vyarus.animalsniffer" version "1.5.0"
|
||||||
}
|
}
|
||||||
resolutionStrategy {
|
resolutionStrategy {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ dependencies {
|
||||||
project(':grpc-stub')
|
project(':grpc-stub')
|
||||||
compileOnly libraries.javax_annotation
|
compileOnly libraries.javax_annotation
|
||||||
testImplementation libraries.truth
|
testImplementation libraries.truth
|
||||||
testRuntime libraries.javax_annotation
|
testRuntimeOnly libraries.javax_annotation
|
||||||
}
|
}
|
||||||
|
|
||||||
configureProtoCompilation()
|
configureProtoCompilation()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue