59 lines
1.5 KiB
Plaintext
59 lines
1.5 KiB
Plaintext
group = "dev.fyloz"
|
|
|
|
plugins {
|
|
id("org.jetbrains.kotlin.jvm") version "1.6.10"
|
|
id("maven-publish")
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
maven {
|
|
url = uri("https://archiva.fyloz.dev/repository/internal")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.10")
|
|
|
|
testImplementation("io.kotest:kotest-runner-junit5:5.1.0")
|
|
testImplementation("io.kotest:kotest-assertions-core:5.1.0")
|
|
testImplementation("io.mockk:mockk:1.12.2")
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
create<MavenPublication>("memory-cache") {
|
|
from(components["kotlin"])
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
val repoUrl = System.getenv("MAVEN_REPOSITORY_URL")
|
|
val repoUsername = System.getenv("MAVEN_REPOSITORY_USERNAME")
|
|
val repoPassword = System.getenv("MAVEN_REPOSITORY_PASSWORD")
|
|
val repoName = System.getenv("MAVEN_REPOSITORY_NAME") ?: "Archiva"
|
|
|
|
if (repoUrl != null && repoUsername != null && repoPassword != null) {
|
|
url = uri(repoUrl)
|
|
name = repoName
|
|
|
|
credentials {
|
|
username = repoUsername
|
|
password = repoPassword
|
|
}
|
|
} else {
|
|
print("Some maven repository credentials were not configured, publishing is not configured")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
|
|
testLogging {
|
|
events("failed")
|
|
}
|
|
} |