mirror of https://github.com/grpc/grpc-java.git
Swap to Gradle's Plugin DSL for much of build
Examples and android projects were left unchanged. They can be changed later. No plugin versions were changed, to make this as non-functional of a change as possible. Upgrading Gradle to 5.6 was necessary for pluginManagement in settings.gradle.
This commit is contained in:
parent
cf3e2c4ef1
commit
3c3a823a81
|
|
@ -1,15 +1,9 @@
|
||||||
apply plugin: 'com.github.kt3k.coveralls'
|
plugins {
|
||||||
|
id "com.github.kt3k.coveralls"
|
||||||
|
}
|
||||||
|
|
||||||
description = "gRPC: All"
|
description = "gRPC: All"
|
||||||
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
}
|
|
||||||
dependencies { classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1' }
|
|
||||||
}
|
|
||||||
|
|
||||||
def subprojects = [
|
def subprojects = [
|
||||||
project(':grpc-api'),
|
project(':grpc-api'),
|
||||||
project(':grpc-auth'),
|
project(':grpc-auth'),
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,13 @@
|
||||||
buildscript {
|
plugins {
|
||||||
repositories { jcenter() }
|
id "com.github.johnrengelman.shadow"
|
||||||
dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4' }
|
id "com.google.protobuf"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
|
||||||
|
|
||||||
description = "gRPC: ALTS"
|
description = "gRPC: ALTS"
|
||||||
|
|
||||||
sourceCompatibility = 1.7
|
sourceCompatibility = 1.7
|
||||||
targetCompatibility = 1.7
|
targetCompatibility = 1.7
|
||||||
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':grpc-auth'),
|
compile project(':grpc-auth'),
|
||||||
project(':grpc-core'),
|
project(':grpc-core'),
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,8 @@
|
||||||
buildscript {
|
plugins {
|
||||||
repositories {
|
id "application"
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'application'
|
id "com.google.protobuf"
|
||||||
|
}
|
||||||
|
|
||||||
description = "grpc Benchmarks"
|
description = "grpc Benchmarks"
|
||||||
|
|
||||||
|
|
|
||||||
20
build.gradle
20
build.gradle
|
|
@ -1,15 +1,9 @@
|
||||||
buildscript {
|
plugins {
|
||||||
repositories {
|
id "com.google.osdetector" apply false
|
||||||
mavenLocal()
|
id "me.champeau.gradle.japicmp" apply false
|
||||||
maven { url "https://plugins.gradle.org/m2/" }
|
id "me.champeau.gradle.jmh" apply false
|
||||||
}
|
id "net.ltgt.errorprone" apply false
|
||||||
dependencies {
|
id "ru.vyarus.animalsniffer" apply false
|
||||||
classpath 'com.google.gradle:osdetector-gradle-plugin:1.4.0'
|
|
||||||
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.5.0'
|
|
||||||
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.8.1'
|
|
||||||
classpath "me.champeau.gradle:jmh-gradle-plugin:0.4.5"
|
|
||||||
classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.2.5'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
import net.ltgt.gradle.errorprone.CheckSeverity
|
import net.ltgt.gradle.errorprone.CheckSeverity
|
||||||
|
|
@ -115,7 +109,6 @@ subprojects {
|
||||||
|
|
||||||
configureProtoCompilation = {
|
configureProtoCompilation = {
|
||||||
String generatedSourcePath = "${projectDir}/src/generated"
|
String generatedSourcePath = "${projectDir}/src/generated"
|
||||||
project.apply plugin: 'com.google.protobuf'
|
|
||||||
project.protobuf {
|
project.protobuf {
|
||||||
protoc {
|
protoc {
|
||||||
if (project.hasProperty('protoc')) {
|
if (project.hasProperty('protoc')) {
|
||||||
|
|
@ -205,7 +198,6 @@ subprojects {
|
||||||
protobuf: "com.google.protobuf:protobuf-java:${protobufVersion}",
|
protobuf: "com.google.protobuf:protobuf-java:${protobufVersion}",
|
||||||
protobuf_lite: "com.google.protobuf:protobuf-lite:3.0.1",
|
protobuf_lite: "com.google.protobuf:protobuf-lite:3.0.1",
|
||||||
protoc_lite: "com.google.protobuf:protoc-gen-javalite:3.0.0",
|
protoc_lite: "com.google.protobuf:protoc-gen-javalite:3.0.0",
|
||||||
protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.8.8',
|
|
||||||
protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}",
|
protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}",
|
||||||
lang: "org.apache.commons:commons-lang3:3.5",
|
lang: "org.apache.commons:commons-lang3:3.5",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,11 @@
|
||||||
apply plugin: "cpp"
|
plugins {
|
||||||
apply plugin: "com.google.protobuf"
|
id "cpp"
|
||||||
|
|
||||||
|
id "com.google.protobuf"
|
||||||
|
}
|
||||||
|
|
||||||
description = 'The protoc plugin for gRPC Java'
|
description = 'The protoc plugin for gRPC Java'
|
||||||
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
|
||||||
|
|
||||||
def artifactStagingPath = "$buildDir/artifacts" as File
|
def artifactStagingPath = "$buildDir/artifacts" as File
|
||||||
// Adds space-delimited arguments from the environment variable env to the
|
// Adds space-delimited arguments from the environment variable env to the
|
||||||
// argList.
|
// argList.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
description = 'gRPC: gae interop testing (jdk8)'
|
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
// Configuration for building
|
// Configuration for building
|
||||||
|
|
@ -26,6 +25,13 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "java"
|
||||||
|
id "war"
|
||||||
|
}
|
||||||
|
|
||||||
|
description = 'gRPC: gae interop testing (jdk8)'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// repositories for Jar's you access in your code
|
// repositories for Jar's you access in your code
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
|
@ -34,8 +40,6 @@ repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java' // standard Java tasks
|
|
||||||
apply plugin: 'war' // standard Web Archive plugin
|
|
||||||
apply plugin: 'com.google.cloud.tools.appengine' // App Engine tasks
|
apply plugin: 'com.google.cloud.tools.appengine' // App Engine tasks
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
description = "gRPC: GRPCLB LoadBalancer plugin"
|
plugins {
|
||||||
|
id "com.google.protobuf"
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
description = "gRPC: GRPCLB LoadBalancer plugin"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':grpc-core'),
|
compile project(':grpc-core'),
|
||||||
project(':grpc-protobuf'),
|
project(':grpc-protobuf'),
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,12 @@
|
||||||
apply plugin: 'application'
|
plugins {
|
||||||
|
id "application"
|
||||||
|
|
||||||
|
id "com.google.protobuf"
|
||||||
|
}
|
||||||
|
|
||||||
description = "gRPC: Integration Testing"
|
description = "gRPC: Integration Testing"
|
||||||
startScripts.enabled = false
|
startScripts.enabled = false
|
||||||
|
|
||||||
// Add dependency on the protobuf plugin
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':grpc-alts'),
|
compile project(':grpc-alts'),
|
||||||
project(':grpc-auth'),
|
project(':grpc-auth'),
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
buildscript {
|
plugins {
|
||||||
repositories { jcenter() }
|
id "com.github.johnrengelman.shadow"
|
||||||
dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4' }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
|
||||||
|
|
||||||
description = "gRPC: Netty Shaded"
|
description = "gRPC: Netty Shaded"
|
||||||
|
|
||||||
sourceSets { testShadow {} }
|
sourceSets { testShadow {} }
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,7 @@
|
||||||
buildscript {
|
plugins {
|
||||||
repositories {
|
id "com.google.protobuf"
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.google.protobuf'
|
|
||||||
|
|
||||||
description = 'gRPC: Protobuf Lite'
|
description = 'gRPC: Protobuf Lite'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
description = 'gRPC: Protobuf'
|
plugins {
|
||||||
|
id "com.google.protobuf"
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
description = 'gRPC: Protobuf'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':grpc-api'),
|
compile project(':grpc-api'),
|
||||||
libraries.protobuf
|
libraries.protobuf
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
// Add dependency on the protobuf plugin
|
plugins {
|
||||||
buildscript {
|
id "com.google.protobuf"
|
||||||
repositories {
|
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
description = "gRPC: Services"
|
description = "gRPC: Services"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,16 @@
|
||||||
|
pluginManagement {
|
||||||
|
plugins {
|
||||||
|
id "com.github.johnrengelman.shadow" version "2.0.4"
|
||||||
|
id "com.github.kt3k.coveralls" version "2.0.1"
|
||||||
|
id "com.google.osdetector" version "1.4.0"
|
||||||
|
id "com.google.protobuf" version "0.8.8"
|
||||||
|
id "me.champeau.gradle.japicmp" version "0.2.5"
|
||||||
|
id "me.champeau.gradle.jmh" version "0.4.5"
|
||||||
|
id "net.ltgt.errorprone" version "0.8.1"
|
||||||
|
id "ru.vyarus.animalsniffer" version "1.5.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rootProject.name = "grpc"
|
rootProject.name = "grpc"
|
||||||
include ":grpc-api"
|
include ":grpc-api"
|
||||||
include ":grpc-core"
|
include ":grpc-core"
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,9 @@
|
||||||
description = "gRPC: Testing Protos"
|
plugins {
|
||||||
|
id "com.google.protobuf"
|
||||||
// Add dependency on the protobuf plugin
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
}
|
|
||||||
dependencies { classpath libraries.protobuf_plugin }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
description = "gRPC: Testing Protos"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':grpc-protobuf'),
|
compile project(':grpc-protobuf'),
|
||||||
project(':grpc-stub')
|
project(':grpc-stub')
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,8 @@
|
||||||
// Add dependency on the protobuf plugin
|
plugins {
|
||||||
buildscript {
|
id "com.github.johnrengelman.shadow"
|
||||||
repositories {
|
id "com.google.protobuf"
|
||||||
maven { // The google mirror is less flaky than mavenCentral()
|
|
||||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath libraries.protobuf_plugin
|
|
||||||
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
|
||||||
|
|
||||||
description = "gRPC: XDS plugin"
|
description = "gRPC: XDS plugin"
|
||||||
|
|
||||||
[compileJava].each() {
|
[compileJava].each() {
|
||||||
|
|
@ -42,7 +32,6 @@ dependencies {
|
||||||
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.google.protobuf'
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
proto {
|
proto {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue