47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
|
plugins {
|
||
|
`java-library`
|
||
|
`maven-publish`
|
||
|
}
|
||
|
|
||
|
version = rootProject.version
|
||
|
|
||
|
repositories {
|
||
|
mavenCentral()
|
||
|
maven("https://gitlab.com/api/v4/projects/35030495/packages/maven")
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
compileOnly("org.jetbrains:annotations:23.0.0")
|
||
|
|
||
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
|
||
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0")
|
||
|
}
|
||
|
|
||
|
tasks.named<Test>("test") {
|
||
|
useJUnitPlatform()
|
||
|
}
|
||
|
|
||
|
java {
|
||
|
withSourcesJar()
|
||
|
}
|
||
|
|
||
|
publishing {
|
||
|
repositories {
|
||
|
mavenLocal()
|
||
|
|
||
|
if (project.hasProperty("maven")) {
|
||
|
maven {
|
||
|
url = uri(project.property("maven").toString())
|
||
|
name = "dynamic"
|
||
|
|
||
|
credentials(PasswordCredentials::class) {
|
||
|
username = System.getenv()["MAVEN_NAME"]
|
||
|
password = System.getenv()["MAVEN_TOKEN"]
|
||
|
}
|
||
|
authentication {
|
||
|
create<BasicAuthentication>("basic")
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|