From e7deb2ca8579896e8c3d074225ddc571134a8d09 Mon Sep 17 00:00:00 2001 From: Max Philip Stachon Date: Tue, 3 Mar 2026 21:30:48 +0100 Subject: [PATCH 01/11] attempt update to java 21 and gradle 8.5 (wip) --- .github/workflows/deploy_snapshot.yml | 12 +++++++++++- .github/workflows/test_branch.yml | 5 +++++ .gitlab-ci.yml | 2 +- build.gradle | 11 ++++++++--- cdtool/build.gradle | 2 +- gradle.properties | 2 +- symtabdefinitiontool/build.gradle | 2 +- 7 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml index 735d77a6c..724991c9d 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -15,7 +15,7 @@ on: types: [ trigger_after_upstream_deploy ] env: - GRADLE_VERSION: 7.6 # Gradle version used + GRADLE_VERSION: 8.5 # Gradle version used GRADLE_CLI_OPTS: "-Pci --build-cache -PgenTR=false -PgenTagging=true --refresh-dependencies " # CLI options passed to Gradle GRADLE_BUILD_ACTION_CACHE_KEY_JOB: "test-cache-${{ github.head_ref }}.${{ github.sha }}" @@ -29,6 +29,11 @@ jobs: steps: - name: Checkout project sources uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 with: @@ -45,6 +50,11 @@ jobs: steps: - name: Checkout project sources uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 with: diff --git a/.github/workflows/test_branch.yml b/.github/workflows/test_branch.yml index 5b3f3fb7a..60d827533 100644 --- a/.github/workflows/test_branch.yml +++ b/.github/workflows/test_branch.yml @@ -30,6 +30,11 @@ jobs: steps: - name: Checkout project sources uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 with: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 709a25970..b8b48daba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ # (c) https://github.com/MontiCore/monticore -image: registry.git.rwth-aachen.de/monticore/container-registry/gradle:7.6.4-jdk11 +image: registry.git.rwth-aachen.de/monticore/container-registry/gradle:8.5-jdk21 variables: GRADLE_OPTS: "-Dorg.gradle.daemon=false" diff --git a/build.gradle b/build.gradle index 937c12119..d710d21ed 100644 --- a/build.gradle +++ b/build.gradle @@ -4,11 +4,16 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent /* (c) https://github.com/MontiCore/monticore */ plugins { + id 'java' id "maven-publish" - id "io.github.themrmilchmann.ecj" version "0.2.0" apply(false) // Eclipse compiler as it's much faster than javac + id "io.github.themrmilchmann.ecj" version "0.2.0" id "de.se_rwth.codestyle" version "$mc_version" } +ecj { + compilerVersion = "3.43.0" +} + description = "CD4Analysis" buildDir = file("$projectDir/target") @@ -42,7 +47,7 @@ subprojects { apply plugin: 'maven-publish' apply plugin: 'de.se_rwth.codestyle' - sourceCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_21 allprojects { group = "de.monticore.lang.cd4analysis" @@ -105,7 +110,7 @@ subprojects { } java { toolchain { - languageVersion = JavaLanguageVersion.of(11) + languageVersion = JavaLanguageVersion.of(21) } } } diff --git a/cdtool/build.gradle b/cdtool/build.gradle index 93961e995..f33e646ea 100644 --- a/cdtool/build.gradle +++ b/cdtool/build.gradle @@ -1,6 +1,6 @@ /* (c) https://github.com/MontiCore/monticore */ plugins { - id "com.github.johnrengelman.shadow" version "$shadow_plugin_version" + id 'com.gradleup.shadow' version "$shadow_plugin_version" } description = "CD4Analysis: Tool" diff --git a/gradle.properties b/gradle.properties index e53485750..be5d1893f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ repo=https://nexus.se.rwth-aachen.de/content/groups/public version=7.9.0-SNAPSHOT mc_version=7.9.0-SNAPSHOT commons_version=7.9.0-SNAPSHOT -shadow_plugin_version=7.1.2 +shadow_plugin_version=8.3.9 useLocalRepo=false org.gradle.jvmargs=-Xmx4096m org.gradle.parallel=true diff --git a/symtabdefinitiontool/build.gradle b/symtabdefinitiontool/build.gradle index 360e1f3eb..3ba11d449 100644 --- a/symtabdefinitiontool/build.gradle +++ b/symtabdefinitiontool/build.gradle @@ -1,6 +1,6 @@ /* (c) https://github.com/MontiCore/monticore */ plugins { - id "com.github.johnrengelman.shadow" version "$shadow_plugin_version" + id 'com.gradleup.shadow' version "$shadow_plugin_version" } description = "SymTabDefinition: Tool" From 427ccf4f452bdfac7b73cc10ad3ebe2a01015f2d Mon Sep 17 00:00:00 2001 From: Max Philip Stachon Date: Tue, 3 Mar 2026 21:49:31 +0100 Subject: [PATCH 02/11] set gradle to 8.5 in test_branch.yml --- .github/workflows/test_branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_branch.yml b/.github/workflows/test_branch.yml index 60d827533..f7fdcbdab 100644 --- a/.github/workflows/test_branch.yml +++ b/.github/workflows/test_branch.yml @@ -14,7 +14,7 @@ on: types: [opened, synchronize] env: - GRADLE_VERSION: 7.6 # Gradle version used + GRADLE_VERSION: 8.5 # Gradle version used GRADLE_CLI_OPTS: "-Pci --build-cache -PgenTR=false -PgenTagging=true --refresh-dependencies " # CLI options passed to Gradle GRADLE_BUILD_ACTION_CACHE_KEY_JOB: "test-cache-${{ github.head_ref }}.${{ github.sha }}" From 265c41210d1441e931f6c094471377cc694d858a Mon Sep 17 00:00:00 2001 From: Max Philip Stachon Date: Tue, 3 Mar 2026 22:02:59 +0100 Subject: [PATCH 03/11] fix build.gradle --- build.gradle | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index d710d21ed..6878e78cd 100644 --- a/build.gradle +++ b/build.gradle @@ -6,13 +6,10 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { id 'java' id "maven-publish" - id "io.github.themrmilchmann.ecj" version "0.2.0" + id "io.github.themrmilchmann.ecj" version "0.2.0" apply(false) id "de.se_rwth.codestyle" version "$mc_version" } -ecj { - compilerVersion = "3.43.0" -} description = "CD4Analysis" buildDir = file("$projectDir/target") @@ -42,11 +39,16 @@ repositories { } subprojects { + apply plugin: 'java-library' apply plugin: 'io.github.themrmilchmann.ecj' apply plugin: 'maven-publish' apply plugin: 'de.se_rwth.codestyle' + ecj { + compilerVersion = "3.43.0" + } + sourceCompatibility = JavaVersion.VERSION_21 allprojects { From d2c4dfd31a832db83ca53894c2600561ded000d3 Mon Sep 17 00:00:00 2001 From: Max Philip Stachon Date: Tue, 3 Mar 2026 22:23:40 +0100 Subject: [PATCH 04/11] fix sourceCompatibility in language-server build.gradle --- language-server/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language-server/build.gradle b/language-server/build.gradle index 0861258e9..67feba08b 100644 --- a/language-server/build.gradle +++ b/language-server/build.gradle @@ -9,7 +9,7 @@ plugins { group 'de.monticore.lang' version mc_version -sourceCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_21 repositories { mavenCentral() From a2d28d4107893a54298fdad97038bc7817fb861e Mon Sep 17 00:00:00 2001 From: Max Philip Stachon Date: Tue, 3 Mar 2026 22:37:18 +0100 Subject: [PATCH 05/11] update Mockito version --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6878e78cd..71e7fc1a1 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ ext { junit_platform_version = "1.14.1" freemarker_version = "2.3.31" javaparser_version = "3.14.11" - mockito_version = "3.11.1" + mockito_version = "5.11.0" logback_version = "1.2.3" apache_commons_version = '4.4' } From b92adbdba190e5e0adb6409957dbe3ff6ceb0a65 Mon Sep 17 00:00:00 2001 From: Alexander Hellwig Date: Wed, 4 Mar 2026 10:27:40 +0100 Subject: [PATCH 06/11] Update minimum gradle version to 8.4 --- README.md | 6 +- .../cdgen/CDGenGradlePluginTest.java | 76 +++++++++---------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index e245d4a8f..584cdc5bc 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ processing models, including: * computing the semantic difference of 2 CDs, and * merging 2 CDs (iff the result is semantically sound) -The requirements for building and using the CD tool are that Java 11, Git, +The requirements for building and using the CD tool are that Java 21, Git, and Gradle are installed and available for use (e.g., in bash). ### Downloading the Latest Version of the Tool @@ -186,8 +186,8 @@ As alternative to a download, it is possible to build an executable JAR of the tool from the source files located in GitHub. Make sure you have installed the following dependencies: -* Java 11 or 17 (check it with java -version) -* Gradle 7.6.4 (check it with gradle --version) +* Java 21 (check it with java -version) +* Gradle 8.4 (check it with gradle --version) In order to build an executable Jar of the tool with Bash from the source files available in GitHub, execute the following commands. diff --git a/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java b/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java index 948c07cb4..497ea86b3 100644 --- a/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java +++ b/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java @@ -23,40 +23,40 @@ import org.junit.jupiter.api.io.TempDir; public class CDGenGradlePluginTest { - + @TempDir File testProjectDir; - - @Test - public void testCDGen_v7_4_2() throws IOException { - testCDGen("7.4.2"); - } - + @Test - public void testCDGen_v8_0_1() throws IOException { - this.testCDGen("8.0.1"); + public void testCDGen_v8_4() throws IOException { + this.testCDGen("8.4"); } - + @Test public void testCDGen_v8_7() throws IOException { this.testCDGen("8.7"); } - + + @Test + public void testCDGen_v8_14() throws IOException { + this.testCDGen("8.14"); + } + void testCDGen(String version) throws IOException { FileUtils.copyDirectory(new File("src/test/resources/cdgradle-it"), testProjectDir); - + BuildResult result = GradleRunner.create().withPluginClasspath().withGradleVersion(version) .withProjectDir(testProjectDir).withArguments(withProperties("build", "--info", "--stacktrace")).build(); assertEquals(TaskOutcome.SUCCESS, result.task(":generateClassDiagrams").getOutcome()); assertEquals(TaskOutcome.SUCCESS, result.task(":compileJava").getOutcome()); - + File origSymbolsOut = new File(testProjectDir, "build/cdgensymbols/main/original/MyCD.cdsym"); assertTrue(origSymbolsOut.exists(), "Exported original symbols missing"); - + File symbolsOut = new File(testProjectDir, "build/cdgensymbols/main/original/MyCD.cdsym"); assertTrue(symbolsOut.exists(), "Exported decorated symbols missing"); - + // Test if we can successfully resolve a decorated function LogStub.initPlusLog(); CD4CodeMill.init(); @@ -65,33 +65,33 @@ void testCDGen(String version) throws IOException { // Load the (freshly generated) CD-sym CD4CodeMill.globalScope().getSymbolPath().addEntry(symbolsOut.getParentFile().toPath()); CD4CodeMill.globalScope().loadDiagram("MyCD"); - + CD4CodeMill.globalScope().resolveMethod("MyCD.MyCD.CanBeObserved.getName"); // Check for a method within a class, which is TOPed // We explicitly expect the method to be resolvable via IncompleteA CD4CodeMill.globalScope().resolveMethod("MyCD.MyCD.IncompleteA.getName"); CD4CodeMill.globalScope().resolveType("MyCD.MyCD.BBuilder"); - + Assertions.assertEquals(0, LogStub.getFindingsCount()); - + CD4CodeMill.reset(); } - - @Test - public void testCDGenOwnDecorator_v7_4_2() throws IOException { - this.testCDGenOwnDecorator("7.4.2"); - } - + @Test - public void testCDGenOwnDecorator_v8_0_1() throws IOException { - this.testCDGenOwnDecorator("8.0.1"); + public void testCDGenOwnDecorator_v8_4() throws IOException { + this.testCDGenOwnDecorator("8.4"); } - + @Test public void testCDGenOwnDecorator_v8_7() throws IOException { this.testCDGenOwnDecorator("8.7"); } - + + @Test + public void testCDGenOwnDecorator_v8_14() throws IOException { + this.testCDGenOwnDecorator("8.14"); + } + /** * Test the CDGenPlugin with a decorator written in a custom sourceSet and a custom config * template @@ -101,20 +101,20 @@ public void testCDGenOwnDecorator_v8_7() throws IOException { */ void testCDGenOwnDecorator(String version) throws IOException { FileUtils.copyDirectory(new File("src/test/resources/cdgradle-it"), testProjectDir); - + BuildResult result = GradleRunner.create().withPluginClasspath().withGradleVersion(version) .withProjectDir(testProjectDir).withArguments(withProperties("build", "--info", "--stacktrace", "-PwithCustomDec=true" // with custom decorator )).build(); assertEquals(TaskOutcome.SUCCESS, result.task(":generateClassDiagrams").getOutcome()); assertEquals(TaskOutcome.SUCCESS, result.task(":compileJava").getOutcome()); - + if (!result.getOutput().contains("I am decorating")) { System.err.println(result.getOutput()); fail("Failed to find \"I am decorating\" in output"); } } - + Properties loadProperties() { Properties properties = new Properties(); try { @@ -125,11 +125,11 @@ Properties loadProperties() { } return properties; } - + List withProperties(String... args) { return withProperties(Arrays.asList(args)); } - + List withProperties(List runnerArgs) { List ret = new ArrayList<>(runnerArgs); @Nullable @@ -142,22 +142,22 @@ List withProperties(List runnerArgs) { if (useLocalRepo != null && !useLocalRepo.isEmpty()) { ret.add("-PuseLocalRepo=" + useLocalRepo); } - + File langLibs = new File("../../cdlang/target/libs"); File runtimeLibs = new File("../../cd-runtime/target/libs"); - + String projVersion = loadProperties().getProperty("version"); File cd4aJarFile = new File(langLibs, "cd4analysis-" + projVersion + ".jar").getAbsoluteFile(); File runtimeJarFile = new File(runtimeLibs, "cd4analysis-" + projVersion + "-cd-runtime.jar") .getAbsoluteFile(); assertTrue(cd4aJarFile.exists()); assertTrue(runtimeJarFile.exists()); - + ret.add("-Pversion=" + projVersion); ret.add("-Pcdgen_cd4aJarFile=" + cd4aJarFile); ret.add("-Pcdgen_runtimeJarFile=" + runtimeJarFile); - + return ret; } - + } From bd0a6e73807be38eeeda6d8dc49a7d18af753228 Mon Sep 17 00:00:00 2001 From: Alexander Hellwig Date: Wed, 4 Mar 2026 10:29:50 +0100 Subject: [PATCH 07/11] Spotless --- .../cdgen/CDGenGradlePluginTest.java | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java b/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java index 497ea86b3..f8cc1b216 100644 --- a/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java +++ b/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java @@ -23,40 +23,40 @@ import org.junit.jupiter.api.io.TempDir; public class CDGenGradlePluginTest { - + @TempDir File testProjectDir; - + @Test public void testCDGen_v8_4() throws IOException { this.testCDGen("8.4"); } - + @Test public void testCDGen_v8_7() throws IOException { this.testCDGen("8.7"); } - + @Test public void testCDGen_v8_14() throws IOException { this.testCDGen("8.14"); } - + void testCDGen(String version) throws IOException { FileUtils.copyDirectory(new File("src/test/resources/cdgradle-it"), testProjectDir); - + BuildResult result = GradleRunner.create().withPluginClasspath().withGradleVersion(version) .withProjectDir(testProjectDir).withArguments(withProperties("build", "--info", "--stacktrace")).build(); assertEquals(TaskOutcome.SUCCESS, result.task(":generateClassDiagrams").getOutcome()); assertEquals(TaskOutcome.SUCCESS, result.task(":compileJava").getOutcome()); - + File origSymbolsOut = new File(testProjectDir, "build/cdgensymbols/main/original/MyCD.cdsym"); assertTrue(origSymbolsOut.exists(), "Exported original symbols missing"); - + File symbolsOut = new File(testProjectDir, "build/cdgensymbols/main/original/MyCD.cdsym"); assertTrue(symbolsOut.exists(), "Exported decorated symbols missing"); - + // Test if we can successfully resolve a decorated function LogStub.initPlusLog(); CD4CodeMill.init(); @@ -65,33 +65,33 @@ void testCDGen(String version) throws IOException { // Load the (freshly generated) CD-sym CD4CodeMill.globalScope().getSymbolPath().addEntry(symbolsOut.getParentFile().toPath()); CD4CodeMill.globalScope().loadDiagram("MyCD"); - + CD4CodeMill.globalScope().resolveMethod("MyCD.MyCD.CanBeObserved.getName"); // Check for a method within a class, which is TOPed // We explicitly expect the method to be resolvable via IncompleteA CD4CodeMill.globalScope().resolveMethod("MyCD.MyCD.IncompleteA.getName"); CD4CodeMill.globalScope().resolveType("MyCD.MyCD.BBuilder"); - + Assertions.assertEquals(0, LogStub.getFindingsCount()); - + CD4CodeMill.reset(); } - + @Test public void testCDGenOwnDecorator_v8_4() throws IOException { this.testCDGenOwnDecorator("8.4"); } - + @Test public void testCDGenOwnDecorator_v8_7() throws IOException { this.testCDGenOwnDecorator("8.7"); } - + @Test public void testCDGenOwnDecorator_v8_14() throws IOException { this.testCDGenOwnDecorator("8.14"); } - + /** * Test the CDGenPlugin with a decorator written in a custom sourceSet and a custom config * template @@ -101,20 +101,20 @@ public void testCDGenOwnDecorator_v8_14() throws IOException { */ void testCDGenOwnDecorator(String version) throws IOException { FileUtils.copyDirectory(new File("src/test/resources/cdgradle-it"), testProjectDir); - + BuildResult result = GradleRunner.create().withPluginClasspath().withGradleVersion(version) .withProjectDir(testProjectDir).withArguments(withProperties("build", "--info", "--stacktrace", "-PwithCustomDec=true" // with custom decorator )).build(); assertEquals(TaskOutcome.SUCCESS, result.task(":generateClassDiagrams").getOutcome()); assertEquals(TaskOutcome.SUCCESS, result.task(":compileJava").getOutcome()); - + if (!result.getOutput().contains("I am decorating")) { System.err.println(result.getOutput()); fail("Failed to find \"I am decorating\" in output"); } } - + Properties loadProperties() { Properties properties = new Properties(); try { @@ -125,11 +125,11 @@ Properties loadProperties() { } return properties; } - + List withProperties(String... args) { return withProperties(Arrays.asList(args)); } - + List withProperties(List runnerArgs) { List ret = new ArrayList<>(runnerArgs); @Nullable @@ -142,22 +142,22 @@ List withProperties(List runnerArgs) { if (useLocalRepo != null && !useLocalRepo.isEmpty()) { ret.add("-PuseLocalRepo=" + useLocalRepo); } - + File langLibs = new File("../../cdlang/target/libs"); File runtimeLibs = new File("../../cd-runtime/target/libs"); - + String projVersion = loadProperties().getProperty("version"); File cd4aJarFile = new File(langLibs, "cd4analysis-" + projVersion + ".jar").getAbsoluteFile(); File runtimeJarFile = new File(runtimeLibs, "cd4analysis-" + projVersion + "-cd-runtime.jar") .getAbsoluteFile(); assertTrue(cd4aJarFile.exists()); assertTrue(runtimeJarFile.exists()); - + ret.add("-Pversion=" + projVersion); ret.add("-Pcdgen_cd4aJarFile=" + cd4aJarFile); ret.add("-Pcdgen_runtimeJarFile=" + runtimeJarFile); - + return ret; } - + } From 6a0949a27224c07195c05e658aa1fe75a37b686a Mon Sep 17 00:00:00 2001 From: Janik Rapp Date: Wed, 4 Mar 2026 13:10:59 +0100 Subject: [PATCH 08/11] update sourceCompatibility in trafo-library --- trafo-library/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trafo-library/build.gradle b/trafo-library/build.gradle index a14c819ad..29d075f3d 100644 --- a/trafo-library/build.gradle +++ b/trafo-library/build.gradle @@ -10,7 +10,7 @@ import de.monticore.MontiTransExec group = "de.monticore.lang" description = "trafo-library" -sourceCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_21 buildDir = file("$projectDir/target") From 62b0327e667c76dcaa3e9b9dae7e39813f79a93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20L=C3=BCpges?= Date: Mon, 9 Mar 2026 11:06:55 +0100 Subject: [PATCH 09/11] use env for java version --- .github/workflows/deploy_snapshot.yml | 5 +++-- .github/workflows/test_branch.yml | 3 ++- README.md | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml index 724991c9d..32de396cc 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -16,6 +16,7 @@ on: env: GRADLE_VERSION: 8.5 # Gradle version used + JAVA_VERSION: 21 # Java version used GRADLE_CLI_OPTS: "-Pci --build-cache -PgenTR=false -PgenTagging=true --refresh-dependencies " # CLI options passed to Gradle GRADLE_BUILD_ACTION_CACHE_KEY_JOB: "test-cache-${{ github.head_ref }}.${{ github.sha }}" @@ -33,7 +34,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 21 + java-version: ${{ env.JAVA_VERSION }} - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 with: @@ -54,7 +55,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 21 + java-version: ${{ env.JAVA_VERSION }} - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 with: diff --git a/.github/workflows/test_branch.yml b/.github/workflows/test_branch.yml index f7fdcbdab..451191296 100644 --- a/.github/workflows/test_branch.yml +++ b/.github/workflows/test_branch.yml @@ -15,6 +15,7 @@ on: env: GRADLE_VERSION: 8.5 # Gradle version used + JAVA_VERSION: 21 # Java version used GRADLE_CLI_OPTS: "-Pci --build-cache -PgenTR=false -PgenTagging=true --refresh-dependencies " # CLI options passed to Gradle GRADLE_BUILD_ACTION_CACHE_KEY_JOB: "test-cache-${{ github.head_ref }}.${{ github.sha }}" @@ -34,7 +35,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 21 + java-version: ${{ env.JAVA_VERSION }} - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 with: diff --git a/README.md b/README.md index 584cdc5bc..b9bb96f87 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ it is possible to build an executable JAR of the tool from the source files located in GitHub. Make sure you have installed the following dependencies: * Java 21 (check it with java -version) -* Gradle 8.4 (check it with gradle --version) +* Gradle 8.5 (check it with gradle --version) In order to build an executable Jar of the tool with Bash from the source files available in GitHub, execute the following commands. From 67cbc8f3e5a7364f52c66506b4b14ec716434fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20L=C3=BCpges?= Date: Mon, 9 Mar 2026 11:07:19 +0100 Subject: [PATCH 10/11] change Gradle versions to test against --- .../cdgen/CDGenGradlePluginTest.java | 41 ++++--------------- 1 file changed, 8 insertions(+), 33 deletions(-) diff --git a/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java b/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java index f8cc1b216..d6ac7f4f0 100644 --- a/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java +++ b/cdtool/cdgradle/src/test/java/de/monticore/cdgen/CDGenGradlePluginTest.java @@ -19,30 +19,18 @@ import org.gradle.testkit.runner.GradleRunner; import org.gradle.testkit.runner.TaskOutcome; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; public class CDGenGradlePluginTest { @TempDir File testProjectDir; - @Test - public void testCDGen_v8_4() throws IOException { - this.testCDGen("8.4"); - } - - @Test - public void testCDGen_v8_7() throws IOException { - this.testCDGen("8.7"); - } - - @Test - public void testCDGen_v8_14() throws IOException { - this.testCDGen("8.14"); - } - - void testCDGen(String version) throws IOException { + @ParameterizedTest + @ValueSource(strings = { "8.5", "8.7", "8.14" }) + public void testCDGen(String version) throws IOException { FileUtils.copyDirectory(new File("src/test/resources/cdgradle-it"), testProjectDir); BuildResult result = GradleRunner.create().withPluginClasspath().withGradleVersion(version) @@ -77,21 +65,6 @@ void testCDGen(String version) throws IOException { CD4CodeMill.reset(); } - @Test - public void testCDGenOwnDecorator_v8_4() throws IOException { - this.testCDGenOwnDecorator("8.4"); - } - - @Test - public void testCDGenOwnDecorator_v8_7() throws IOException { - this.testCDGenOwnDecorator("8.7"); - } - - @Test - public void testCDGenOwnDecorator_v8_14() throws IOException { - this.testCDGenOwnDecorator("8.14"); - } - /** * Test the CDGenPlugin with a decorator written in a custom sourceSet and a custom config * template @@ -99,7 +72,9 @@ public void testCDGenOwnDecorator_v8_14() throws IOException { * @param version gradle version * @throws IOException in case of errors */ - void testCDGenOwnDecorator(String version) throws IOException { + @ParameterizedTest + @ValueSource(strings = { "8.5", "8.7", "8.14" }) + public void testCDGenOwnDecorator(String version) throws IOException { FileUtils.copyDirectory(new File("src/test/resources/cdgradle-it"), testProjectDir); BuildResult result = GradleRunner.create().withPluginClasspath().withGradleVersion(version) From 4a56681b0992be4637fdc3c057c203df4172bcfc Mon Sep 17 00:00:00 2001 From: Max Stachon Date: Mon, 9 Mar 2026 13:39:26 +0100 Subject: [PATCH 11/11] add back the comment regarding the eclipse compiler --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 71e7fc1a1..31b433f20 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { id 'java' id "maven-publish" - id "io.github.themrmilchmann.ecj" version "0.2.0" apply(false) + id "io.github.themrmilchmann.ecj" version "0.2.0" apply(false) // Eclipse compiler as it's much faster than javac id "de.se_rwth.codestyle" version "$mc_version" }