Skip to content

Commit

Permalink
Update Gradle to 5.5 (#136)
Browse files Browse the repository at this point in the history
* Update Gradle to 5.5

* Add missing `testAnnotationProcessor`

* inherit test framework in rerun
  • Loading branch information
bsideup committed Jul 11, 2019
1 parent ffd47b5 commit f1f428e
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 27 deletions.
2 changes: 2 additions & 0 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ sourceCompatibility = targetCompatibility = 8

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

compile 'org.reactivestreams:reactive-streams'

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testCompile 'junit:junit'
testCompile 'org.assertj:assertj-core'
}
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'org.springframework.boot'

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

compile project(":api")
compile project(":protocol")
Expand All @@ -15,6 +16,7 @@ dependencies {
compile 'io.rsocket:rsocket-transport-netty'

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'org.assertj:assertj-core'
testCompile 'org.awaitility:awaitility'
Expand Down
1 change: 1 addition & 0 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ sourceCompatibility = targetCompatibility = 8

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

compile project(":protocol")

Expand Down
1 change: 1 addition & 0 deletions examples/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ repositories {

dependencies {
compileOnly 'org.projectlombok:lombok:1.18.8'
annotationProcessor 'org.projectlombok:lombok:1.18.8'

compile 'org.testcontainers:kafka:1.11.4'

Expand Down
2 changes: 2 additions & 0 deletions examples/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ dependencyManagement {

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly "com.google.auto.service:auto-service"
annotationProcessor "com.google.auto.service:auto-service"

compileOnly "com.github.bsideup.liiklus:api"
compileOnly 'org.springframework.boot:spring-boot-starter'
Expand Down
52 changes: 28 additions & 24 deletions gradle/rerunTests.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
tasks.withType(Test) {
if (name.endsWith("Rerun")) {
// Avoid recursion
return
}
project.afterEvaluate {
tasks.withType(Test) { originalTask ->
if (name.endsWith("Rerun")) {
// Avoid recursion
return
}

def rerunTask = tasks.register("${name}Rerun", Test) {
// Enabled only when there are failures (see `afterTest`)
enabled = false
failFast = true // ¯\_(ツ)_/¯
outputs.upToDateWhen { false }

def rerunTask = tasks.register("${name}Rerun", Test) {
// Enabled only when there are failures (see `afterTest`)
enabled = false
failFast = true // ¯\_(ツ)_/¯
outputs.upToDateWhen { false }
beforeTest { desc -> logger.warn("Re-running ${desc.className}.${desc.name}") }

beforeTest { desc -> logger.warn("Re-running ${desc.className}.${desc.name}") }
useTestFramework(originalTask.getTestFramework())

testLogging {
displayGranularity 1
showStackTraces = true
exceptionFormat = 'full'
events "STARTED", "PASSED", "FAILED", "SKIPPED"
testLogging {
displayGranularity 1
showStackTraces = true
exceptionFormat = 'full'
events "STARTED", "PASSED", "FAILED", "SKIPPED"
}
}
}

ignoreFailures = true
finalizedBy(rerunTask)
ignoreFailures = true
finalizedBy(rerunTask)

afterTest { desc, result ->
if (TestResult.ResultType.FAILURE == result.resultType) {
rerunTask.configure {
enabled = true
filter.includeTestsMatching("${desc.className}.${desc.name}")
afterTest { desc, result ->
if (TestResult.ResultType.FAILURE == result.resultType) {
rerunTask.configure {
enabled = true
filter.includeTestsMatching("${desc.className}.${desc.name}")
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\:https://services.gradle.org/distributions/gradle-5.5-all.zip
2 changes: 2 additions & 0 deletions plugins/dynamodb-positions-storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jar {

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'com.google.auto.service:auto-service'

compileOnly 'org.springframework.boot:spring-boot-starter'
Expand All @@ -30,6 +31,7 @@ dependencies {
}

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testCompile project(":tck")
testCompile 'org.testcontainers:localstack'
Expand Down
3 changes: 3 additions & 0 deletions plugins/inmemory-positions-storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ jar {

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'com.google.auto.service:auto-service'
annotationProcessor 'com.google.auto.service:auto-service'

compileOnly 'org.springframework.boot:spring-boot-starter'
compileOnly project(":api")
compileOnly 'io.projectreactor:reactor-core'

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testCompile project(":tck")
}
3 changes: 3 additions & 0 deletions plugins/inmemory-records-storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ jar {

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'com.google.auto.service:auto-service'
annotationProcessor 'com.google.auto.service:auto-service'

compileOnly 'org.springframework.boot:spring-boot-starter'
compileOnly 'org.springframework.boot:spring-boot-starter-validation'
compileOnly project(":api")
compileOnly 'io.projectreactor:reactor-core'

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'

testCompile project(":tck")
Expand Down
3 changes: 3 additions & 0 deletions plugins/kafka-records-storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jar {

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'com.google.auto.service:auto-service'
annotationProcessor 'com.google.auto.service:auto-service'

compileOnly 'org.springframework.boot:spring-boot-starter'
compileOnly 'org.springframework.boot:spring-boot-starter-validation'
Expand All @@ -29,6 +31,7 @@ dependencies {
}

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'

testCompile project(":tck")
Expand Down
3 changes: 3 additions & 0 deletions plugins/pulsar-records-storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jar {

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'com.google.auto.service:auto-service'
annotationProcessor 'com.google.auto.service:auto-service'

compileOnly 'org.springframework.boot:spring-boot-starter'
compileOnly 'org.springframework.boot:spring-boot-starter-validation'
Expand All @@ -33,6 +35,7 @@ dependencies {
}

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'

testCompile project(":tck")
Expand Down
3 changes: 3 additions & 0 deletions plugins/schema/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jar {

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'com.google.auto.service:auto-service'
testAnnotationProcessor 'com.google.auto.service:auto-service'

compileOnly 'org.springframework.boot:spring-boot-starter'
compileOnly project(":api")
Expand All @@ -31,6 +33,7 @@ dependencies {
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testCompile 'org.junit.jupiter:junit-jupiter-api'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'

Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ include 'protocol'
include 'client'
include 'testing'

include 'examples/java'
include 'examples/plugin'
include 'examples:java'
include 'examples:plugin'

file('plugins').eachDir { dir ->
def projectName = dir.name
Expand Down
1 change: 1 addition & 0 deletions tck/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

compile project(":api")

Expand Down
2 changes: 2 additions & 0 deletions testing/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

compile 'org.testcontainers:testcontainers'
compile 'org.testcontainers:kafka'

testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testCompile 'ch.qos.logback:logback-classic'
testCompile 'org.assertj:assertj-core'
testCompile 'org.awaitility:awaitility'
Expand Down

0 comments on commit f1f428e

Please sign in to comment.