Skip to content
Snippets Groups Projects
Commit cb287661 authored by René Schöne's avatar René Schöne
Browse files

Documentation for adding it to some project.

parent 0e2b54b9
Branches
No related tags found
No related merge requests found
Pipeline #12756 passed
# Add grammar2uml to your project
To use `Grammar2uml`, add it as a dependency:
```
configurations {
grammar2umlClasspath
}
dependencies {
grammar2umlClasspath group: 'de.tudresden.inf.st', name: 'grammar2uml', version: '0.2.1'
}
```
Then, add a task to create your visualization:
```
task grammar2uml(type: JavaExec) {
main = 'de.tudresden.inf.st.jastadd.grammar2uml.compiler.Compiler'
classpath = configurations.grammar2umlClasspath
args([
'--verbose',
'--defaultFolders',
'src/main/jastadd/YourGrammar.relast'
])
}
```
## Build from source
If you want to build `Grammar2Uml` from source, first build the jar from the [repository](https://git-st.inf.tu-dresden.de/jastadd/grammar2uml):
```bash
git clone https://git-st.inf.tu-dresden.de/jastadd/grammar2uml.git
cd grammar2uml
./gradlew jar
ls grammar2uml/build/libs/
```
Those JARs can then be copied to your project.
```bash
cp grammar2uml/build/libs/grammar2uml-<version>.jar ${YourProject}/libs/grammar2uml.jar
```
Finally, this JAR has to be integrated into your build process. In case [Gradle](https://gradle.org/) is used, the JAR file needs to be added as dependency using:
```groovy
dependencies {
grammar2umlClasspath fileTree(include: ['grammar2uml.jar'], dir: 'libs')
}
```
The path to the JAR file may need to be changed according to your project structure.
......@@ -3,6 +3,8 @@ repo_url: https://git-st.inf.tu-dresden.de/jastadd/grammar2uml
site_dir: ../public
nav:
- "Grammar2uml": index.md
- "Add to your project": adding.md
- "API documentation": ragdoc/index.html
theme:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment