From e67578e7511da8970e77deb11232ef92e8b4513a Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Tue, 7 Jan 2025 19:31:55 +0100 Subject: [PATCH] Make generator subproject optional The code will be pushed later on. --- .gitignore | 3 +++ settings.gradle | 29 ++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 79c32cb22..536c5e523 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ run/ runV2/ *.cap *.rdc + +# Other +generator.settings.gradle diff --git a/settings.gradle b/settings.gradle index bd24408d0..d4967996c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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) } \ No newline at end of file