Skip to content
Open
Show file tree
Hide file tree
Changes from 8 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
11 changes: 8 additions & 3 deletions .github/workflows/deploy_release_mc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
packages: write

env:
GRADLE_VERSION: 7.6 # Gradle version used
GRADLE_VERSION: 8.5 # Gradle version used
GRADLE_CLI_OPTS: "-Pci" # CLI option passed to Gradle

jobs:
Expand All @@ -20,9 +20,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Gradle DeployMC
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{env.GRADLE_VERSION}}
# pass the tag as the version property (${{ github.ref_name }})
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/deploy_snapshot_mc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:
packages: write

env:
GRADLE_VERSION: 7.6 # Gradle version used
GRADLE_VERSION: 8.5 # Gradle version used
GRADLE_CLI_OPTS: "-Pci" # CLI option passed to Gradle

jobs:
Expand All @@ -28,9 +28,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Deploy the snapshot
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{env.GRADLE_VERSION}}
arguments: deployMC ${{env.GRADLE_CLI_OPTS}} -PmavenPassword=${{secrets.SE_NEXUS_PASSWORD}} -PmavenUser=${{secrets.SE_NEXUS_USER}} -PgenEMF=true -PgenTR=true -PgenTagging=true
Expand Down
47 changes: 46 additions & 1 deletion .github/workflows/gradle_mc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:


env:
GRADLE_VERSION: 7.6 # Gradle version used
GRADLE_VERSION: 8.5 # Gradle version used
GRADLE_CLI_OPTS: "-Pci --build-cache " # CLI option passed to Gradle
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: "test-cache-${{ github.head_ref }}.${{ github.sha }}"

Expand All @@ -34,6 +34,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:
Expand All @@ -52,6 +57,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:
Expand All @@ -71,6 +81,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:
Expand All @@ -90,6 +105,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:
Expand All @@ -109,6 +129,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:
Expand All @@ -130,6 +155,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:
Expand All @@ -149,6 +179,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:
Expand All @@ -168,6 +203,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:
Expand All @@ -187,6 +227,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:
Expand Down
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ subprojects {
apply plugin: 'java-library'
apply plugin: 'io.github.themrmilchmann.ecj'

ecj {
compilerVersion = "3.44.0"
}

tasks.withType(Test) {
useJUnitPlatform()
Expand Down Expand Up @@ -94,8 +97,8 @@ subprojects {
}

tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
options.encoding = "UTF-8"
options.deprecation = false
options.warnings = false
Expand All @@ -104,7 +107,7 @@ subprojects {
java {
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(11)
languageVersion = JavaLanguageVersion.of(21)
}
}

Expand Down
10 changes: 5 additions & 5 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ information about the example `Automata` language are available in
We start with the JDK: Please perform the following steps to install the
Java Development Kit (JDK) and validate that the installation was successful:

- Install a JDK with at least version 11 provided by Oracle or OpenJDK.
- Install a JDK with at least version 21 provided by Oracle or OpenJDK.
- Make sure the environment variable `JAVA_HOME` points to the installed JDK, and
*not* to the JRE, e.g., the following would be good:
- `/user/lib/jvm/java-11-openjdk` on UNIX or
- `C:\Program Files\Java\jdk-11.*` on Windows.
- `/user/lib/jvm/java-21-openjdk` on UNIX or
- `C:\Program Files\Java\jdk-21.*` on Windows.
You will need this in order to run the Java compiler for compiling
the generated Java source files.
- Also make sure that the system variable is set such that the Java
Expand All @@ -40,8 +40,8 @@ Java Development Kit (JDK) and validate that the installation was successful:
- Test whether the setup was successful. Open a command line shell in
any directory. Execute the command `javac -version`. If this command
is recognized and the shell displays the version of the installed
JDK (e.g., `javac 11.0.5`), then the setup was successful.
- *(Optional)* Install [Gradle](https://gradle.org/install/) version 7.6.
JDK (e.g., `javac 21.0.10`), then the setup was successful.
- *(Optional)* Install [Gradle](https://gradle.org/install/) version 8.5.

Now we have the prerequisites to run MontiCore from the command line (CLI)
or alternatively using Gradle.
Expand Down
4 changes: 2 additions & 2 deletions docs/Gradle.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ plugins {
}

java {
// Configure the java toolchain to use Java 11 (overriding the locally installed JDK)
// Configure the java toolchain to use Java 21 (overriding the locally installed JDK)
// https://docs.gradle.org/current/userguide/toolchains.html
toolchain {
languageVersion = JavaLanguageVersion.of(11)
languageVersion = JavaLanguageVersion.of(21)
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ junit_version = 5.14.1
junit_platform_version = 1.14.1
emf_compare_version =1.2.0
ecore_version =2.16.0
commons_lang3_version = 3.8.1
commons_lang3_version = 3.20.0
freemarker_version = 2.3.34
guava_version =31.1-jre
shadow_plugin_version=7.1.2
shadow_plugin_version=8.3.9

cd4a_version =7.8.0
21 changes: 13 additions & 8 deletions monticore-generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
plugins {
id "java-library"
id "io.github.themrmilchmann.ecj" version "0.2.0" // Eclipse compiler as it's much faster than javac
id "com.github.johnrengelman.shadow" version "$shadow_plugin_version"
id "com.gradleup.shadow" version "$shadow_plugin_version"
id 'maven-publish'
id "jacoco"
}
Expand All @@ -21,6 +21,10 @@ description = 'MontiCore: Generator'

ext.grammarDir = 'src/main/grammars'

ecj {
compilerVersion = "3.44.0"
}

allprojects {
group = "de.monticore"
buildDir = file("$projectDir/target")
Expand All @@ -44,34 +48,35 @@ dependencies {
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
implementation "org.freemarker:freemarker:$freemarker_version"
implementation "commons-cli:commons-cli:$commons_cli_version"
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.10.0'
implementation "org.apache.commons:commons-text:$commons_text_version"

// implementation 'org.slf4j:slf4j-api:1.7.10'
implementation 'ch.qos.logback:logback-classic:[1.2.9,1.3.0)' // we appear to be incompatible with logback >= 1.3.0
implementation 'ch.qos.logback:logback-core:[1.2.9,1.3.0)'

implementation "de.monticore.lang:cd4analysis:$cd4a_version"
implementation "org.antlr:antlr4:$antlr_version"
implementation 'org.apache.groovy:groovy:4.0.23'
implementation("com.google.guava:guava:$guava_version")
implementation "org.apache.groovy:groovy:$groovy_version"
implementation "com.google.guava:guava:$guava_version"
implementation "com.github.spotbugs:spotbugs-annotations:$spotbugs_annotations_version"
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
testImplementation 'com.github.javaparser:javaparser-symbol-solver-core:3.24.2'
testImplementation 'org.mockito:mockito-core:4.5.1'
testImplementation "org.mockito:mockito-core:$mockito_version"

}
allprojects {
apply plugin: "java"
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
options.encoding = "UTF-8"
options.deprecation = false
options.warnings = false
}
java {
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(11)
languageVersion = JavaLanguageVersion.of(21)
}
}
dependencies {
Expand Down
2 changes: 2 additions & 0 deletions monticore-generator/gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ dependencies {
implementation "de.monticore:monticore-runtime:$previous_mc_version" // Required due to json -> substitute this to remove the runtime from the gradle projects classpath
mcTool project(":") // depend on the generator subproject

implementation "com.github.spotbugs:spotbugs-annotations:$spotbugs_annotations_version"

testImplementation gradleTestKit()

testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
Expand Down
Loading
Loading