Skip to content

Commit 5c51ff4

Browse files
author
Alexander Furer
committed
fixes #227 + errorprone integration
1 parent 26b4944 commit 5c51ff4

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ buildscript {
1111
dependencies {
1212
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0"
1313
classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.4.0"
14+
classpath "net.ltgt.gradle:gradle-errorprone-plugin:${gradleErrorPronePluginVersion}"
1415
}
1516
}
1617

18+
19+
1720
allprojects { pr ->
1821
pr['signing.keyId'] = System.getenv('GPG_ID')
1922
pr['signing.password'] = System.getenv('GPG_PASSWORD')
@@ -42,6 +45,7 @@ subprojects {
4245

4346
apply plugin: 'java'
4447
apply plugin: 'jacoco'
48+
apply plugin: 'net.ltgt.errorprone'
4549

4650

4751
sourceCompatibility = 1.8
@@ -61,9 +65,16 @@ subprojects {
6165

6266
dependencies {
6367
["annotationProcessor", "testAnnotationProcessor", "compileOnly", "testCompileOnly"].each { conf ->
64-
add(conf, "org.projectlombok:lombok:1.18.12")
68+
add(conf, "org.projectlombok:lombok:${lombokVersion}")
6569
}
70+
errorprone("com.google.errorprone:error_prone_core:${errorProneVersion}")
6671
}
72+
tasks.withType(JavaCompile).configureEach {
73+
options.errorprone.disableWarningsInGeneratedCode = true
74+
75+
options.errorprone.enabled = (null != System.getenv("CI"))
76+
77+
}
6778
configurations.all {
6879
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
6980
}

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
grpcVersion=1.38.0
1+
grpcVersion=1.39.0
22
springBootVersion=2.5.0
33
springCloudVersion=2020.0.3
4+
gradleErrorPronePluginVersion=2.0.2
5+
errorProneVersion=2.7.1
6+
lombokVersion=1.18.20
47

58
version=4.5.5-SNAPSHOT
69
group=io.github.lognet

grpc-spring-boot-starter-gradle-plugin/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ grpcSpringBoot {
5353
----
5454
<1> `io.github.lognet:grpc-spring-boot-starter` version to use, defaults to the same version as this plugin.
5555
<2> `grpc` version to use, defaults to the version the `io.github.lognet:grpc-spring-boot-starter` was compiled with (see version matrix https://github.com/LogNet/grpc-spring-boot-starter/blob/master/ReleaseNotes.md[here])
56-
<3> Version of `com.google.protobuf:protoc` protocol compiler to use (defaults to `3.17.1`)
56+
<3> Version of `com.google.protobuf:protoc` protocol compiler to use (defaults to `3.17.2`)
5757

5858

5959
The version of `com.google.protobuf` can be controlled via `pluginManagement` block :

grpc-spring-boot-starter-gradle-plugin/src/main/java/org/lognet/springboot/grpc/gradle/GrpcSpringBootExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public GrpcSpringBootExtension(Project project) {
1919

2020

2121
protocVersion = this.project.getObjects().property(String.class);
22-
protocVersion.set("3.17.1");
22+
protocVersion.set("3.17.2");
2323

2424

2525
}

grpc-spring-boot-starter/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ apply plugin: 'signing'
2727
apply plugin: "de.marcphilipp.nexus-publish"
2828
apply plugin: 'io.franzbecker.gradle-lombok'
2929

30-
31-
3230
configurations{
3331
testCompile {
3432
exclude group: 'io.netty', module: 'netty-tcnative-boringssl-static'
@@ -63,7 +61,13 @@ task generateReleaseNotes(type: JavaExec, group: "documentation") {
6361
}
6462
}
6563
}
64+
65+
lombok {
66+
version = "${lombokVersion}"
67+
}
68+
6669
def delombokOutputDir = file("$buildDir/delombok")
70+
6771
task delombok(type: io.franzbecker.gradle.lombok.task.DelombokTask) {
6872
outputs.dir(delombokOutputDir)
6973
for (srcDir in project.sourceSets.main.java.srcDirs) {

grpc-spring-boot-starter/src/main/java/org/lognet/springboot/grpc/autoconfigure/GRpcAutoConfiguration.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
1414
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
1515
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
16-
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
1716
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
1817
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
1918
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;

0 commit comments

Comments
 (0)