diff --git a/monticore-grammar-emf/build.gradle b/monticore-grammar-emf/build.gradle index dfce173039..65b1349211 100644 --- a/monticore-grammar-emf/build.gradle +++ b/monticore-grammar-emf/build.gradle @@ -29,28 +29,28 @@ dependencies { testImplementation testFixtures(project(':monticore-runtime')) } -def srcDir = "$buildDir/main/java" -def srcResourcesDir = "$buildDir/main/resources" -def testDir = "$buildDir/test/java" +def srcDir = layout.buildDirectory.dir("main/java") +def srcResourcesDir = layout.buildDirectory.dir("main/resources") +def testDir = layout.buildDirectory.dir("test/java") -task copySrc(type: Copy) { +tasks.register('copySrc', Copy) { from "${project(':monticore-grammar').projectDir}/src/main/java" into srcDir } -task copySrcResources(type: Copy) { - from "${project(':monticore-grammar').projectDir}/src/main/resources" - into srcResourcesDir +tasks.register('copySrcResources', Copy) { + from "${project(':monticore-grammar').projectDir}/src/main/resources" + into srcResourcesDir } -task copyTest(type: Copy) { +tasks.register('copyTest', Copy) { from "${project(':monticore-grammar').projectDir}/src/test/java" into testDir } -task copyTestResources(type: Copy) { - from "${project(':monticore-grammar').projectDir}/src/test/resources" - into "$buildDir/test/resources" +tasks.register('copyTestResources', Copy) { + from "${project(':monticore-grammar').projectDir}/src/test/resources" + into layout.buildDirectory.dir("resources/test") } def grammarDir = "${project(':monticore-grammar').projectDir}/src/main/grammars" @@ -63,40 +63,27 @@ sourceSets { "${project(':monticore-grammar').projectDir}/src/main/examples"] } -task generate {} +tasks.register('generate') {} tasks.named('generateMCGrammars') { - grammar.setFrom(file grammarDir) + grammar = file(grammarDir) script = "de/monticore/monticore_emf.groovy" - modelPath "${project(':monticore-grammar').projectDir}/src/main/grammars" - handcodedPath srcDir + modelPath = "${project(':monticore-grammar').projectDir}/src/main/grammars" + handWrittenCodeDir = files(srcDir) genINT = true dependsOn(copySrc, copyTest, copyTestResources) } generateTestMCGrammars { script = "de/monticore/monticore_emf.groovy" - modelPath("$grammarDir", "${project(':monticore-grammar').projectDir}/src/test/grammars", "${project(':monticore-grammar').projectDir}/src/main/examples") - handcodedPath(srcDir, testDir) + modelPath = files("$grammarDir", "${project(':monticore-grammar').projectDir}/src/test/grammars", "${project(':monticore-grammar').projectDir}/src/main/examples") + handWrittenCodeDir = files(srcDir, testDir) genINT = true dependsOn(copySrc, copyTest, copyTestResources) } test { useJUnitPlatform() - exclude '**/CommentsOnASTTest.class' - exclude '**/SwitchStatementValidTest.class' - exclude '**/GrammarInheritanceCycleTest.class' - exclude '**/GrammarNameEqualsFileNameTest.class' - exclude '**/MCGrammarParserTest.class' - exclude '**/MCGrammarPrettyPrinterTest.class' - exclude '**/SynthesizeSymTypeFromMCBasicTypesTest.class' - exclude '**/SynthesizeSymTypeFromMCCollectionTypesTest.class' - exclude '**/SynthesizeSymTypeFromMCSimpleGenericTypesTest.class' - exclude '**/SynthesizeSymTypeFromMCFullGenericTypesTest.class' - exclude '**/SynthesizeSymTypeFromMCArrayTypesTest.class' - exclude '**/MCType2SymTypeExpressionTest.class' - exclude '**/ComponentTypeSymbolDeSerTest.class' } diff --git a/monticore-grammar/src/test/java/de/monticore/comments/CommentsOnASTTest.java b/monticore-grammar/src/test/java/de/monticore/comments/CommentsOnASTTest.java index eaa788ae46..c0f3b60121 100644 --- a/monticore-grammar/src/test/java/de/monticore/comments/CommentsOnASTTest.java +++ b/monticore-grammar/src/test/java/de/monticore/comments/CommentsOnASTTest.java @@ -39,7 +39,7 @@ public void before() { @Test public void testComments() throws IOException { - Optional ast = parser.parse("src/test/resources/de/monticore/comments/CommentsTest.jlight"); + Optional ast = parser.parse("target/resources/test/de/monticore/comments/CommentsTest.jlight"); assertTrue(ast.isPresent()); assertFalse(parser.hasErrors()); diff --git a/monticore-grammar/src/test/java/de/monticore/grammar/GrammarGlobalScopeTestFactory.java b/monticore-grammar/src/test/java/de/monticore/grammar/GrammarGlobalScopeTestFactory.java index 11ade9e768..90dc75aab3 100644 --- a/monticore-grammar/src/test/java/de/monticore/grammar/GrammarGlobalScopeTestFactory.java +++ b/monticore-grammar/src/test/java/de/monticore/grammar/GrammarGlobalScopeTestFactory.java @@ -17,8 +17,7 @@ public static Grammar_WithConceptsGlobalScope create() { // reset global scope scope.clear(); scope.setFileExt("mc4"); - scope.getSymbolPath().addEntry(Paths.get("src/test/resources")); - scope.getSymbolPath().addEntry(Paths.get("target/test/resources")); + scope.getSymbolPath().addEntry(Paths.get("target/resources/test")); return (Grammar_WithConceptsGlobalScope) scope; } diff --git a/monticore-grammar/src/test/java/de/monticore/grammar/MCGrammarParserTest.java b/monticore-grammar/src/test/java/de/monticore/grammar/MCGrammarParserTest.java index c1e76e8384..47fe264f31 100644 --- a/monticore-grammar/src/test/java/de/monticore/grammar/MCGrammarParserTest.java +++ b/monticore-grammar/src/test/java/de/monticore/grammar/MCGrammarParserTest.java @@ -29,7 +29,7 @@ public void before() { @Test public void testParse() throws IOException { - String model = "src/test/resources/de/monticore/Statechart.mc4"; + String model = "target/resources/test/de/monticore/Statechart.mc4"; Grammar_WithConceptsParser parser = Grammar_WithConceptsMill.parser(); @@ -79,7 +79,7 @@ public void testSematicPred() throws IOException { @Test public void testScript() throws IOException { - String model = "src/test/resources/de/monticore/script/ScriptExample.mc4"; + String model = "target/resources/test/de/monticore/script/ScriptExample.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -91,7 +91,7 @@ public void testScript() throws IOException { @Test public void testAutomatonV1() throws IOException { - String model = "src/test/resources/de/monticore/script/AutomatonV1.mc4"; + String model = "target/resources/test/de/monticore/script/AutomatonV1.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -103,7 +103,7 @@ public void testAutomatonV1() throws IOException { @Test public void testAutomatonV2() throws IOException { - String model = "src/test/resources/de/monticore/script/AutomatonV2.mc4"; + String model = "target/resources/test/de/monticore/script/AutomatonV2.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -115,7 +115,7 @@ public void testAutomatonV2() throws IOException { @Test public void testAutomatonV3() throws IOException { - String model = "src/test/resources/de/monticore/script/AutomatonV3.mc4"; + String model = "target/resources/test/de/monticore/script/AutomatonV3.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -125,7 +125,7 @@ public void testAutomatonV3() throws IOException { @Test public void testHierarchicalAutomaton() throws IOException { - String model = "src/test/resources/de/monticore/script/HierarchicalAutomaton.mc4"; + String model = "target/resources/test/de/monticore/script/HierarchicalAutomaton.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -137,7 +137,7 @@ public void testHierarchicalAutomaton() throws IOException { @Test public void testAutomatonWithInvsComp() throws IOException { - String model = "src/test/resources/de/monticore/script/AutomatonWithInvsComp.mc4"; + String model = "target/resources/test/de/monticore/script/AutomatonWithInvsComp.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -153,7 +153,7 @@ public void testAutomatonWithInvsComp() throws IOException { @Test public void testAutomatonWithInvs() throws IOException { - String model = "src/test/resources/de/monticore/script/AutomatonWithInvs.mc4"; + String model = "target/resources/test/de/monticore/script/AutomatonWithInvs.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -163,7 +163,7 @@ public void testAutomatonWithInvs() throws IOException { @Test public void testAutomatonWithInvsAndStartRule() throws IOException { - String model = "src/test/resources/de/monticore/script/AutomatonWithInvsAndStartRule.mc4"; + String model = "target/resources/test/de/monticore/script/AutomatonWithInvsAndStartRule.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -173,7 +173,7 @@ public void testAutomatonWithInvsAndStartRule() throws IOException { @Test public void testGrammarSymbolTableInfo() throws IOException { - String model = "src/test/resources/Automaton.mc4"; + String model = "target/resources/test/Automaton.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); Optional result = parser.parse(model); @@ -197,7 +197,7 @@ public void testGrammarSymbolTableInfo() throws IOException { @Test public void testPackageNameWithPointsDefined() throws IOException { - String model = "src/test/resources/de/monticore/point.in.packagename/PackagePathTest.mc4"; + String model = "target/resources/test/de/monticore/point.in.packagename/PackagePathTest.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); parser.parse(model); @@ -210,7 +210,7 @@ public void testPackageNameWithPointsDefined() throws IOException { @Test public void testPackageWrongPackageDefined() throws IOException { - String model = "src/test/resources/de/monticore/WrongPackage.mc4"; + String model = "target/resources/test/de/monticore/WrongPackage.mc4"; Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); parser.parse(model); diff --git a/monticore-grammar/src/test/java/de/monticore/grammar/MCGrammarPrettyPrinterTest.java b/monticore-grammar/src/test/java/de/monticore/grammar/MCGrammarPrettyPrinterTest.java index a8576fb251..cdc5346c8a 100644 --- a/monticore-grammar/src/test/java/de/monticore/grammar/MCGrammarPrettyPrinterTest.java +++ b/monticore-grammar/src/test/java/de/monticore/grammar/MCGrammarPrettyPrinterTest.java @@ -32,7 +32,7 @@ public void before() { @Test // Test simple grammar public void testStatechart() throws IOException { - String model = "src/test/resources/de/monticore/Statechart.mc4"; + String model = "target/resources/test/de/monticore/Statechart.mc4"; // Parsing input Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); @@ -58,7 +58,7 @@ public void testStatechart() throws IOException { @Test // Test grammar with symbols and scopes public void testAutomaton() throws IOException { - String model = "src/test/resources/Automaton.mc4"; + String model = "target/resources/test/Automaton.mc4"; // Parsing input Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); @@ -84,7 +84,7 @@ public void testAutomaton() throws IOException { @Test // Test grammar with symbols and scopes public void testGrammar() throws IOException { - String model = "src/test/resources/de/monticore/TestGrammar.mc4"; + String model = "target/resources/test/de/monticore/TestGrammar.mc4"; // Parsing input Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); @@ -110,7 +110,7 @@ public void testGrammar() throws IOException { @Test // test lexicals with lexer commands and end actions public void testLexicals() throws IOException { - String model = "src/test/resources/de/monticore/common/TestLexicals.mc4"; + String model = "target/resources/test/de/monticore/common/TestLexicals.mc4"; // Parsing input Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); @@ -136,7 +136,7 @@ public void testLexicals() throws IOException { @Test // test annotations public void testAnnotations() throws IOException { - String model = "src/test/resources/de/monticore/Annotations.mc4"; + String model = "target/resources/test/de/monticore/Annotations.mc4"; // Parsing input Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); diff --git a/monticore-grammar/src/test/java/de/monticore/grammar/cocos/GrammarInheritanceCycleTest.java b/monticore-grammar/src/test/java/de/monticore/grammar/cocos/GrammarInheritanceCycleTest.java index 071b996fbb..f940a4b49f 100644 --- a/monticore-grammar/src/test/java/de/monticore/grammar/cocos/GrammarInheritanceCycleTest.java +++ b/monticore-grammar/src/test/java/de/monticore/grammar/cocos/GrammarInheritanceCycleTest.java @@ -30,7 +30,7 @@ public void init() { @Test public void testInvalid() throws IOException { Grammar_WithConceptsParser parser = new Grammar_WithConceptsParser(); - Optional grammar = parser.parse("src/test/resources/de/monticore/grammar/cocos/invalid/A4023/A4023.mc4"); + Optional grammar = parser.parse("target/resources/test/de/monticore/grammar/cocos/invalid/A4023/A4023.mc4"); getFindings().clear(); checker.checkAll(grammar.get()); diff --git a/monticore-grammar/src/test/java/de/monticore/grammar/cocos/GrammarNameEqualsFileNameTest.java b/monticore-grammar/src/test/java/de/monticore/grammar/cocos/GrammarNameEqualsFileNameTest.java index 1d663ed342..25e83b59d6 100644 --- a/monticore-grammar/src/test/java/de/monticore/grammar/cocos/GrammarNameEqualsFileNameTest.java +++ b/monticore-grammar/src/test/java/de/monticore/grammar/cocos/GrammarNameEqualsFileNameTest.java @@ -23,7 +23,7 @@ public void init() { @Test public void testInvalidFilename() throws IOException { Log.getFindings().clear(); - parser.parse("src/test/resources/de/monticore/grammar/cocos/invalid/A4003/A4003.mc4"); + parser.parse("target/resources/test/de/monticore/grammar/cocos/invalid/A4003/A4003.mc4"); assertFalse(Log.getFindings().isEmpty()); for(Finding f : Log.getFindings()){ @@ -35,7 +35,7 @@ public void testInvalidFilename() throws IOException { @Test public void testInvalidPackage() throws IOException { Log.getFindings().clear(); - parser.parse("src/test/resources/de/monticore/grammar/cocos/invalid/A4004/A4004.mc4"); + parser.parse("target/resources/test/de/monticore/grammar/cocos/invalid/A4004/A4004.mc4"); assertFalse(Log.getFindings().isEmpty()); for(Finding f : Log.getFindings()){ diff --git a/monticore-grammar/src/test/java/de/monticore/javalight/cocos/JavaLightCocoTest.java b/monticore-grammar/src/test/java/de/monticore/javalight/cocos/JavaLightCocoTest.java index 8eaee288bb..c21f3d44ac 100644 --- a/monticore-grammar/src/test/java/de/monticore/javalight/cocos/JavaLightCocoTest.java +++ b/monticore-grammar/src/test/java/de/monticore/javalight/cocos/JavaLightCocoTest.java @@ -49,8 +49,7 @@ public void before() { JavaLightTypeCheck3.init(); globalScope = TestJavaLightMill.globalScope(); - globalScope.getSymbolPath().addEntry(Paths.get("src/test/resources")); - globalScope.getSymbolPath().addEntry(Paths.get("target/test/resources")); + globalScope.getSymbolPath().addEntry(Paths.get("target/resources/test")); } protected void testValid(String fileName, String methodName, JavaLightCoCoChecker checker) { diff --git a/monticore-grammar/src/test/java/de/monticore/statements/cocos/SwitchStatementValidTest.java b/monticore-grammar/src/test/java/de/monticore/statements/cocos/SwitchStatementValidTest.java index 7fe98e455e..c633bbf33b 100644 --- a/monticore-grammar/src/test/java/de/monticore/statements/cocos/SwitchStatementValidTest.java +++ b/monticore-grammar/src/test/java/de/monticore/statements/cocos/SwitchStatementValidTest.java @@ -92,7 +92,7 @@ static Stream exprAndErrorProvider() { void testSwitchEnumConstantsValid(String expr) throws IOException { // Given IMCCommonStatementsArtifactScope imported = - new MCCommonStatementsSymbols2Json().load("src/test/resources/de/monticore/statements/Enum.sym"); + new MCCommonStatementsSymbols2Json().load("target/resources/test/de/monticore/statements/Enum.sym"); TestMCCommonStatementsMill.globalScope().addSubScope(imported); VariableSymbol variable = TestMCCommonStatementsMill.variableSymbolBuilder() @@ -123,7 +123,7 @@ void testSwitchEnumConstantsValid(String expr) throws IOException { void testSwitchEnumConstantsInvalid(String expr, String error) throws IOException { // Given IMCCommonStatementsArtifactScope imported = - new MCCommonStatementsSymbols2Json().load("src/test/resources/de/monticore/statements/Enum.sym"); + new MCCommonStatementsSymbols2Json().load("target/resources/test/de/monticore/statements/Enum.sym"); TestMCCommonStatementsMill.globalScope().addSubScope(imported); VariableSymbol variable = TestMCCommonStatementsMill.variableSymbolBuilder() diff --git a/monticore-grammar/src/test/java/de/monticore/symbols/compsymbols/_symboltable/ComponentTypeSymbolDeSerTest.java b/monticore-grammar/src/test/java/de/monticore/symbols/compsymbols/_symboltable/ComponentTypeSymbolDeSerTest.java index d0f89ae124..65f035f8e2 100644 --- a/monticore-grammar/src/test/java/de/monticore/symbols/compsymbols/_symboltable/ComponentTypeSymbolDeSerTest.java +++ b/monticore-grammar/src/test/java/de/monticore/symbols/compsymbols/_symboltable/ComponentTypeSymbolDeSerTest.java @@ -20,7 +20,7 @@ public class ComponentTypeSymbolDeSerTest { - protected static final String RELATIVE_DIR = "src/test/resources/de/monticore/symbols/compsymbols/_symboltable/"; + protected static final String RELATIVE_DIR = "target/resources/test/de/monticore/symbols/compsymbols/_symboltable/"; protected ComponentTypeSymbolDeSer deSer; protected CompSymbolsSymbols2Json comp2json; diff --git a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCArrayTypesTest.java b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCArrayTypesTest.java index 50509956e9..9cf1a49055 100644 --- a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCArrayTypesTest.java +++ b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCArrayTypesTest.java @@ -49,7 +49,7 @@ public void init() { gs.add(DefsTypeBasic.type("Person")); CombineExpressionsWithLiteralsSymbols2Json symbols2Json = new CombineExpressionsWithLiteralsSymbols2Json(); - ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("src/test/resources/de/monticore/types/check/Persondex.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("target/resources/test/de/monticore/types/check/Persondex.cesym"); as.setEnclosingScope(gs); } diff --git a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCBasicTypesTest.java b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCBasicTypesTest.java index e5c73244d4..91cda4cd5a 100644 --- a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCBasicTypesTest.java +++ b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCBasicTypesTest.java @@ -44,7 +44,7 @@ public void init() { gs.add(DefsTypeBasic.type("Person")); CombineExpressionsWithLiteralsSymbols2Json symbols2Json = new CombineExpressionsWithLiteralsSymbols2Json(); - ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("src/test/resources/de/monticore/types/check/Persondex.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("target/resources/test/de/monticore/types/check/Persondex.cesym"); as.setEnclosingScope(gs); } diff --git a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCCollectionTypesTest.java b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCCollectionTypesTest.java index d1fa7c4073..bb8b5dc1a1 100644 --- a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCCollectionTypesTest.java +++ b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCCollectionTypesTest.java @@ -78,10 +78,10 @@ public void init(){ gs.add(buildGeneric("Optional", "T")); CombineExpressionsWithLiteralsSymbols2Json symbols2Json = new CombineExpressionsWithLiteralsSymbols2Json(); - ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("src/test/resources/de/monticore/types/check/Persondex.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("target/resources/test/de/monticore/types/check/Persondex.cesym"); as.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as2 = symbols2Json.load("src/test/resources/de/monticore/types/check/Personaz.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as2 = symbols2Json.load("target/resources/test/de/monticore/types/check/Personaz.cesym"); as2.setEnclosingScope(gs); } diff --git a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCFullGenericTypesTest.java b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCFullGenericTypesTest.java index 178ecde25b..7e7dabc4ea 100644 --- a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCFullGenericTypesTest.java +++ b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCFullGenericTypesTest.java @@ -57,19 +57,19 @@ public void init() { gs.add(DefsTypeBasic.type("Void")); CombineExpressionsWithLiteralsSymbols2Json symbols2Json = new CombineExpressionsWithLiteralsSymbols2Json(); - ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("src/test/resources/de/monticore/types/check/Persondex.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("target/resources/test/de/monticore/types/check/Persondex.cesym"); as.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as2 = symbols2Json.load("src/test/resources/de/monticore/types/check/Personaz.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as2 = symbols2Json.load("target/resources/test/de/monticore/types/check/Personaz.cesym"); as2.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as3 = symbols2Json.load("src/test/resources/de/monticore/types/check/Iterator.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as3 = symbols2Json.load("target/resources/test/de/monticore/types/check/Iterator.cesym"); as3.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as4 = symbols2Json.load("src/test/resources/de/monticore/types/check/String.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as4 = symbols2Json.load("target/resources/test/de/monticore/types/check/String.cesym"); as4.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as5 = symbols2Json.load("src/test/resources/de/monticore/types/check/Personjl.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as5 = symbols2Json.load("target/resources/test/de/monticore/types/check/Personjl.cesym"); as5.setEnclosingScope(gs); } diff --git a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCSimpleGenericTypesTest.java b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCSimpleGenericTypesTest.java index 33474f059a..3b9f177446 100644 --- a/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCSimpleGenericTypesTest.java +++ b/monticore-grammar/src/test/java/de/monticore/types/check/SynthesizeSymTypeFromMCSimpleGenericTypesTest.java @@ -52,19 +52,19 @@ public void init() { gs.add(DefsTypeBasic.type("Void")); CombineExpressionsWithLiteralsSymbols2Json symbols2Json = new CombineExpressionsWithLiteralsSymbols2Json(); - ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("src/test/resources/de/monticore/types/check/Persondex.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("target/resources/test/de/monticore/types/check/Persondex.cesym"); as.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as2 = symbols2Json.load("src/test/resources/de/monticore/types/check/Personaz.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as2 = symbols2Json.load("target/resources/test/de/monticore/types/check/Personaz.cesym"); as2.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as3 = symbols2Json.load("src/test/resources/de/monticore/types/check/Iterator.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as3 = symbols2Json.load("target/resources/test/de/monticore/types/check/Iterator.cesym"); as3.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as4 = symbols2Json.load("src/test/resources/de/monticore/types/check/String.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as4 = symbols2Json.load("target/resources/test/de/monticore/types/check/String.cesym"); as4.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as5 = symbols2Json.load("src/test/resources/de/monticore/types/check/Personjl.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as5 = symbols2Json.load("target/resources/test/de/monticore/types/check/Personjl.cesym"); as5.setEnclosingScope(gs); } diff --git a/monticore-grammar/src/test/java/de/monticore/types/helper/MCType2SymTypeExpressionTest.java b/monticore-grammar/src/test/java/de/monticore/types/helper/MCType2SymTypeExpressionTest.java index 11ee8c73dd..1115bd7c6a 100644 --- a/monticore-grammar/src/test/java/de/monticore/types/helper/MCType2SymTypeExpressionTest.java +++ b/monticore-grammar/src/test/java/de/monticore/types/helper/MCType2SymTypeExpressionTest.java @@ -53,28 +53,28 @@ public void init() { gs.add(DefsTypeBasic.type("PersonValue")); CombineExpressionsWithLiteralsSymbols2Json symbols2Json = new CombineExpressionsWithLiteralsSymbols2Json(); - ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("src/test/resources/de/monticore/types/check/PairA.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as = symbols2Json.load("target/resources/test/de/monticore/types/check/PairA.cesym"); as.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as2 = symbols2Json.load("src/test/resources/de/monticore/types/check/PairB.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as2 = symbols2Json.load("target/resources/test/de/monticore/types/check/PairB.cesym"); as2.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as3 = symbols2Json.load("src/test/resources/de/monticore/types/check/PairC.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as3 = symbols2Json.load("target/resources/test/de/monticore/types/check/PairC.cesym"); as3.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as4 = symbols2Json.load("src/test/resources/de/monticore/types/check/Persondemc.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as4 = symbols2Json.load("target/resources/test/de/monticore/types/check/Persondemc.cesym"); as4.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as5 = symbols2Json.load("src/test/resources/de/monticore/types/check/PersonKey.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as5 = symbols2Json.load("target/resources/test/de/monticore/types/check/PersonKey.cesym"); as5.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as6 = symbols2Json.load("src/test/resources/de/monticore/types/check/PersonValue.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as6 = symbols2Json.load("target/resources/test/de/monticore/types/check/PersonValue.cesym"); as6.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as7 = symbols2Json.load("src/test/resources/de/monticore/types/check/Pair.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as7 = symbols2Json.load("target/resources/test/de/monticore/types/check/Pair.cesym"); as7.setEnclosingScope(gs); - ICombineExpressionsWithLiteralsArtifactScope as8 = symbols2Json.load("src/test/resources/de/monticore/types/check/Pair2.cesym"); + ICombineExpressionsWithLiteralsArtifactScope as8 = symbols2Json.load("target/resources/test/de/monticore/types/check/Pair2.cesym"); as8.setEnclosingScope(gs); } diff --git a/monticore-libraries/javagen-runtime/build.gradle b/monticore-libraries/javagen-runtime/build.gradle index cb50356241..15d617bc7e 100644 --- a/monticore-libraries/javagen-runtime/build.gradle +++ b/monticore-libraries/javagen-runtime/build.gradle @@ -47,7 +47,7 @@ dependencies { tasks.register('compileGenerator', JavaCompile) { source = sourceSets.generator.java classpath = sourceSets.generator.compileClasspath - destinationDir = file("${buildDir}/classes/generator") + destinationDirectory = layout.buildDirectory.dir("classes/generator") options.encoding = 'UTF-8' }