2022-01-29 12:18:28 -05:00
|
|
|
group = "dev.fyloz"
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("org.jetbrains.kotlin.jvm") version "1.6.10"
|
2022-01-30 17:49:22 -05:00
|
|
|
id("maven-publish")
|
2022-01-29 12:18:28 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
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")
|
|
|
|
}
|
|
|
|
|
2022-01-30 17:49:22 -05:00
|
|
|
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 {
|
2022-01-29 12:18:28 -05:00
|
|
|
useJUnitPlatform()
|
2022-01-30 17:49:22 -05:00
|
|
|
|
|
|
|
testLogging {
|
|
|
|
events("failed")
|
|
|
|
}
|
2022-01-29 12:18:28 -05:00
|
|
|
}
|