Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/deploy_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ on:
types: [ trigger_after_upstream_deploy ]

env:
GRADLE_VERSION: 7.6 # Gradle version used
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 }}"

Expand All @@ -29,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: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
Expand All @@ -45,6 +51,11 @@ jobs:
steps:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ on:
types: [opened, synchronize]

env:
GRADLE_VERSION: 7.6 # Gradle version used
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 }}"

Expand All @@ -30,6 +31,11 @@ jobs:
steps:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.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.
Expand Down
13 changes: 10 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ 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 "de.se_rwth.codestyle" version "$mc_version"
}


description = "CD4Analysis"
buildDir = file("$projectDir/target")

Expand All @@ -24,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'
}
Expand All @@ -37,12 +39,17 @@ repositories {
}

subprojects {

apply plugin: 'java-library'
apply plugin: 'io.github.themrmilchmann.ecj'
apply plugin: 'maven-publish'
apply plugin: 'de.se_rwth.codestyle'

sourceCompatibility = JavaVersion.VERSION_11
ecj {
compilerVersion = "3.43.0"
}

sourceCompatibility = JavaVersion.VERSION_21

allprojects {
group = "de.monticore.lang.cd4analysis"
Expand Down Expand Up @@ -105,7 +112,7 @@ subprojects {
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
languageVersion = JavaLanguageVersion.of(21)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cdtool/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_v7_4_2() throws IOException {
testCDGen("7.4.2");
}

@Test
public void testCDGen_v8_0_1() throws IOException {
this.testCDGen("8.0.1");
}

@Test
public void testCDGen_v8_7() throws IOException {
this.testCDGen("8.7");
}

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)
Expand Down Expand Up @@ -77,29 +65,16 @@ void testCDGen(String version) throws IOException {
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");
}

@Test
public void testCDGenOwnDecorator_v8_7() throws IOException {
this.testCDGenOwnDecorator("8.7");
}

/**
* Test the CDGenPlugin with a decorator written in a custom sourceSet and a custom config
* template
*
* @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)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion language-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
group 'de.monticore.lang'
version mc_version

sourceCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_21

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion symtabdefinitiontool/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion trafo-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand Down
Loading