-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
38 lines (32 loc) · 955 Bytes
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
plugins {
kotlin("jvm") version "1.6.21" apply false
java
`maven-publish`
}
subprojects {
apply<JavaPlugin>()
apply<MavenPublishPlugin>()
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
val credentials = (System.getenv("MAVEN_USERNAME") to System.getenv("MAVEN_PASSWORD")).takeIf { (username, password) -> username != null && password != null }
credentials?.let { (mavenUsername, mavenPassword) ->
maven("https://maven.msrandom.net/repository/root/").credentials {
username = mavenUsername
password = mavenPassword
}
}
}
}
}