From d93de7f575df14a7c10535ff7abd65bee42c88fa Mon Sep 17 00:00:00 2001 From: Gary Tierney Date: Wed, 17 Jul 2019 05:36:08 +0100 Subject: [PATCH 1/3] Clean-up JaCoCo coverage generation --- azure-pipelines.yml | 2 +- gradle/code-quality.gradle | 4 ++++ gradle/testing.gradle | 18 ++++-------------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2167045f3..2022dfe00 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,7 +29,7 @@ steps: jdkArchitectureOption: 'x64' publishJUnitResults: true testResultsFiles: '**/TEST-*.xml' - tasks: 'check jacocoTestReport sonarqube' + tasks: 'check jacocoReport sonarqube' - script: | ./gradlew --stop diff --git a/gradle/code-quality.gradle b/gradle/code-quality.gradle index 98b7506f2..6f4da429d 100644 --- a/gradle/code-quality.gradle +++ b/gradle/code-quality.gradle @@ -15,5 +15,9 @@ detekt { sonarqube { properties { property "sonar.kotlin.detekt.reportPaths", detektAggregateReport + property "sonar.organization", "apollo-rsps" + property "sonar.projectKey", "apollo:org.apollo" + property "sonar.projectName", "Apollo RSPS" + property "sonar.kotlin.file.suffixes", ".kt,.kts" } } \ No newline at end of file diff --git a/gradle/testing.gradle b/gradle/testing.gradle index 5b3a7cd17..01a6e4ecf 100644 --- a/gradle/testing.gradle +++ b/gradle/testing.gradle @@ -36,9 +36,9 @@ gradle.projectsEvaluated { task jacocoReport(type: JacocoReport) { - sourceDirectories = files() - classDirectories = files() - executionData = files() + sourceDirectories.setFrom(files()) + classDirectories.setFrom(files()) + executionData.setFrom(files()) reports { html.enabled = true @@ -63,19 +63,9 @@ gradle.projectsEvaluated { additionalClassDirs((FileCollection) subproject.sourceSets.main.output) } - executionData = files(jacocoCoverageAggregate) + executionData.setFrom(files(jacocoCoverageAggregate)) } dependsOn(jacocoMerge) } - - sonarqube { - properties { - property "sonar.organization", "apollo-rsps" - property "sonar.projectKey", "apollo:org.apollo" - property "sonar.projectName", "Apollo RSPS" - property "sonar.kotlin.file.suffixes", ".kt,.kts" - property "sonar.jacoco.reportPaths", jacocoCoverageAggregate - } - } } From fa1587c00ad7d00a7feaff2e9c07af4b727b576b Mon Sep 17 00:00:00 2001 From: Gary Tierney Date: Wed, 17 Jul 2019 06:31:01 +0100 Subject: [PATCH 2/3] Download cache during CI --- azure-pipelines.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2022dfe00..7b115fddf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,6 +11,16 @@ steps: path: $(GRADLE_USER_HOME) displayName: "Gradle: setup build cache" + - task: DownloadPackage@1 + inputs: + packageType: 'upack' + feed: '/76852042-5a8d-4247-969f-47caba0cae08' + view: '56ddc552-069b-4fda-9122-46a634ec7e8a' + definition: '301d6f40-3540-4afb-abcb-cf9be945c859' + version: '1.0.0-377' + downloadPath: '$(Build.SourcesDirectory)/game/data/fs/377' + displayName: "Misc: download cache data" + - task: SonarCloudPrepare@1 inputs: SonarCloud: 'apollo-rsps-sonarcloud' From a5a369d403e223f7f488fd952aad2fe8c05e7455 Mon Sep 17 00:00:00 2001 From: Gary Tierney Date: Wed, 17 Jul 2019 06:37:41 +0100 Subject: [PATCH 3/3] Re-add gradle.properties file --- build.gradle | 2 -- gradle.properties | 18 ++++++++++++++++++ gradle/properties.gradle | 20 -------------------- 3 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 gradle.properties delete mode 100644 gradle/properties.gradle diff --git a/build.gradle b/build.gradle index c1756fcf0..e720790dd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,6 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.3.41' apply(false) id 'org.jetbrains.intellij' version '0.4.9' apply(false) - id 'org.jmailen.kotlinter' version '1.26.0' apply(false) id 'org.sonarqube' version '2.7.1' id "io.gitlab.arturbosch.detekt" version '1.0.0-RC16' } @@ -17,7 +16,6 @@ allprojects { } } -apply from: 'gradle/properties.gradle' apply from: 'gradle/code-quality.gradle' apply from: 'gradle/testing.gradle' apply from: 'gradle/wrapper.gradle' diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 000000000..2881fefb8 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,18 @@ +kotlinVersion=1.3.40 +kotlinxCoroutinesVersion=1.3.0-M2 +junitVersion=4.12 +powermockVersion=2.0.2 +bouncycastleVersion=1.54 +c3p0Version=0.9.5.2 +scryptVersion=1.4.0 +nettyVersion=4.0.34.Final +guavaVersion=19.0 +commonsCompressVersion=1.10 +assertjVersion=3.8.0 +classGraphVersion=4.0.6 +junitVintageVersion=5.1.0 +junitPlatformVersion=1.1.0 +junitJupiterVersion=5.1.0 +mockkVersion=1.7.15 +assertkVersion=0.9 +detektVersion=1.0.0-RC16 \ No newline at end of file diff --git a/gradle/properties.gradle b/gradle/properties.gradle deleted file mode 100644 index 63d32988d..000000000 --- a/gradle/properties.gradle +++ /dev/null @@ -1,20 +0,0 @@ -ext { - kotlinVersion = '1.3.40' - kotlinxCoroutinesVersion = '1.3.0-M2' - junitVersion = '4.12' - powermockVersion = '2.0.2' - bouncycastleVersion = '1.54' - c3p0Version = '0.9.5.2' - scryptVersion = '1.4.0' - nettyVersion = '4.0.34.Final' - guavaVersion = '19.0' - commonsCompressVersion = '1.10' - assertjVersion = '3.8.0' - classGraphVersion = '4.0.6' - junitVintageVersion = '5.1.0' - junitPlatformVersion = '1.1.0' - junitJupiterVersion = '5.1.0' - mockkVersion = '1.7.15' - assertkVersion = '0.9' - detektVersion = '1.0.0-RC16' -} \ No newline at end of file