-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
93 lines (78 loc) · 2.34 KB
/
build.gradle.kts
File metadata and controls
93 lines (78 loc) · 2.34 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePluginWrapper
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.time.Duration
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "2.2.20"
id("org.jlleitschuh.gradle.ktlint") version "13.1.0"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = project.property("GROUP_ID") as String
apply("$rootDir/gradle-tasks/snapshot.gradle")
allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
}
subprojects {
apply(plugin = "java")
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
plugins.withId("org.jetbrains.kotlin.jvm") {
kotlin {
jvmToolchain(8)
}
}
plugins.withType<KotlinBasePluginWrapper>().configureEach {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}
}
tasks.test {
useJUnitPlatform()
}
java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
// Gradle 7+ Java toolchain approach (also sets 1.8)
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
ktlint {
debug.set(true)
version.set("1.5.0")
verbose.set(true)
additionalEditorconfig.set(
mapOf(
"indent_style" to "space",
"indent_size" to "4",
"insert_final_newline" to "true",
"end_of_line" to "lf",
),
)
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
}
transitionCheckOptions {
maxRetries = 60
delayBetween = Duration.ofMillis(5000)
}
}