From a44f0209d65a8617e89e721667432944ee3e3a73 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Fri, 28 Dec 2018 16:29:28 +0100 Subject: [PATCH 1/5] Add links to other public javadoc pages --- build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle b/build.gradle index c2edaac0b..2806f6b95 100644 --- a/build.gradle +++ b/build.gradle @@ -92,6 +92,16 @@ allprojects { } } + tasks.withType(Javadoc) { + def links = [ + 'https://docs.oracle.com/javase/8/docs/api/', + 'https://grpc.io/grpc-java/javadoc/', + 'https://docs.spring.io/spring-framework/docs/5.0.9.RELEASE/javadoc-api/', + 'https://docs.spring.io/spring-security/site/docs/5.0.9.RELEASE/api/' + ]; + options.setLinks(links) + } + // Copy LICENSE tasks.withType(Jar) { from(project.rootDir) { From 9778bc3578a10e91c282b6e630927bf6dbd3e330 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Wed, 2 Jan 2019 21:38:51 +0100 Subject: [PATCH 2/5] Use version property for javadoc links and update to latest spring patch --- build.gradle | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 2806f6b95..2695a5c95 100644 --- a/build.gradle +++ b/build.gradle @@ -15,10 +15,11 @@ buildscript { grpcVersion = '1.17.1' protobufVersion = '3.6.1' protobufGradlePluginVersion = '0.8.7' - nettyTCNativeVersion = '2.0.17.Final' + nettyTCNativeVersion = '2.0.17.Final' // Needs to be compatbile with the 'grpcVersion' - springBootVersion = '2.0.6.RELEASE' - springSecurityVersion = '5.0.9.RELEASE' + springBootVersion = '2.0.7.RELEASE' + springVersion = '5.0.11.RELEASE' // Based on the version contained in 'springBootVersion' + springSecurityVersion = '5.0.10.RELEASE' springCloudVersion = 'Finchley.SR2' springCloudSleuthVersion = '2.0.2.RELEASE' springCloudConsulVersion = '2.0.1.RELEASE' @@ -96,8 +97,8 @@ allprojects { def links = [ 'https://docs.oracle.com/javase/8/docs/api/', 'https://grpc.io/grpc-java/javadoc/', - 'https://docs.spring.io/spring-framework/docs/5.0.9.RELEASE/javadoc-api/', - 'https://docs.spring.io/spring-security/site/docs/5.0.9.RELEASE/api/' + 'https://docs.spring.io/spring-framework/docs/' + springVersion + '/javadoc-api/', + 'https://docs.spring.io/spring-security/site/docs/' + springSecurityVersion + '/api/' ]; options.setLinks(links) } From f32fab838dadc1b19ac2c12725d9a6817353d9c6 Mon Sep 17 00:00:00 2001 From: MichaelZhang Date: Thu, 3 Jan 2019 22:34:38 +0800 Subject: [PATCH 3/5] Use dependency manager to simplify dependency versions --- build.gradle | 19 +++++++++++++------ .../build.gradle | 14 +++++++------- grpc-common-spring-boot/build.gradle | 10 +++++----- .../build.gradle | 18 +++++++++--------- 4 files changed, 34 insertions(+), 27 deletions(-) diff --git a/build.gradle b/build.gradle index 2695a5c95..27b4c2b3d 100644 --- a/build.gradle +++ b/build.gradle @@ -18,12 +18,7 @@ buildscript { nettyTCNativeVersion = '2.0.17.Final' // Needs to be compatbile with the 'grpcVersion' springBootVersion = '2.0.7.RELEASE' - springVersion = '5.0.11.RELEASE' // Based on the version contained in 'springBootVersion' - springSecurityVersion = '5.0.10.RELEASE' springCloudVersion = 'Finchley.SR2' - springCloudSleuthVersion = '2.0.2.RELEASE' - springCloudConsulVersion = '2.0.1.RELEASE' - springCloudEurekaVersion = '2.0.2.RELEASE' braveInstrumentationGrpc = '5.5.0' jUnitVersion = '5.3.1' @@ -97,7 +92,7 @@ allprojects { def links = [ 'https://docs.oracle.com/javase/8/docs/api/', 'https://grpc.io/grpc-java/javadoc/', - 'https://docs.spring.io/spring-framework/docs/' + springVersion + '/javadoc-api/', + 'https://docs.spring.io/spring-framework/docs/' + springFrameworkVersion + '/javadoc-api/', 'https://docs.spring.io/spring-security/site/docs/' + springSecurityVersion + '/api/' ]; options.setLinks(links) @@ -155,6 +150,18 @@ allprojects { maven { url 'http://repo.spring.io/plugins-release' } maven { url "https://plugins.gradle.org/m2/" } } + + dependencyManagement { + imports { + mavenBom "org.springframework.boot:spring-boot-starter-parent:${springBootVersion}" + mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" + } + } + + ext { + springFrameworkVersion = dependencyManagement.importedProperties['spring.version'] + springSecurityVersion = dependencyManagement.importedProperties['spring-security.version'] + } } } diff --git a/grpc-client-spring-boot-autoconfigure/build.gradle b/grpc-client-spring-boot-autoconfigure/build.gradle index 1d40bea4e..d865bcd21 100644 --- a/grpc-client-spring-boot-autoconfigure/build.gradle +++ b/grpc-client-spring-boot-autoconfigure/build.gradle @@ -6,15 +6,15 @@ version = "${projectVersion}" compileJava.dependsOn(processResources) dependencies { - annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor:${springBootVersion}") - annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}") + annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor") + annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") compile project(':grpc-common-spring-boot') - compile("org.springframework.boot:spring-boot-starter:${springBootVersion}") - compileOnly("org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}") - compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth:${springCloudSleuthVersion}") - compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery:${springCloudConsulVersion}") - compileOnly("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:${springCloudEurekaVersion}") + compile("org.springframework.boot:spring-boot-starter") + compileOnly("org.springframework.boot:spring-boot-starter-actuator") + compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth") + compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery") + compileOnly("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client") compileOnly("io.zipkin.brave:brave-instrumentation-grpc:${braveInstrumentationGrpc}") compileOnly("javax.inject:javax.inject:1") compile("io.grpc:grpc-netty:${grpcVersion}") diff --git a/grpc-common-spring-boot/build.gradle b/grpc-common-spring-boot/build.gradle index 12e55995f..7062b6123 100644 --- a/grpc-common-spring-boot/build.gradle +++ b/grpc-common-spring-boot/build.gradle @@ -6,12 +6,12 @@ version = "${projectVersion}" compileJava.dependsOn(processResources) dependencies { - annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor:${springBootVersion}") + annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor") - compile("org.springframework.boot:spring-boot-starter:${springBootVersion}") - compileOnly("org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}") - compile("io.grpc:grpc-core:${grpcVersion}") + compile("org.springframework.boot:spring-boot-starter") + compileOnly("org.springframework.boot:spring-boot-starter-actuator") + compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth") - compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth:${springCloudSleuthVersion}") + compile("io.grpc:grpc-core:${grpcVersion}") compileOnly("io.zipkin.brave:brave-instrumentation-grpc:${braveInstrumentationGrpc}") } diff --git a/grpc-server-spring-boot-autoconfigure/build.gradle b/grpc-server-spring-boot-autoconfigure/build.gradle index db74aac70..47fe112ec 100644 --- a/grpc-server-spring-boot-autoconfigure/build.gradle +++ b/grpc-server-spring-boot-autoconfigure/build.gradle @@ -6,17 +6,17 @@ version = "${projectVersion}" compileJava.dependsOn(processResources) dependencies { - annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor:${springBootVersion}") - annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}") + annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor") + annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") compile project(':grpc-common-spring-boot') - compile("org.springframework.boot:spring-boot-starter:${springBootVersion}") - compileOnly("org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}") - compileOnly("org.springframework.security:spring-security-core:${springSecurityVersion}") - compileOnly("org.springframework.security:spring-security-web:${springSecurityVersion}") - compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth:${springCloudSleuthVersion}") - compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery:${springCloudConsulVersion}") - compileOnly("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:${springCloudEurekaVersion}") + compile("org.springframework.boot:spring-boot-starter") + compileOnly("org.springframework.boot:spring-boot-starter-actuator") + compileOnly("org.springframework.security:spring-security-core") + compileOnly("org.springframework.security:spring-security-web") + compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth") + compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery") + compileOnly("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client") compileOnly("com.google.inject:guice:4.2.2") // Only needed to avoid some warnings during compilation (for eureka) compileOnly("io.zipkin.brave:brave-instrumentation-grpc:${braveInstrumentationGrpc}") compile("io.grpc:grpc-netty:${grpcVersion}") From f7c3892f4a035f0ca458ff18da373fff851de642 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Fri, 4 Jan 2019 00:31:37 +0100 Subject: [PATCH 4/5] Move javadoc task setup after property configuration --- build.gradle | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 27b4c2b3d..d1f61e5b1 100644 --- a/build.gradle +++ b/build.gradle @@ -88,16 +88,6 @@ allprojects { } } - tasks.withType(Javadoc) { - def links = [ - 'https://docs.oracle.com/javase/8/docs/api/', - 'https://grpc.io/grpc-java/javadoc/', - 'https://docs.spring.io/spring-framework/docs/' + springFrameworkVersion + '/javadoc-api/', - 'https://docs.spring.io/spring-security/site/docs/' + springSecurityVersion + '/api/' - ]; - options.setLinks(links) - } - // Copy LICENSE tasks.withType(Jar) { from(project.rootDir) { @@ -163,6 +153,17 @@ allprojects { springSecurityVersion = dependencyManagement.importedProperties['spring-security.version'] } } + + tasks.withType(Javadoc) { + def links = [ + 'https://docs.oracle.com/javase/8/docs/api/', + 'https://grpc.io/grpc-java/javadoc/', + 'https://docs.spring.io/spring-framework/docs/' + springFrameworkVersion + '/javadoc-api/', + 'https://docs.spring.io/spring-security/site/docs/' + springSecurityVersion + '/api/' + ]; + options.setLinks(links) + } + } apply from: './deploy.gradle' From 1ad33782dffd80a63407333be7dabdc73b3134e3 Mon Sep 17 00:00:00 2001 From: MichaelZhang Date: Fri, 4 Jan 2019 17:40:36 +0800 Subject: [PATCH 5/5] Only use spring-boot-starter-parent dependency management on Non-example project --- build.gradle | 45 +++++++++++-------- .../build.gradle | 6 +-- grpc-common-spring-boot/build.gradle | 4 +- .../build.gradle | 6 +-- tests/build.gradle | 6 +-- 5 files changed, 37 insertions(+), 30 deletions(-) diff --git a/build.gradle b/build.gradle index d1f61e5b1..5895c667c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,10 @@ buildscript { nettyTCNativeVersion = '2.0.17.Final' // Needs to be compatbile with the 'grpcVersion' springBootVersion = '2.0.7.RELEASE' - springCloudVersion = 'Finchley.SR2' + springCloudVersion = 'Finchley.SR2' // Only used in examples + springCloudSleuthVersion = '2.0.2.RELEASE' + springCloudConsulVersion = '2.0.1.RELEASE' + springCloudEurekaVersion = '2.0.2.RELEASE' braveInstrumentationGrpc = '5.5.0' jUnitVersion = '5.3.1' @@ -140,30 +143,34 @@ allprojects { maven { url 'http://repo.spring.io/plugins-release' } maven { url "https://plugins.gradle.org/m2/" } } + } +} - dependencyManagement { - imports { - mavenBom "org.springframework.boot:spring-boot-starter-parent:${springBootVersion}" - mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" +allprojects { project -> + if (!project.parent || project.parent.name != "examples") { + buildscript { + dependencyManagement { + imports { + mavenBom "org.springframework.boot:spring-boot-starter-parent:${springBootVersion}" + } } - } - ext { - springFrameworkVersion = dependencyManagement.importedProperties['spring.version'] - springSecurityVersion = dependencyManagement.importedProperties['spring-security.version'] + ext { + springFrameworkVersion = dependencyManagement.importedProperties['spring.version'] + springSecurityVersion = dependencyManagement.importedProperties['spring-security.version'] + } } - } - tasks.withType(Javadoc) { - def links = [ - 'https://docs.oracle.com/javase/8/docs/api/', - 'https://grpc.io/grpc-java/javadoc/', - 'https://docs.spring.io/spring-framework/docs/' + springFrameworkVersion + '/javadoc-api/', - 'https://docs.spring.io/spring-security/site/docs/' + springSecurityVersion + '/api/' - ]; - options.setLinks(links) + tasks.withType(Javadoc) { + def links = [ + 'https://docs.oracle.com/javase/8/docs/api/', + 'https://grpc.io/grpc-java/javadoc/', + 'https://docs.spring.io/spring-framework/docs/' + springFrameworkVersion + '/javadoc-api/', + 'https://docs.spring.io/spring-security/site/docs/' + springSecurityVersion + '/api/' + ] + options.setLinks(links) + } } - } apply from: './deploy.gradle' diff --git a/grpc-client-spring-boot-autoconfigure/build.gradle b/grpc-client-spring-boot-autoconfigure/build.gradle index d865bcd21..1f25f8cf5 100644 --- a/grpc-client-spring-boot-autoconfigure/build.gradle +++ b/grpc-client-spring-boot-autoconfigure/build.gradle @@ -12,9 +12,9 @@ dependencies { compile project(':grpc-common-spring-boot') compile("org.springframework.boot:spring-boot-starter") compileOnly("org.springframework.boot:spring-boot-starter-actuator") - compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth") - compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery") - compileOnly("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client") + compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth:${springCloudSleuthVersion}") + compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery:${springCloudConsulVersion}") + compileOnly("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:${springCloudEurekaVersion}") compileOnly("io.zipkin.brave:brave-instrumentation-grpc:${braveInstrumentationGrpc}") compileOnly("javax.inject:javax.inject:1") compile("io.grpc:grpc-netty:${grpcVersion}") diff --git a/grpc-common-spring-boot/build.gradle b/grpc-common-spring-boot/build.gradle index 7062b6123..26486b1f7 100644 --- a/grpc-common-spring-boot/build.gradle +++ b/grpc-common-spring-boot/build.gradle @@ -10,8 +10,8 @@ dependencies { compile("org.springframework.boot:spring-boot-starter") compileOnly("org.springframework.boot:spring-boot-starter-actuator") - compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth") - compile("io.grpc:grpc-core:${grpcVersion}") + + compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth:${springCloudSleuthVersion}") compileOnly("io.zipkin.brave:brave-instrumentation-grpc:${braveInstrumentationGrpc}") } diff --git a/grpc-server-spring-boot-autoconfigure/build.gradle b/grpc-server-spring-boot-autoconfigure/build.gradle index 47fe112ec..4d3092f1a 100644 --- a/grpc-server-spring-boot-autoconfigure/build.gradle +++ b/grpc-server-spring-boot-autoconfigure/build.gradle @@ -14,9 +14,9 @@ dependencies { compileOnly("org.springframework.boot:spring-boot-starter-actuator") compileOnly("org.springframework.security:spring-security-core") compileOnly("org.springframework.security:spring-security-web") - compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth") - compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery") - compileOnly("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client") + compileOnly("org.springframework.cloud:spring-cloud-starter-sleuth:${springCloudSleuthVersion}") + compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery:${springCloudConsulVersion}") + compileOnly("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:${springCloudEurekaVersion}") compileOnly("com.google.inject:guice:4.2.2") // Only needed to avoid some warnings during compilation (for eureka) compileOnly("io.zipkin.brave:brave-instrumentation-grpc:${braveInstrumentationGrpc}") compile("io.grpc:grpc-netty:${grpcVersion}") diff --git a/tests/build.gradle b/tests/build.gradle index cb3eb0179..67b86090c 100644 --- a/tests/build.gradle +++ b/tests/build.gradle @@ -74,9 +74,9 @@ dependencies { } testImplementation( "io.grpc:grpc-testing:${grpcVersion}", - "org.springframework.boot:spring-boot-starter-test:${springBootVersion}", - "org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}", - "org.springframework.security:spring-security-config:${springSecurityVersion}", + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework.security:spring-security-config", "io.netty:netty-tcnative-boringssl-static:${nettyTCNativeVersion}", "org.junit.jupiter:junit-jupiter-api:${jUnitVersion}" )