Set up project structure

This commit is contained in:
2024-12-13 13:55:53 +01:00
commit 2383c59441
20 changed files with 747 additions and 0 deletions

37
settings.gradle.kts Normal file
View File

@@ -0,0 +1,37 @@
import java.lang.System.getenv
fun getProperty(property: String): String = extra[property] as String
fun retrieveConfiguration(
property: String,
environment: String,
): String? = if (extra.has(property)) getProperty(property) else getenv(environment)
fun hlaejaRepository(repositoryHandler: RepositoryHandler) {
repositoryHandler.maven {
url = uri("https://maven.pkg.github.com/swordsteel/**")
name = "GitHubPackages"
credentials {
username = retrieveConfiguration("repository.user", "REPOSITORY_USER")
password = retrieveConfiguration("repository.token", "REPOSITORY_TOKEN")
}
}
}
dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
mavenLocal()
hlaejaRepository(this)
mavenCentral()
}
versionCatalogs.create("hlaeja").from("ltd.hlaeja.catalog:hlaeja-version-catalog:${getProperty("catalog")}")
}
pluginManagement.repositories {
mavenLocal()
hlaejaRepository(this)
gradlePluginPortal()
}
rootProject.name = "hlaeja-registry-api"