Skip to content

Commit 4c9a17c

Browse files
Angelo Buonojohann-beleites-sonarsource
andauthored
SONARKT-375 - Prepare for release (#389)
* SONARKT-375 - Update dependencies, rules metadata, Detekt, AndroidLint and KtLint. * Raise available memory for build to 12G This should be a temporary measure, it seems that the updated Gradle scanner has issues with memory usage/management. --------- Co-authored-by: Johann Beleites <[email protected]>
1 parent 95556b3 commit 4c9a17c

File tree

54 files changed

+1588
-410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1588
-410
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ linux_3_5_cpu_7G_template: &LINUX_3_5_CPU_7G
4646
eks_container:
4747
<<: *LINUX_IMAGE
4848
cpu: 3.5
49-
memory: 7G
49+
memory: 12G # TODO: decrease back to 7G when we fix the memory issues with the Gradle scanner
5050

5151
linux_6_cpu_12G_java_17_template: &LINUX_6_CPU_12G_JAVA_17
5252
eks_container:

build.gradle.kts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
21
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3-
import org.sonarsource.kotlin.buildsrc.tasks.CreateKotlinRuleStubsTask
42
import org.sonarsource.kotlin.buildsrc.tasks.CreateKotlinGradleRuleStubsTask
3+
import org.sonarsource.kotlin.buildsrc.tasks.CreateKotlinRuleStubsTask
54
import org.sonarsource.kotlin.buildsrc.tasks.FetchRuleMetadata
65

76
plugins {
87
java
98
id("jacoco")
109
id("com.jfrog.artifactory") version "4.25.1"
11-
id("io.spring.dependency-management") version "1.0.11.RELEASE" apply false
12-
id("org.sonarqube") version "3.3"
10+
id("io.spring.dependency-management") version "1.1.4" apply false
11+
id("org.sonarqube") version "4.4.1.3373"
1312
id("org.jetbrains.kotlin.jvm") apply false
1413
id("com.diffplug.spotless") version "6.11.0"
1514
`maven-publish`
@@ -18,7 +17,7 @@ plugins {
1817

1918
val projectTitle: String by project
2019

21-
configure(subprojects.filter { it.name != "kotlin-checks-test-sources"}) {
20+
configure(subprojects.filter { it.name != "kotlin-checks-test-sources" }) {
2221
apply(plugin = "com.diffplug.spotless")
2322

2423
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
@@ -168,13 +167,13 @@ subprojects {
168167

169168
val sourcesJar by tasks.creating(Jar::class) {
170169
dependsOn(JavaPlugin.CLASSES_TASK_NAME)
171-
classifier = "sources"
170+
archiveClassifier.set("sources")
172171
from(sourceSets.main.get().allSource)
173172
}
174173

175174
val javadocJar by tasks.creating(Jar::class) {
176175
dependsOn(javadoc)
177-
classifier = "javadoc"
176+
archiveClassifier.set("javadoc")
178177
from(tasks["javadoc"])
179178
}
180179

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ group=org.sonarsource.kotlin
22
version=2.19-SNAPSHOT
33
description=Code Analyzer for Kotlin
44
projectTitle=Kotlin
5-
kotlinVersion=1.9.0
5+
kotlinVersion=1.9.21
66
org.gradle.jvmargs=-Xmx4096M

its/plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies {
22
testImplementation(testLibs.sonarlint.core)
3-
testImplementation(testLibs.sonar.orchestrator)
3+
testImplementation(testLibs.sonar.orchestrator.junit4)
44
testImplementation(testLibs.assertj.core)
55
testImplementation(testLibs.sonar.ws)
66
testImplementation(libs.sonar.analyzer.commons)

its/plugin/src/test/java/org/sonarsource/slang/SonarLintTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*/
2020
package org.sonarsource.slang;
2121

22-
import com.sonar.orchestrator.Orchestrator;
23-
import com.sonar.orchestrator.OrchestratorBuilder;
22+
import com.sonar.orchestrator.junit4.OrchestratorRule;
23+
import com.sonar.orchestrator.junit4.OrchestratorRuleBuilder;
2424
import com.sonar.orchestrator.locator.Locators;
2525
import java.io.File;
2626
import java.io.IOException;
@@ -61,9 +61,9 @@ public class SonarLintTest {
6161
@BeforeClass
6262
public static void prepare() throws Exception {
6363
// Orchestrator is used only to retrieve plugin artifacts from filesystem or maven
64-
OrchestratorBuilder orchestratorBuilder = Orchestrator.builderEnv();
64+
OrchestratorRuleBuilder orchestratorBuilder = OrchestratorRule.builderEnv();
6565
Tests.addLanguagePlugins(orchestratorBuilder);
66-
Orchestrator orchestrator = orchestratorBuilder
66+
OrchestratorRule orchestrator = orchestratorBuilder
6767
.useDefaultAdminCredentialsForBuilds(true)
6868
.setSonarVersion(System.getProperty(Tests.SQ_VERSION_PROPERTY, Tests.DEFAULT_SQ_VERSION))
6969
.build();

its/plugin/src/test/java/org/sonarsource/slang/SurefireTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*/
2020
package org.sonarsource.slang;
2121

22-
import com.sonar.orchestrator.Orchestrator;
2322
import com.sonar.orchestrator.build.MavenBuild;
23+
import com.sonar.orchestrator.junit4.OrchestratorRule;
2424
import java.io.File;
2525
import java.nio.file.Path;
2626
import java.nio.file.Paths;
@@ -36,7 +36,7 @@
3636
public class SurefireTest extends TestBase {
3737

3838
@ClassRule
39-
public static final Orchestrator ORCHESTRATOR = Tests.ORCHESTRATOR;
39+
public static final OrchestratorRule ORCHESTRATOR = Tests.ORCHESTRATOR;
4040
private static final Path BASE_DIRECTORY = Paths.get("projects");
4141

4242

its/plugin/src/test/java/org/sonarsource/slang/TestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*/
2020
package org.sonarsource.slang;
2121

22-
import com.sonar.orchestrator.Orchestrator;
2322
import com.sonar.orchestrator.build.SonarScanner;
23+
import com.sonar.orchestrator.junit4.OrchestratorRule;
2424
import java.io.File;
2525
import java.util.Arrays;
2626
import java.util.Collections;
@@ -44,7 +44,7 @@
4444
public abstract class TestBase {
4545

4646
@ClassRule
47-
public static final Orchestrator ORCHESTRATOR = Tests.ORCHESTRATOR;
47+
public static final OrchestratorRule ORCHESTRATOR = Tests.ORCHESTRATOR;
4848

4949
protected SonarScanner getSonarScanner(String projectKey, String directoryToScan, String languageKey) {
5050
return getSonarScanner(projectKey, directoryToScan, languageKey, null);

its/plugin/src/test/java/org/sonarsource/slang/Tests.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
*/
2020
package org.sonarsource.slang;
2121

22-
import com.sonar.orchestrator.Orchestrator;
2322
import com.sonar.orchestrator.OrchestratorBuilder;
23+
import com.sonar.orchestrator.junit4.OrchestratorRule;
24+
import com.sonar.orchestrator.junit4.OrchestratorRuleBuilder;
2425
import com.sonar.orchestrator.locator.FileLocation;
2526
import com.sonar.orchestrator.locator.Location;
2627
import com.sonar.orchestrator.locator.MavenLocation;
@@ -48,10 +49,10 @@ public class Tests {
4849
private static final Set<String> LANGUAGES = new HashSet<>(Collections.singletonList("kotlin"));
4950

5051
@ClassRule
51-
public static final Orchestrator ORCHESTRATOR;
52+
public static final OrchestratorRule ORCHESTRATOR;
5253

5354
static {
54-
OrchestratorBuilder orchestratorBuilder = Orchestrator.builderEnv();
55+
OrchestratorRuleBuilder orchestratorBuilder = OrchestratorRule.builderEnv();
5556
addLanguagePlugins(orchestratorBuilder);
5657
ORCHESTRATOR = orchestratorBuilder
5758
.useDefaultAdminCredentialsForBuilds(true)

its/ruling/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
dependencies {
7-
testImplementation(testLibs.sonar.orchestrator)
7+
testImplementation(testLibs.sonar.orchestrator.junit4)
88
testImplementation(testLibs.assertj.core)
99
testImplementation(libs.sonar.analyzer.commons)
1010
}

its/ruling/src/test/java/org/sonarsource/slang/SlangRulingTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
*/
2020
package org.sonarsource.slang;
2121

22-
import com.sonar.orchestrator.Orchestrator;
2322
import com.sonar.orchestrator.OrchestratorBuilder;
2423
import com.sonar.orchestrator.build.Build;
2524
import com.sonar.orchestrator.build.GradleBuild;
2625
import com.sonar.orchestrator.build.SonarScanner;
26+
import com.sonar.orchestrator.junit4.OrchestratorRule;
27+
import com.sonar.orchestrator.junit4.OrchestratorRuleBuilder;
2728
import com.sonar.orchestrator.locator.FileLocation;
2829
import com.sonar.orchestrator.locator.Location;
2930
import com.sonar.orchestrator.locator.MavenLocation;
@@ -56,15 +57,15 @@ public class SlangRulingTest {
5657
private static final String SQ_VERSION_PROPERTY = "sonar.runtimeVersion";
5758
private static final String DEFAULT_SQ_VERSION = "LATEST_RELEASE";
5859

59-
private static Orchestrator orchestrator;
60+
private static OrchestratorRule orchestrator;
6061
private static boolean keepSonarqubeRunning = "true".equals(System.getProperty("keepSonarqubeRunning"));
6162
private static final boolean IGNORE_EXPECTED_ISSUES_AND_REPORT_ALL = "true".equals(System.getProperty("reportAll"));
6263
private static final boolean CLEAN_PROJECT_BINARIES = "true".equals(System.getProperty("cleanProjects"));
6364
private static final Set<String> LANGUAGES = new HashSet<>(Collections.singletonList("kotlin"));
6465

6566
@BeforeClass
6667
public static void setUp() {
67-
OrchestratorBuilder builder = Orchestrator.builderEnv()
68+
OrchestratorRuleBuilder builder = OrchestratorRule.builderEnv()
6869
.useDefaultAdminCredentialsForBuilds(true)
6970
.setSonarVersion(System.getProperty(SQ_VERSION_PROPERTY, DEFAULT_SQ_VERSION))
7071
.addPlugin(MavenLocation.of("org.sonarsource.sonar-lits-plugin", "sonar-lits-plugin", "0.11.0.2659"));

0 commit comments

Comments
 (0)