Skip to content

Commit

Permalink
Make generator subproject optional
Browse files Browse the repository at this point in the history
The code will be pushed later on.
  • Loading branch information
FlorianMichael committed Jan 7, 2025
1 parent ecfd264 commit e67578e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ run/
runV2/
*.cap
*.rdc

# Other
generator.settings.gradle
29 changes: 20 additions & 9 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,27 @@ pluginManagement {
}
rootProject.name = "viafabricplus"

includeBuild("build-logic")
includeBuild "build-logic"

setupViaSubproject("api")
setupViaSubproject("api-legacy")
setupViaSubproject("generator-tools")
setupViaSubproject("visuals")
include "viafabricplus-api"
include "viafabricplus-api-legacy"
include "viafabricplus-visuals"

void setupViaSubproject(String name) {
var pName = "viafabricplus-" + name
project(":viafabricplus-api").projectDir = file("api")
project(":viafabricplus-api-legacy").projectDir = file("api-legacy")
project(":viafabricplus-visuals").projectDir = file("visuals")

include pName
project(":" + pName).projectDir = file(name)
File file = file("generator.settings.gradle")
if (!file.exists()) {
file.write(
"""
// Uncomment to enable the generator project
// include ":viafabricplus-generator"
// project(":viafabricplus-generator").projectDir = file("generator")
""".trim()
)
}

apply {
from(file)
}

0 comments on commit e67578e

Please sign in to comment.