Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
types: [ trigger_after_upstream_deploy ]

env:
GRADLE_VERSION: 8.5 # Gradle version used
GRADLE_VERSION: 8.14.4 # 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 Down
2 changes: 1 addition & 1 deletion .github/workflows/gh_release_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.5
gradle-version: 8.14.4

- name: Build with Gradle
run: gradle :language-server:cd4a-intellij-plugin:buildPlugin :language-server:packageCD4AnalysisVscodePlugin -PbuildVscodePlugin=true -PbuildIntelliJPlugin=true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
types: [opened, synchronize]

env:
GRADLE_VERSION: 8.5 # Gradle version used
GRADLE_VERSION: 8.14.4 # 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 Down
50 changes: 24 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

description = "CD4Analysis"
buildDir = file("$projectDir/target")
layout.buildDirectory = layout.projectDirectory.dir("target")

ext {
findbugs_version = "3.0.2"
Expand Down Expand Up @@ -43,27 +43,25 @@ subprojects {
apply plugin: 'maven-publish'
apply plugin: 'de.se_rwth.codestyle'

ecj {
compilerVersion = "3.43.0"
}

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

allprojects {
group = "de.monticore.lang.cd4analysis"
}

ext.grammarDir = 'src/main/grammars'
buildDir = file("$projectDir/target")
layout.buildDirectory = layout.projectDirectory.dir("target")

repositories {
if (("true").equals(getProperty('useLocalRepo'))) {
mavenLocal()
}
maven {
credentials.username mavenUser
credentials.password mavenPassword
url repo
credentials.username = mavenUser
credentials.password = mavenPassword
url = repo
}
mavenCentral()
}
Expand All @@ -73,19 +71,19 @@ subprojects {
archiveClassifier = project.name
}

tasks.withType(Test) {
tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging {
// controls whether test output is shown
showExceptions true
showCauses true
showStackTraces true
exceptionFormat TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
info {
events TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
}
}
afterTest { desc, result ->
Expand All @@ -100,9 +98,9 @@ subprojects {
}
}

tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.deprecation false
options.deprecation = false
options.warnings = false
options.forkOptions.jvmArgs += ["-Xmx4G"]
// TODO: reevaluate with new ecj plugin
Expand Down Expand Up @@ -141,13 +139,13 @@ publishing {
.findAll { it != ':cdlang' }
.each { subprojectName ->
publ.artifact(project(subprojectName).tasks.jar) {
group "de.monticore.lang"
group = "de.monticore.lang"
}
}

publ.artifact(project(":cdtool").tasks.jar) {
group "de.monticore.lang"
classifier "tool"
group = "de.monticore.lang"
classifier = "tool"
}

publ.artifact(project(":cdtool").tasks.shadowJar)
Expand All @@ -157,13 +155,13 @@ publishing {

if (("false").equals(getProperty('publishMain'))) {
publ.artifact(project(":cdlang").tasks.testSourcesJar) {
group "de.monticore.lang"
group = "de.monticore.lang"
}
}
}
repositories.maven {
credentials.username mavenUser
credentials.password mavenPassword
credentials.username = mavenUser
credentials.password = mavenPassword
def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/"
def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
Expand Down
4 changes: 2 additions & 2 deletions cd-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ publishing {
}
}
repositories.maven {
credentials.username mavenUser
credentials.password mavenPassword
credentials.username = mavenUser
credentials.password = mavenPassword
def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/"
def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
Expand Down
45 changes: 24 additions & 21 deletions cdlang/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
id "base"
id "maven-publish" // Only used to publish the trafos - everything else is published in the root project
id "de.monticore.generator-withtr" version "$mc_version" // MontiCore Plugin with TR support
}

archivesBaseName = "cd4analysis"
base {
archivesName = "cd4analysis"
}

def var_path = "de.monticore"
group = "de.monticore.lang"
Expand All @@ -19,10 +22,10 @@ def withDSTLGen = ("true").equals(getProperty('genTR'))
ext {
grammar_classifier = "grammars"
grammarDir = "src/main/grammars"
grammarOutDir = "$buildDir/generated-sources/monticore/sourcecode"
trGrammarOutDir = "$buildDir/generated-sources/monticore-tr/sourcecode"
grammarOutDir = layout.buildDirectory.dir("generated-sources/monticore/sourcecode")
trGrammarOutDir = layout.buildDirectory.dir("generated-sources/monticore-tr/sourcecode")
testGrammarDir = "src/test/grammars"
testGrammarOutDir = "$buildDir/generated-test-sources/monticore/trafo-sourcecode"
testGrammarOutDir = layout.buildDirectory.dir("generated-test-sources/monticore/trafo-sourcecode")
}


Expand Down Expand Up @@ -116,31 +119,31 @@ compileTestJava {
dependsOn generateTestTrafos
}

tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.deprecation false
options.deprecation = false
options.warnings = false
options.headerOutputDirectory.convention(null)
}

tasks.withType(Test) {
tasks.withType(Test).configureEach {
// this won't work with setting the mills, as they can interleave and break thigs
// maxParallelForks = Runtime.runtime.availableProcessors() ?: 1
}

tasks.withType(Test) {
tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging {
// controls whether test output is shown
showExceptions true
showCauses true
showStackTraces true
exceptionFormat TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
info {
events TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
}
}
afterTest { desc, result ->
Expand Down Expand Up @@ -170,25 +173,25 @@ tasks.check.dependsOn(tasks.compileCd4cIntegTestJava)


// build javadoc jar in addition
task javadocJar(type: Jar) {
tasks.register('javadocJar', Jar) {
from javadoc
archiveClassifier = "javadoc"
}
// generated java doc contains errors, disable for now
javadoc.failOnError(false)
javadoc.failOnError = false

// build test sources jar in addition
task testSourcesJar(type: Jar) {
tasks.register('testSourcesJar', Jar) {
from sourceSets.test.output + sourceSets.test.allSource
archiveClassifier = "testSources"
}

tasks.withType(Jar) {
tasks.withType(Jar).configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

task testReport(type: TestReport) {
destinationDirectory = file("$buildDir/reports/allTests")
tasks.register('testReport', TestReport) {
destinationDirectory = layout.buildDirectory.dir("reports/allTests")
// Include the results from the 'test' task
testResults.from(tasks.withType(Test))
}
Expand Down
8 changes: 5 additions & 3 deletions cdtool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
}
}

task toolJar(type: Jar) {
tasks.register('toolJar', Jar) {
from sourceSets.main.output + sourceSets.main.allSource
archiveClassifier = "tool"
}
Expand All @@ -78,8 +78,10 @@ sourceSets {
}

dependencies {
tooltestImplementation platform('org.junit:junit-bom:5.9.1')
tooltestImplementation 'org.junit.jupiter:junit-jupiter'
tooltestImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
tooltestImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"
tooltestRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
tooltestRuntimeOnly "org.junit.platform:junit-platform-launcher:$junit_version"
}

tasks.register('toolTest', Test) {
Expand Down
12 changes: 7 additions & 5 deletions cdtool/cdgradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ dependencies {
cdTool "de.monticore.lang:cd4analysis:$mc_version"
compileOnly(project(":cdlang")) // As the main/cdtool dependency does not have an api dependency to cdlang

testImplementation "org.junit.jupiter:junit-jupiter:$junit_version"
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junit_version"
testImplementation gradleTestKit()
testImplementation(project(":cdlang")) // For symbol table tests, etc.
}
Expand All @@ -40,8 +42,8 @@ gradlePlugin {

publishing {
repositories.maven {
credentials.username mavenUser
credentials.password mavenPassword
credentials.username = mavenUser
credentials.password = mavenPassword
def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/"
def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
Expand All @@ -68,7 +70,7 @@ processResources {
dependsOn generateResources
}

tasks.withType(Test) {
tasks.withType(Test).configureEach {
useJUnitPlatform()
dependsOn project.tasks.getByPath(":cdlang:jar")
dependsOn project.tasks.getByPath(":cd-runtime:jar")
Expand Down
16 changes: 7 additions & 9 deletions language-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ plugins {
id 'maven-publish'
}

group 'de.monticore.lang'
version mc_version

sourceCompatibility = JavaVersion.VERSION_21
group = 'de.monticore.lang'
version = mc_version

repositories {
mavenCentral()
maven {
credentials.username mavenUser
credentials.password mavenPassword
url repo
credentials.username = mavenUser
credentials.password = mavenPassword
url = repo
}
}

Expand Down Expand Up @@ -68,7 +66,7 @@ task autoconfigure(type: de.mclsg.task.AutoconfigureTask) {
languageName = "de.monticore.CD4Analysis"
fileExtension = "cd"
}
if(("true").equals(getProperty('buildVscodePlugin'))){
if (("true").equals(getProperty('buildVscodePlugin'))) {
including(TaskTypes.VSCODE_PLUGIN)
}
}
Expand All @@ -78,7 +76,7 @@ task autoconfigureCD4Code(type: de.mclsg.task.AutoconfigureTask) {
languageName = "de.monticore.CD4Code"
fileExtension = "cd"
}
if(("true").equals(getProperty('buildVscodePlugin'))){
if (("true").equals(getProperty('buildVscodePlugin'))) {
including(TaskTypes.VSCODE_PLUGIN)
}
}
Expand Down
6 changes: 3 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ pluginManagement {
mavenLocal()
}
maven {
credentials.username mavenUser
credentials.password mavenPassword
url repo
credentials.username = mavenUser
credentials.password = mavenPassword
url = repo
}
mavenCentral()
gradlePluginPortal()
Expand Down
9 changes: 5 additions & 4 deletions symtabdefinitiontool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ dependencies {
implementation "org.antlr:antlr4-runtime:$antlr_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"
testImplementation "org.junit.vintage:junit-vintage-engine:$junit_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junit_version"
}

task toolJar(type: Jar) {
tasks.register('toolJar', Jar) {
from sourceSets.main.output + sourceSets.main.allSource
}

Expand All @@ -45,8 +44,10 @@ sourceSets {
}

dependencies {
tooltestImplementation platform('org.junit:junit-bom:5.9.1')
tooltestImplementation 'org.junit.jupiter:junit-jupiter'
tooltestImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
tooltestImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"
tooltestRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
tooltestRuntimeOnly "org.junit.platform:junit-platform-launcher:$junit_version"
}

tasks.register('toolTest', Test) {
Expand Down
Loading
Loading