From b4bd5a3d8e89f67d79dc0fbcebaf683829dc8db6 Mon Sep 17 00:00:00 2001 From: Mario Lopez Date: Tue, 27 Nov 2018 15:50:54 -0600 Subject: [PATCH 1/4] Removed Scoverage since it's not compatible with Gradle 5 yet --- build.gradle | 36 ++----------------- .../artifacts/valve/build.gradle | 4 --- repose-aggregator/build.gradle | 13 ------- .../core/repose-core/build.gradle | 9 ----- .../functional-test-framework/build.gradle | 6 ---- 5 files changed, 3 insertions(+), 65 deletions(-) diff --git a/build.gradle b/build.gradle index 845a0f4d318..90e2e22bee2 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,6 @@ buildscript { classpath 'gradle.plugin.org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:1.4.2' classpath 'com.netflix.nebula:nebula-dependency-recommender:4.3.0' classpath 'gradle.plugin.org.openrepose:gradle-jaxb-plugin:2.5.0' - classpath 'gradle.plugin.org.scoverage:gradle-scoverage:2.1.0' classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2' classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:1.0.1' classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.13.1' @@ -127,17 +126,12 @@ subprojects { apply plugin: 'jacoco' apply plugin: 'nebula.maven-publish' apply plugin: 'signing' - apply plugin: 'org.scoverage' dependencies { jaxb "com.sun.xml.bind:jaxb-xjc" jaxb "com.sun.xml.bind:jaxb-impl" jaxb "javax.xml.bind:jaxb-api" jaxb "org.jvnet.jaxb2_commons:jaxb2-basics-ant" - - scoverage "org.scoverage:scalac-scoverage-plugin_$scalaMajDotMin:1.1.0" - scoverage "org.scoverage:scalac-scoverage-runtime_$scalaMajDotMin:1.1.0" - } testSets { @@ -245,29 +239,11 @@ subprojects { compileClasspath += files([sourceSets.generated.java.outputDir]) runtimeClasspath += files([sourceSets.generated.java.outputDir]) } - scoverage { - compileClasspath += configurations.compileOnly - runtimeClasspath += configurations.compileOnly - compileClasspath += files([sourceSets.generated.java.outputDir, sourceSets.main.java.outputDir]) - runtimeClasspath += files([sourceSets.generated.java.outputDir, sourceSets.main.java.outputDir, sourceSets.test.groovy.outputDir]) - } - testScoverage { - compileClasspath += configurations.compileOnly - runtimeClasspath += configurations.compileOnly - compileClasspath += files([sourceSets.generated.java.outputDir, sourceSets.main.java.outputDir]) - runtimeClasspath += files([sourceSets.generated.java.outputDir, - sourceSets.main.java.outputDir, - sourceSets.main.groovy.outputDir, - sourceSets.test.groovy.outputDir, - file("${project.buildDir}/resources/scoverage/") - ]) - } } compileJava.dependsOn compileGeneratedJava compileScala.dependsOn compileGeneratedJava compileIntegrationTestGroovy.dependsOn compileGeneratedJava - testScoverage.dependsOn compileTestGroovy [JavaCompile, ScalaCompile, GroovyCompile].collect { type -> tasks.withType(type) { @@ -283,12 +259,12 @@ subprojects { checkstyle { configFile = file("$rootDir/repose-aggregator/src/config/styles/checkstyle.xml") - sourceSets = sourceSets.matching {it.name != 'generated' && it.name != 'scoverage' && it.name != 'testScoverage'} + sourceSets = sourceSets.matching {it.name != 'generated'} } codenarc { configFile = file("$rootDir/repose-aggregator/src/config/styles/codenarc.xml") - sourceSets = sourceSets.matching {it.name != 'generated' && it.name != 'scoverage' && it.name != 'testScoverage'} + sourceSets = sourceSets.matching {it.name != 'generated'} toolVersion = "1.0" } @@ -311,7 +287,7 @@ subprojects { } exclude "**/*.cfg.xml" exclude "**/log4j2*.xml" - sourceSets = sourceSets.matching {it.name != 'generated' && it.name != 'scoverage' && it.name != 'testScoverage'} + sourceSets = sourceSets.matching {it.name != 'generated'} } //todo: for some reason jacoco freaks when we do clean and build together @@ -420,7 +396,6 @@ subprojects { sonarqube { properties { - property "sonar.scoverage.reportPath", "$buildDir/reports/scoverage/scoverage.xml" property "sonar.jacoco.reportPath", "$buildDir/jacoco/jacocoTest.exec" property "sonar.jacoco.itReportPath", "$buildDir/jacoco/jacocoIntegrationTest.exec" } @@ -447,11 +422,6 @@ subprojects { } } - // Configure the Scoverage test coverage verification - checkScoverage { - minimumRate = minCoverageRatio - } - // Wire in test coverage verification tasks // // Note: To take advantage of Scoverage aggregation, the check dependency on diff --git a/repose-aggregator/artifacts/valve/build.gradle b/repose-aggregator/artifacts/valve/build.gradle index 9bd16ec83d0..880c653cfb6 100644 --- a/repose-aggregator/artifacts/valve/build.gradle +++ b/repose-aggregator/artifacts/valve/build.gradle @@ -36,10 +36,6 @@ processResources { expand(reposeVersion: version, jettyVersion: versionProperties.get('jettyVersion')) } -processScoverageResources { - expand(reposeVersion: version, jettyVersion: versionProperties.get('jettyVersion')) -} - jar { manifest { attributes 'Main-Class': 'org.openrepose.valve.Main' diff --git a/repose-aggregator/build.gradle b/repose-aggregator/build.gradle index 4710fe5a709..e69de29bb2d 100644 --- a/repose-aggregator/build.gradle +++ b/repose-aggregator/build.gradle @@ -1,13 +0,0 @@ -import org.scoverage.ScoverageAggregate - -task aggregateScoverage(type: ScoverageAggregate) - -checkScoverage { - reportDir = file("$buildDir/scoverage-aggregate") -} - -if (project.hasProperty("minCoverageRatio")) { - aggregateScoverage.dependsOn reportScoverage, subprojects.reportScoverage - checkScoverage.dependsOn aggregateScoverage - check.dependsOn checkScoverage -} diff --git a/repose-aggregator/core/repose-core/build.gradle b/repose-aggregator/core/repose-core/build.gradle index 7350adac975..19da0c1b350 100644 --- a/repose-aggregator/core/repose-core/build.gradle +++ b/repose-aggregator/core/repose-core/build.gradle @@ -99,24 +99,15 @@ task copyEars() { } test.dependsOn copyEars -testScoverage.dependsOn copyEars processResources { expand(reposeVersion: version, reposeVersionName: reposeCodename) } -processScoverageResources { - expand(reposeVersion: version, reposeVersionName: reposeCodename) -} - processTestResources { expand(earDirectory: copyEars.outputDir, earVersion: version) } -processTestScoverageResources { - expand(earDirectory: copyEars.outputDir, earVersion: version) -} - license { excludes(["**/log4j2.component.properties", "**/test.properties", "**/log4j2-List2.json", "**/log4j2-List1.yaml", "**/log4j2-List1.json", "**/log4j2-List2.yaml"]) diff --git a/repose-aggregator/tests/functional-test-framework/build.gradle b/repose-aggregator/tests/functional-test-framework/build.gradle index 0f2b85e01d6..83b50ae2e2c 100644 --- a/repose-aggregator/tests/functional-test-framework/build.gradle +++ b/repose-aggregator/tests/functional-test-framework/build.gradle @@ -20,12 +20,6 @@ processResources { ) } -processScoverageResources { - expand( - version: version, - ) -} - license { excludes(['**/credentials.xsd', '**/atom.xsd', '**/xml.xsd']) } From abb129d422f94b09d0ff872313b0a24574fdcb84 Mon Sep 17 00:00:00 2001 From: Mario Lopez Date: Tue, 27 Nov 2018 15:51:35 -0600 Subject: [PATCH 2/4] Upgraded to Gradle 5 --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- .../http-client-service/http-client-service-api/build.gradle | 2 ++ repose-aggregator/core/repose-core-api/build.gradle | 2 ++ repose-aggregator/core/repose-core/build.gradle | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 90e2e22bee2..6245d8cdf92 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { classpath 'gradle.plugin.org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:1.4.2' classpath 'com.netflix.nebula:nebula-dependency-recommender:4.3.0' classpath 'gradle.plugin.org.openrepose:gradle-jaxb-plugin:2.5.0' - classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2' + classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3' classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:1.0.1' classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.13.1' classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.4' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 115e6ac0aab..75b8c7c8c67 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/repose-aggregator/components/services/http-client-service/http-client-service-api/build.gradle b/repose-aggregator/components/services/http-client-service/http-client-service-api/build.gradle index fcd12ca884b..852d87296d3 100644 --- a/repose-aggregator/components/services/http-client-service/http-client-service-api/build.gradle +++ b/repose-aggregator/components/services/http-client-service/http-client-service-api/build.gradle @@ -1,4 +1,6 @@ dependencies { + annotationProcessor 'org.projectlombok:lombok' + compile "org.apache.httpcomponents:httpclient" compile "org.slf4j:jcl-over-slf4j" diff --git a/repose-aggregator/core/repose-core-api/build.gradle b/repose-aggregator/core/repose-core-api/build.gradle index 34acf77d03c..678b2a48be6 100644 --- a/repose-aggregator/core/repose-core-api/build.gradle +++ b/repose-aggregator/core/repose-core-api/build.gradle @@ -1,6 +1,8 @@ import org.apache.tools.ant.filters.ReplaceTokens dependencies { + annotationProcessor 'org.projectlombok:lombok' + compile project(":repose-aggregator:commons:commons-utilities") compile "io.dropwizard.metrics:metrics-core" compile "org.scala-lang:scala-library" diff --git a/repose-aggregator/core/repose-core/build.gradle b/repose-aggregator/core/repose-core/build.gradle index 19da0c1b350..e122b9f1e4e 100644 --- a/repose-aggregator/core/repose-core/build.gradle +++ b/repose-aggregator/core/repose-core/build.gradle @@ -75,7 +75,7 @@ dependencies { sourceSets.main.scala.srcDir "src/main/java" sourceSets.main.java.srcDirs = [] -sourceSets.test.compileClasspath.add(project.files([sourceSets.test.scala.outputDir])) +sourceSets.test.compileClasspath = project.files([sourceSets.test.scala.outputDir]).from(sourceSets.test.compileClasspath) compileTestGroovy.dependsOn compileTestScala From 7bec650aa10f99a43cb308c33ee639dd2ac96bfa Mon Sep 17 00:00:00 2001 From: Mario Lopez Date: Tue, 27 Nov 2018 15:52:05 -0600 Subject: [PATCH 3/4] Upgraded Lombok version (1.18.2 -> 1.18.4) --- versions.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.properties b/versions.properties index b770d470f2c..7fe130de1a7 100644 --- a/versions.properties +++ b/versions.properties @@ -95,7 +95,7 @@ org.luaj:luaj-jse=3.0.1 mockitoVersion=1.9.5 org.mockito:mockito-core=$mockitoVersion org.openrepose:http-delegation=4.0.0 -org.projectlombok:lombok=1.18.2 +org.projectlombok:lombok=1.18.4 org.python:jython-standalone=2.7.0 org.rackspace:deproxy=0.21 org.scala-lang:scala-library=2.11.12 From d06bab4ba44877c8c6891376c0f7d6ed258ef7f8 Mon Sep 17 00:00:00 2001 From: Mario Lopez Date: Thu, 29 Nov 2018 09:33:55 -0600 Subject: [PATCH 4/4] Increasing Gradle memory size during build --- gradle.properties | 1 + 1 file changed, 1 insertion(+) create mode 100644 gradle.properties diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000000..0f42aa198a2 --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m