diff --git a/.cirrus.yml b/.cirrus.yml index c6993051..3f0711ff 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -16,6 +16,8 @@ env: ORG_GRADLE_PROJECT_signingKeyId: VAULT[development/kv/data/sign data.key_id] GRADLE_USER_HOME: ${CIRRUS_WORKING_DIR}/.gradle + DEVELOCITY_TOKEN: VAULT[development/kv/data/develocity data.token] + DEVELOCITY_ACCESS_KEY: develocity.sonar.build=${DEVELOCITY_TOKEN} linux_image_template: &LINUX_IMAGE image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-g7-latest diff --git a/README.md b/README.md index 45dfe769..e7785f9f 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ Furthermore, there are files such as `package-info.java` and `module-info.java` Also the Go source files are not handled. For those files use a manual script like below to update the license: `find . -type f -name "*.go" -exec sed -i '' 's/2018-2023/2018-2024/' "{}" \;` + + ## License Copyright 2012-2024 SonarSource. diff --git a/gradle.properties b/gradle.properties index 12da3459..032d96ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,3 +3,4 @@ version=1.19.0-SNAPSHOT description=Code Analyzer for Go projectTitle=Go org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx1024m +org.gradle.caching=true diff --git a/its/plugin/src/test/java/org/sonarsource/slang/MeasuresTest.java b/its/plugin/src/test/java/org/sonarsource/slang/MeasuresTest.java index 48411f4f..5fc09758 100644 --- a/its/plugin/src/test/java/org/sonarsource/slang/MeasuresTest.java +++ b/its/plugin/src/test/java/org/sonarsource/slang/MeasuresTest.java @@ -16,9 +16,7 @@ */ package org.sonarsource.slang; -import java.util.List; import org.junit.Test; -import org.sonarqube.ws.Issues; import static org.assertj.core.api.Assertions.assertThat; @@ -35,13 +33,6 @@ public void go_measures() { assertThat(getMeasureAsInt(componentKey, "ncloc")).isEqualTo(41); assertThat(getMeasureAsInt(componentKey, "comment_lines")).isEqualTo(2); - assertThat(getMeasure(componentKey, "ncloc_data").getValue()) - .isEqualTo("1=1;3=1;4=1;5=1;6=1;7=1;8=1;10=1;11=1;12=1;13=1;14=1;16=1;17=1;18=1;20=1;21=1;22=1;23=1;24=1;25=1;" + - "26=1;27=1;28=1;29=1;30=1;31=1;32=1;33=1;35=1;36=1;37=1;38=1;39=1;40=1;41=1;46=1;47=1;48=1;49=1;50=1"); - assertThat(getMeasureAsInt(componentKey, "functions")).isEqualTo(3); - - assertThat(getMeasure(componentKey, "executable_lines_data").getValue()) - .isEqualTo("32=1;36=1;37=1;38=1;40=1;49=1;22=1;23=1;25=1;26=1;27=1;29=1;30=1"); } } diff --git a/settings.gradle b/settings.gradle index baae4825..e764cd55 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,6 +5,25 @@ pluginManagement { } } +plugins { + id 'com.gradle.develocity' version '3.18.2' +} + +develocity { + server = 'https://develocity.sonar.build' +} + +def isCI = System.getenv('CI') != null +buildCache { + local { + enabled = !isCI + } + remote(develocity.buildCache) { + enabled = true + push = isCI + } +} + dependencyResolutionManagement { def slangDependenciesVersion = '1.17.0.6351' def analyzerCommonsVersion = '2.16.0.3141'