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"
|
||||
|
||||
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 = [
|
||||
project(':grpc-api'),
|
||||
project(':grpc-auth'),
|
||||
|
|
|
|||
|
|
@ -1,23 +1,13 @@
|
|||
buildscript {
|
||||
repositories { jcenter() }
|
||||
dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4' }
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow"
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
description = "gRPC: ALTS"
|
||||
|
||||
sourceCompatibility = 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 {
|
||||
compile project(':grpc-auth'),
|
||||
project(':grpc-core'),
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
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 }
|
||||
}
|
||||
plugins {
|
||||
id "application"
|
||||
|
||||
apply plugin: 'application'
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
description = "grpc Benchmarks"
|
||||
|
||||
|
|
|
|||
20
build.gradle
20
build.gradle
|
|
@ -1,15 +1,9 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
dependencies {
|
||||
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'
|
||||
}
|
||||
plugins {
|
||||
id "com.google.osdetector" apply false
|
||||
id "me.champeau.gradle.japicmp" apply false
|
||||
id "me.champeau.gradle.jmh" apply false
|
||||
id "net.ltgt.errorprone" apply false
|
||||
id "ru.vyarus.animalsniffer" apply false
|
||||
}
|
||||
|
||||
import net.ltgt.gradle.errorprone.CheckSeverity
|
||||
|
|
@ -115,7 +109,6 @@ subprojects {
|
|||
|
||||
configureProtoCompilation = {
|
||||
String generatedSourcePath = "${projectDir}/src/generated"
|
||||
project.apply plugin: 'com.google.protobuf'
|
||||
project.protobuf {
|
||||
protoc {
|
||||
if (project.hasProperty('protoc')) {
|
||||
|
|
@ -205,7 +198,6 @@ subprojects {
|
|||
protobuf: "com.google.protobuf:protobuf-java:${protobufVersion}",
|
||||
protobuf_lite: "com.google.protobuf:protobuf-lite:3.0.1",
|
||||
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}",
|
||||
lang: "org.apache.commons:commons-lang3:3.5",
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
apply plugin: "cpp"
|
||||
apply plugin: "com.google.protobuf"
|
||||
plugins {
|
||||
id "cpp"
|
||||
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
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
|
||||
// Adds space-delimited arguments from the environment variable env to the
|
||||
// argList.
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
description = 'gRPC: gae interop testing (jdk8)'
|
||||
|
||||
buildscript {
|
||||
// Configuration for building
|
||||
|
|
@ -26,6 +25,13 @@ buildscript {
|
|||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "java"
|
||||
id "war"
|
||||
}
|
||||
|
||||
description = 'gRPC: gae interop testing (jdk8)'
|
||||
|
||||
repositories {
|
||||
// repositories for Jar's you access in your code
|
||||
mavenLocal()
|
||||
|
|
@ -34,8 +40,6 @@ repositories {
|
|||
jcenter()
|
||||
}
|
||||
|
||||
apply plugin: 'java' // standard Java tasks
|
||||
apply plugin: 'war' // standard Web Archive plugin
|
||||
apply plugin: 'com.google.cloud.tools.appengine' // App Engine tasks
|
||||
|
||||
dependencies {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
description = "gRPC: GRPCLB LoadBalancer 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 }
|
||||
plugins {
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
description = "gRPC: GRPCLB LoadBalancer plugin"
|
||||
|
||||
dependencies {
|
||||
compile project(':grpc-core'),
|
||||
project(':grpc-protobuf'),
|
||||
|
|
|
|||
|
|
@ -1,17 +1,12 @@
|
|||
apply plugin: 'application'
|
||||
plugins {
|
||||
id "application"
|
||||
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
description = "gRPC: Integration Testing"
|
||||
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 {
|
||||
compile project(':grpc-alts'),
|
||||
project(':grpc-auth'),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
buildscript {
|
||||
repositories { jcenter() }
|
||||
dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4' }
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow"
|
||||
}
|
||||
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
description = "gRPC: Netty Shaded"
|
||||
|
||||
sourceSets { testShadow {} }
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
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 }
|
||||
plugins {
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.protobuf'
|
||||
|
||||
description = 'gRPC: Protobuf Lite'
|
||||
|
||||
dependencies {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
description = 'gRPC: 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 }
|
||||
plugins {
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
description = 'gRPC: Protobuf'
|
||||
|
||||
dependencies {
|
||||
compile project(':grpc-api'),
|
||||
libraries.protobuf
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
// 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 }
|
||||
plugins {
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
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"
|
||||
include ":grpc-api"
|
||||
include ":grpc-core"
|
||||
|
|
|
|||
|
|
@ -1,14 +1,9 @@
|
|||
description = "gRPC: Testing Protos"
|
||||
|
||||
// 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 }
|
||||
plugins {
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
description = "gRPC: Testing Protos"
|
||||
|
||||
dependencies {
|
||||
compile project(':grpc-protobuf'),
|
||||
project(':grpc-stub')
|
||||
|
|
|
|||
|
|
@ -1,18 +1,8 @@
|
|||
// 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/" }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
dependencies {
|
||||
classpath libraries.protobuf_plugin
|
||||
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
|
||||
}
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow"
|
||||
id "com.google.protobuf"
|
||||
}
|
||||
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
description = "gRPC: XDS plugin"
|
||||
|
||||
[compileJava].each() {
|
||||
|
|
@ -42,7 +32,6 @@ dependencies {
|
|||
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.protobuf'
|
||||
sourceSets {
|
||||
main {
|
||||
proto {
|
||||
|
|
|
|||
Loading…
Reference in New Issue