Skip to content

Commit

Permalink
Merge branch 'genEMF' into 'dev'
Browse files Browse the repository at this point in the history
genEMF

See merge request monticore/monticore!872
  • Loading branch information
SE-FDr committed Sep 12, 2023
2 parents dd62ab8 + 9d8108f commit a8f8521
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 59 deletions.
14 changes: 7 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ build:
stage: build
script:
- "cd monticore-generator && gradle build $GRADLE_OPTS -Pci -i"
- "cd .. && gradle buildMC $GRADLE_OPTS -Pci -PgenTR=true -i"
- "cd .. && gradle buildMC $GRADLE_OPTS -Pci -PgenTR=true -PgenEMF=true -i"
artifacts:
paths:
- ".gradle"
Expand Down Expand Up @@ -69,7 +69,7 @@ test_01experiments:
dependencies:
- build
script:
- "gradle -p monticore-test/01.experiments build $GRADLE_OPTS -Pci"
- "gradle -p monticore-test/01.experiments build $GRADLE_OPTS -PgenEMF=true -Pci"
only:
- merge_requests
- branches
Expand All @@ -81,7 +81,7 @@ test_02experiments:
dependencies:
- build
script:
- "gradle -p monticore-test/02.experiments build $GRADLE_OPTS -Pci"
- "gradle -p monticore-test/02.experiments build $GRADLE_OPTS -PgenEMF=true -Pci"
only:
- merge_requests
- branches
Expand Down Expand Up @@ -109,7 +109,7 @@ test_it_emf:
dependencies:
- build
script:
- "gradle -p monticore-test/it build -PbuildProfile=emf $GRADLE_OPTS -Pci"
- "gradle -p monticore-test/it build -PbuildProfile=emf -PgenEMF=true $GRADLE_OPTS -Pci"
only:
- merge_requests
- branches
Expand All @@ -121,7 +121,7 @@ test_grammar_it:
dependencies:
- build
script:
- "gradle -p monticore-test/monticore-grammar-it build $GRADLE_OPTS -Pci"
- "gradle -p monticore-test/monticore-grammar-it build -PgenEMF=true $GRADLE_OPTS -Pci"
only:
- merge_requests
- branches
Expand All @@ -133,7 +133,7 @@ test_montitrans:
dependencies:
- build
script:
- "gradle -p monticore-test/montitrans build $GRADLE_OPTS -PgenTR=true -Pci"
- "gradle -p monticore-test/montitrans build $GRADLE_OPTS -PgenTR=true -PgenEMF=true -Pci"
only:
- merge_requests
- branches
Expand All @@ -145,7 +145,7 @@ deploy:
dependencies:
- build
script:
- "gradle deployMC -PmavenPassword=$password -PmavenUser=$username $GRADLE_OPTS -PgenTR=true -Pci"
- "gradle deployMC -PmavenPassword=$password -PmavenUser=$username $GRADLE_OPTS -PgenTR=true -PgenEMF=true -Pci"
only:
- dev
except:
Expand Down
96 changes: 47 additions & 49 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,12 @@ subprojects {
task buildMC {
group("build")
description('Builds the core projects, i.e. the generator, runtime and grammar library.')
dependsOn(
":monticore-grammar:build",
":monticore-runtime:build",
":monticore-runtime-emf:build",
":monticore-grammar-emf:build"

)
dependsOn ":monticore-grammar:build"
dependsOn ":monticore-runtime:build"
if(("true").equals(getProperty('genEMF'))) {
dependsOn ":monticore-runtime-emf:build"
dependsOn ":monticore-grammar-emf:build"
}
}

if(!hasProperty('bootstrap')) {
Expand All @@ -132,14 +131,12 @@ if(!hasProperty('bootstrap')) {
task assembleMC {
group("build")
description('Assembles the core projects, i.e. the generator, runtime and grammar library.')

dependsOn(
":monticore-grammar:assemble",
":monticore-runtime:assemble",
":monticore-runtime-emf:assemble",
":monticore-grammar-emf:assemble"

)
dependsOn ":monticore-grammar:assemble"
dependsOn ":monticore-runtime:assemble"
if(("true").equals(getProperty('genEMF'))) {
dependsOn ":monticore-runtime-emf:assemble"
dependsOn ":monticore-grammar-emf:assemble"
}
}
if(!hasProperty('bootstrap')) {
assembleMC.dependsOn(gradle.includedBuilds*.task(':assemble'))
Expand All @@ -151,14 +148,13 @@ if(!hasProperty('bootstrap')) {
task testMC {
group("build")
description('Tests the core projects, i.e. the generator, runtime and grammar library.')

dependsOn(
":monticore-grammar:test",
":monticore-runtime:test",
":monticore-runtime-emf:test",
":monticore-grammar-emf:test"

)

dependsOn ":monticore-grammar:test"
dependsOn ":monticore-runtime:test"
if(("true").equals(getProperty('genEMF'))) {
dependsOn ":monticore-runtime-emf:test"
dependsOn ":monticore-grammar-emf:test"
}
}

if(!hasProperty('bootstrap')) {
Expand All @@ -173,14 +169,14 @@ if(!hasProperty('bootstrap')) {
task deployMC {
group("build")
description('Publishes the core projects, i.e. the generator, runtime and grammar library.')
dependsOn(
":monticore-grammar:publish",
":monticore-runtime:publish",
":monticore-runtime-emf:publish",
":monticore-grammar-emf:publish"

)

dependsOn ":monticore-grammar:publish"
dependsOn ":monticore-runtime:publish"
if(("true").equals(getProperty('genEMF'))) {
dependsOn ":monticore-runtime-emf:publish"
dependsOn ":monticore-grammar-emf:publish"
}

}

if(!hasProperty('bootstrap')) {
Expand All @@ -196,12 +192,12 @@ task publishMCToMavenLocal {
group("build")
description('Publishes the core projects, i.e. the generator, runtime and grammar library' +
'to the local maven repository.')
dependsOn(
":monticore-grammar:publishToMavenLocal",
":monticore-runtime:publishToMavenLocal",
":monticore-runtime-emf:publishToMavenLocal",
":monticore-grammar-emf:publishToMavenLocal"
)
dependsOn ":monticore-grammar:publishToMavenLocal"
dependsOn ":monticore-runtime:publishToMavenLocal"
if(("true").equals(getProperty('genEMF'))) {
dependsOn ":monticore-runtime-emf:publishToMavenLocal"
dependsOn ":monticore-grammar-emf:publishToMavenLocal"
}
}

if(!hasProperty('bootstrap')) {
Expand Down Expand Up @@ -231,13 +227,12 @@ task buildAll(type: GradleBuild) {
}

task cleanMC {
dependsOn(
":monticore-grammar:clean",
":monticore-runtime:clean",
":monticore-runtime-emf:clean",
":monticore-grammar-emf:clean"

)
dependsOn ":monticore-grammar:clean"
dependsOn ":monticore-runtime:clean"
if(("true").equals(getProperty('genEMF'))) {
dependsOn ":monticore-runtime-emf:clean"
dependsOn ":monticore-grammar-emf:clean"
}
}

if (!hasProperty('bootstrap')) {
Expand All @@ -256,11 +251,14 @@ task sonarMC (type: GradleBuild) {
tasks = [ 'jacocoMergeSubprojects', 'sonarqube' ]
}


configure([project(':monticore-grammar'),
project(':monticore-grammar-emf'),
project(':monticore-runtime'),
project(':monticore-runtime-emf')]){
def projectsToConfigure = [
project(':monticore-grammar'),
project(':monticore-runtime')]
if(("true").equals(getProperty('genEMF'))) {
projectsToConfigure << project(':monticore-grammar-emf')
projectsToConfigure << project(':monticore-runtime-emf')
}
configure(projectsToConfigure){
apply plugin: 'maven-publish'

// configure deployment
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ useLocalRepo=false
# set true or use –PshowTestOutput=true to print test output
showTestOutput=false
genTR=false
genEMF=false
org.gradle.jvmargs=-Xms3072m -Dfile.encoding=UTF-8


Expand Down
11 changes: 8 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ if(!hasProperty('bootstrap')) {

include(':monticore-runtime')
include(':monticore-grammar')
include(':monticore-runtime-emf')
include(':monticore-grammar-emf')
if(("true").equals(getProperty('genEMF'))) {
include(':monticore-runtime-emf')
include(':monticore-grammar-emf')
}

if(!hasProperty('bootstrap')) {
include(':monticore-test:monticore-grammar-it')
Expand All @@ -71,7 +73,6 @@ if(!hasProperty('bootstrap')) {
include(':monticore-test:01experiments:extensionvariants')
include(':monticore-test:01experiments:forAst')
include(':monticore-test:01experiments:forConcSt')
include(':monticore-test:01experiments:forEmfAst')
include(':monticore-test:01experiments:forMill')
include(':monticore-test:01experiments:forParser')
include(':monticore-test:01experiments:forVisitors')
Expand Down Expand Up @@ -125,6 +126,10 @@ if(!hasProperty('bootstrap')) {
include(':monticore-test:montitrans:test-generated-dstls')
}

if ("true".equals(getProperty('genEMF'))) { // Only test EMF if the flag is set
include(':monticore-test:01experiments:forEmfAst')
}

// include 'example'
// project(':example').projectDir = file("monticore-test/example")
}

0 comments on commit a8f8521

Please sign in to comment.