diff --git a/.cirrus.yml b/.cirrus.yml
index 612126bb5..fbfb82aa2 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,8 +1,4 @@
env:
- CIRRUS_VAULT_URL: https://vault.sonar.build:8200
- CIRRUS_VAULT_AUTH_PATH: jwt-cirrusci
- CIRRUS_VAULT_ROLE: cirrusci-${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}
-
ARTIFACTORY_URL: VAULT[development/kv/data/repox data.url]
ARTIFACTORY_PRIVATE_USERNAME: vault-${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader
@@ -18,6 +14,9 @@ env:
ORG_GRADLE_PROJECT_signingPassword: VAULT[development/kv/data/sign data.passphrase]
ORG_GRADLE_PROJECT_signingKeyId: 0x7DCD4258
+ DEVELOCITY_TOKEN: VAULT[development/kv/data/develocity data.token]
+ DEVELOCITY_ACCESS_KEY: develocity.sonar.build=${DEVELOCITY_TOKEN}
+
# Use bash (instead of sh on linux or cmd.exe on windows)
CIRRUS_SHELL: bash
@@ -81,7 +80,7 @@ gradle_its_template: &GRADLE_ITS_TEMPLATE
git submodule update --init --depth 1 "${GIT_SUB_MODULE}"
fi
- source cirrus-env QA
- - ./gradlew "${GRADLE_TASK}" "-P${ITS_PROJECT}"
+ - ./gradlew "${GRADLE_TASK}" "-P${ITS_PROJECT}" -Dscan.tag.CI -Dscan.tag.${ITS_PROJECT} -Dscan.tag.SQ_${SQ_VERSION}
"-Dsonar.runtimeVersion=${SQ_VERSION}"
"-DbuildNumber=$BUILD_NUMBER"
--info --console plain --no-daemon --build-cache
@@ -106,7 +105,7 @@ build_task:
DEPLOY_PULL_REQUEST: true
build_script:
- source cirrus-env BUILD-PRIVATE
- - regular_gradle_build_deploy_analyze -x test -x sonar
+ - regular_gradle_build_deploy_analyze -x test -x sonar -Dscan.tag.CI -Dscan.tag.build
on_failure:
error_log_artifacts:
path: "hs_err_pid*.log"
@@ -125,7 +124,8 @@ build_test_analyze_task:
DEPLOY_PULL_REQUEST: true
build_script:
- source cirrus-env BUILD-PRIVATE
- - regular_gradle_build_deploy_analyze -x artifactoryPublish
+ - ./gradlew build -Dscan.tag.CI -Dscan.tag.test
+ - regular_gradle_build_deploy_analyze -x build -x artifactoryPublish -Dscan.tag.CI -Dscan.tag.analyze
on_failure:
error_log_artifacts:
path: "hs_err_pid*.log"
@@ -146,7 +146,7 @@ ws_scan_task:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
whitesource_script:
- source cirrus-env QA
- - ./gradlew clean assemble
+ - ./gradlew clean assemble -Dscan.tag.WS_BUILD
- source ./export_ws_variables.sh
- source ws_scan.sh
allow_failures: "true"
@@ -202,7 +202,7 @@ qa_ruling_kotlin_compiler_task:
git submodule update --init --depth 1 "${GIT_SUB_MODULE}"
fi
- source cirrus-env QA
- - ./gradlew :its:ruling:test --tests "org.sonarsource.slang.SlangRulingTest.test_kotlin_compiler" -Pruling
+ - ./gradlew :its:ruling:test --tests "org.sonarsource.slang.SlangRulingTest.test_kotlin_compiler" -Pruling -Dscan.tag.CI -Dscan.tag.ruling -Dscan.tag.kotlin-compiler
"-Dsonar.runtimeVersion=${SQ_VERSION}"
"-DbuildNumber=$BUILD_NUMBER"
--info --console plain --no-daemon --build-cache
@@ -213,7 +213,7 @@ build_win_task:
<<: *WINDOWS_16_CPU_32G
<<: *SETUP_GRADLE_CACHE
build_script:
- - ./gradlew build --info --console plain --no-daemon --build-cache
+ - ./gradlew build --info --console plain --no-daemon --build-cache -Dscan.tag.CI -Dscan.tag.build-win
on_failure:
error_log_artifacts:
path: "hs_err_pid*.log"
diff --git a/build.gradle.kts b/build.gradle.kts
index e12330f28..021cfc00b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -225,6 +225,20 @@ subprojects {
gradle.taskGraph.hasTask(":artifactoryPublish")
}
}
+ normalization {
+ runtimeClasspath {
+ metaInf {
+ ignoreAttribute("Implementation-Version")
+ ignoreAttribute("Version")
+ ignoreAttribute("Implementation-Build")
+ ignoreAttribute("Build-Time")
+ ignoreAttribute("Plugin-BuildDate")
+ ignoreAttribute("Plugin-Display-Version")
+ ignoreAttribute("Plugin-Version")
+ ignoreAttribute("Plugin-RequirePlugins")
+ }
+ }
+ }
}
sonarqube {
diff --git a/gradle.properties b/gradle.properties
index a11f35367..a813d17bf 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,3 +4,5 @@ description=Code Analyzer for Kotlin
projectTitle=Kotlin
kotlinVersion=2.0.21
org.gradle.jvmargs=-Xmx4096M
+org.gradle.caching=true
+kotlin.build.archivesTaskOutputAsFriendModule=false
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 2ee32e075..a655bceee 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -220,6 +220,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -745,6 +755,11 @@
+
+
+
+
+
@@ -855,6 +870,11 @@
+
+
+
+
+
@@ -865,6 +885,11 @@
+
+
+
+
+
@@ -875,11 +900,21 @@
+
+
+
+
+
+
+
+
+
+
@@ -895,6 +930,11 @@
+
+
+
+
+
@@ -910,6 +950,11 @@
+
+
+
+
+
@@ -940,6 +985,11 @@
+
+
+
+
+
@@ -955,6 +1005,11 @@
+
+
+
+
+
@@ -970,6 +1025,11 @@
+
+
+
+
+
@@ -995,6 +1055,11 @@
+
+
+
+
+
@@ -1010,6 +1075,11 @@
+
+
+
+
+
@@ -1025,6 +1095,11 @@
+
+
+
+
+
@@ -1046,6 +1121,14 @@
+
+
+
+
+
+
+
+
@@ -1061,6 +1144,11 @@
+
+
+
+
+
@@ -1076,6 +1164,11 @@
+
+
+
+
+
@@ -1091,6 +1184,11 @@
+
+
+
+
+
@@ -1106,6 +1204,11 @@
+
+
+
+
+
@@ -1121,6 +1224,11 @@
+
+
+
+
+
@@ -1136,6 +1244,11 @@
+
+
+
+
+
@@ -1186,6 +1299,11 @@
+
+
+
+
+
@@ -1196,6 +1314,11 @@
+
+
+
+
+
@@ -1206,6 +1329,11 @@
+
+
+
+
+
@@ -1226,6 +1354,11 @@
+
+
+
+
+
@@ -1241,6 +1374,11 @@
+
+
+
+
+
@@ -1256,6 +1394,11 @@
+
+
+
+
+
@@ -1271,6 +1414,11 @@
+
+
+
+
+
@@ -1286,6 +1434,11 @@
+
+
+
+
+
@@ -1322,6 +1475,14 @@
+
+
+
+
+
+
+
+
@@ -1425,6 +1586,11 @@
+
+
+
+
+
@@ -1440,6 +1606,11 @@
+
+
+
+
+
@@ -1455,6 +1626,11 @@
+
+
+
+
+
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 31d509284..82e42f7b6 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -93,3 +93,28 @@ dependencyResolutionManagement {
}
}
}
+
+plugins {
+ id("com.gradle.develocity") version("3.18.2")
+ id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2"
+}
+
+val isCI: Boolean = System.getenv("CI") != null
+
+develocity {
+ server = "https://develocity.sonar.build"
+ buildScan {
+ uploadInBackground.set(!isCI)
+ }
+
+}
+
+buildCache {
+ local {
+ isEnabled = !isCI
+ }
+ remote(develocity.buildCache) {
+ isEnabled = true
+ isPush = isCI
+ }
+}