add hlaeja version catalog
- remove repositories from build.gradle.kts - change to settings.gradle.kts - add dependency resolution management - add plugin management repositories - add catalog in gradle.properties
This commit is contained in:
@@ -13,10 +13,6 @@ java {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.springframework.boot:spring-boot-starter")
|
implementation("org.springframework.boot:spring-boot-starter")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
version=0.1.0-SNAPSHOT
|
version=0.1.0-SNAPSHOT
|
||||||
|
catalog=0.10.0
|
||||||
|
|||||||
@@ -1 +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-service"
|
rootProject.name = "hlaeja-service"
|
||||||
|
|||||||
Reference in New Issue
Block a user