If you want to use `RagConnect`, either use the latest [pre-build versio](#use-packaged-version) or clone the repository and [build it yourself](#build-from-source).
## Use packaged version
Check the [package overview page](https://git-st.inf.tu-dresden.de/jastadd/ragconnect/-/packages) to find the latest version.
To use it, three steps are needed. First add this GitLab as a repository in your `build.gradle`:
Finally, add a task to compile your specification:
```
task ragConnect(type: JavaExec) {
group = 'Build'
main = 'org.jastadd.ragconnect.compiler.Compiler'
classpath = configurations.ragconnectClasspath
args([
'--verbose',
'--o=src/gen/jastadd',
'src/main/jastadd/GoalModel.relast',
'src/main/jastadd/GoalModel.connect',
'--rootNode=GoalModel'
])
}
```
You might need to add another task for [compiling relast specifications](#compiling-relast-specifications).
## Build from source
If you want to use `RagConnect`, the currently suggested way is to first build the jar from the [RagConnect repository](https://git-st.inf.tu-dresden.de/jastadd/ragconnect):
This is typically accompanied with a task to invoke the [RelAst compiler](http://relational-rags.eu/) and the [JastAdd gradle plugin](https://plugins.gradle.org/plugin/org.jastadd). The additional arguments `--useJastAddNames`, `--listClass`, `--jastAddList` and `--resolverHelper` to relast are not required. Please see the user manual of the RelAst compiler for more information.
You might need to add another task for [compiling relast specifications](#compiling-relast-specifications).
## Compiling RelAst specifications
The task to compile `RagConnect` specifications is typically accompanied with a task to invoke the [RelAst compiler](http://relational-rags.eu/) and the [JastAdd gradle plugin](https://plugins.gradle.org/plugin/org.jastadd). The additional arguments `--useJastAddNames`, `--listClass`, `--jastAddList` and `--resolverHelper` to relast are not required. Please see the user manual of the RelAst compiler for more information.
```groovy
taskrelastToJastAdd(type:JavaExec){
...
...
@@ -57,7 +112,7 @@ jastadd {
}
```
One also has to specifiy the dependencies to get correct ordering of tasks.
One also has to specify the dependencies to get correct ordering of tasks.
The full example is available at <https://git-st.inf.tu-dresden.de/jastadd/ragconnect-minimal>.
## Preparation
The following examples are inspired by the real test case [read1write2](https://git-st.inf.tu-dresden.de/jastadd/ragconnect-tests/-/tree/master/ragconnect.tests/src/test/01-input/read1write2)