generated from aura-ascend/template-library
38 lines
1.1 KiB
Kotlin
38 lines
1.1 KiB
Kotlin
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 aaRepository(repositoryHandler: RepositoryHandler) {
|
|
repositoryHandler.maven {
|
|
url = uri("https://gitea.lulz.ltd/api/packages/aura-ascend/maven")
|
|
name = "GiteaPackages"
|
|
credentials {
|
|
username = retrieveConfiguration("repository.gitea.user", "REPOSITORY_USER")
|
|
password = retrieveConfiguration("repository.gitea.token", "REPOSITORY_TOKEN")
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencyResolutionManagement {
|
|
@Suppress("UnstableApiUsage")
|
|
repositories {
|
|
mavenLocal()
|
|
aaRepository(this)
|
|
mavenCentral()
|
|
}
|
|
versionCatalogs.create("aa").from("ltd.lulz.catalog:version-catalog:${getProperty("catalog")}")
|
|
}
|
|
|
|
pluginManagement.repositories {
|
|
mavenLocal()
|
|
aaRepository(this)
|
|
gradlePluginPortal()
|
|
}
|
|
|
|
rootProject.name = "library"
|