Skip to content

Commit

Permalink
Move generated lexer and parser code to separate diredtories
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkgroot committed Apr 5, 2024
1 parent 05d7a3c commit 5fc905a
Show file tree
Hide file tree
Showing 61 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
build/

# Ignore the Lexer code, as it is being generated at build time
src/main/gen/nl/dirkgroot/structurizr/dsl/StructurizrDSLLexer.java
src/main/lexer/
10 changes: 8 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ koverReport {
}
}

sourceSets["main"].java.srcDirs("src/main/gen")
sourceSets["main"].java.srcDirs(
"src/main/lexer",
"src/main/parser",
)

dependencies {
testImplementation("io.kotest:kotest-assertions-core:5.8.1")
Expand Down Expand Up @@ -102,7 +105,10 @@ tasks {
sourceFile.set(File("src/main/grammar/StructurizrDSL.flex"))

// target directory for lexer
targetOutputDir.set(File("src/main/gen/nl/dirkgroot/structurizr/dsl/"))
targetOutputDir.set(File("src/main/lexer/nl/dirkgroot/structurizr/dsl/"))

// if set, plugin will remove a lexer output file before generating new one. Default: false
purgeOldFiles.set(true)
}

signPlugin {
Expand Down

0 comments on commit 5fc905a

Please sign in to comment.