-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
55 lines (47 loc) · 1.36 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
plugins {
kotlin("jvm") version "1.6.21" apply false
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-2"
id("maven-publish")
}
group = "io.camassia"
version = System.getenv("VERSION")
subprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
}
repositories {
mavenCentral()
}
tasks {
withType<Test> {
useJUnitPlatform()
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
// Users of this project need the below Java Version as a minimum
jvmTarget = "11"
}
}
}
}
nexusPublishing {
repositories {
sonatype {
val ossrhUsername = providers.environmentVariable("OSSRH_USERNAME")
val ossrhPassword = providers.environmentVariable("OSSRH_PASSWORD")
if (ossrhUsername.isPresent && ossrhPassword.isPresent) {
project.logger.info("OSSRH credentials found")
username.set(ossrhUsername.get())
password.set(ossrhPassword.get())
} else {
project.logger.warn("OSSRH credentials not found. These are required to publish to Sonatype.")
}
}
}
}
tasks {
wrapper {
gradleVersion = "8.6"
}
}