Feature variants (#376)

Migrate from buildSrc to build-logic. Setup feature variants.
This commit is contained in:
Edwin Jakobs
2025-09-17 01:03:02 -07:00
committed by GitHub
parent 2979963d3f
commit b7ba6f6daa
100 changed files with 424 additions and 326 deletions

View File

@@ -0,0 +1,27 @@
include("orx-convention", "orx-variant-plugin")
dependencyResolutionManagement {
repositories {
mavenCentral()
mavenLocal {
include("org.openrndr")
}
}
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
// We use a regex to get the openrndr version from the primary catalog as there is no public Gradle API to parse catalogs.
val regEx = Regex("^openrndr[ ]*=[ ]*(?:\\{[ ]*require[ ]*=[ ]*)?\"(.*)\"[ ]*(?:\\})?", RegexOption.MULTILINE)
val openrndrVersion = regEx.find(File(rootDir,"../gradle/libs.versions.toml").readText())?.groupValues?.get(1) ?: error("can't find openrndr version")
create("sharedLibs") {
from("org.openrndr:openrndr-dependency-catalog:$openrndrVersion")
}
create("openrndr") {
from("org.openrndr:openrndr-module-catalog:$openrndrVersion")
}
}
}