Commit 91ddd251 authored by René Schöne's avatar René Schöne
Browse files

Use packged ragconnect, remove root node.

parent 05ce1d2e
......@@ -17,12 +17,21 @@ mainClassName = 'de.tudresden.inf.st.mrc.MinimalMain'
repositories {
jcenter()
maven {
name "gitlab-maven"
url "https://gitlab.example.com/api/v4/groups/jastadd/-/packages/maven"
}
}
apply plugin: 'jastadd'
configurations {
baseRuntimeClasspath
ragconnectClasspath
}
run {
standardInput = System.in
}
File genSrc = file("src/gen/java")
......@@ -34,6 +43,7 @@ dependencies {
implementation group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
ragconnectClasspath group: 'de.tudresden.inf.st', name: 'ragconnect.base', version: '0.2.3'
jastadd2 "org.jastadd:jastadd:2.3.4"
}
......@@ -45,16 +55,16 @@ def relastFiles = ["src/gen/jastadd/MinimalModel.relast", "src/gen/jastadd/RagCo
// phase: ragConnect
task ragConnect(type: JavaExec) {
group = 'Build'
main = '-jar'
main = 'org.jastadd.ragconnect.compiler.Compiler'
classpath = configurations.ragconnectClasspath
args([
'libs/ragconnect.jar',
'--verbose',
'--o=src/gen/jastadd',
'src/main/jastadd/MinimalModel.relast',
'src/main/jastadd/MinimalModel.connect',
'--rootNode=MinimalModel'
'--rootNode=A'
])
}
// phase: RelAst
......@@ -102,7 +112,7 @@ jastadd {
}
cleanGen.doFirst {
delete "src/gen/java/org"
delete "src/gen/java/de"
delete "src/gen-res/BuildInfo.properties"
}
......@@ -125,6 +135,10 @@ jastadd {
extraJastAddOptions = ["--lineColumnNumbers", '--List=JastAddList']
}
cleanGen.doFirst {
delete "src/gen/jastadd"
}
// Workflow configuration for phases
generateAst.dependsOn relastToJastAdd
relastToJastAdd.dependsOn ragConnect
MinimalModel ::= A ;
A ::= <Input:String> /<OutputOnA:String>/ B* ;
B ::= /<OutputOnB:String>/ ;
......@@ -2,9 +2,9 @@ package de.tudresden.inf.st.mrc;
import de.tudresden.inf.st.mrc.ast.A;
import de.tudresden.inf.st.mrc.ast.B;
import de.tudresden.inf.st.mrc.ast.MinimalModel;
import java.io.IOException;
import java.util.Scanner;
/**
* Minimal main.
......@@ -13,7 +13,6 @@ import java.io.IOException;
*/
public class MinimalMain {
public static void main(String[] args) throws IOException {
MinimalModel model = new MinimalModel();
A a = new A();
// set some default value for input
a.setInput("");
......@@ -21,7 +20,6 @@ public class MinimalMain {
B b2 = new B();
a.addB(b1);
a.addB(b2);
model.setA(a);
// a.OutputOnA -> a.Input
a.addDependencyA(a);
......@@ -35,6 +33,9 @@ public class MinimalMain {
b1.connectOutputOnB("mqtt://localhost/b1/out", true);
b2.connectOutputOnB("mqtt://localhost/b2/out", false);
while (true) {}
// while (true) {}
System.out.println("[Enter] to exit");
Scanner scanner = new Scanner(System.in);
scanner.nextLine();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment