-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
88 lines (74 loc) · 2.17 KB
/
build.gradle.kts
File metadata and controls
88 lines (74 loc) · 2.17 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
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.1.10"
id("org.jlleitschuh.gradle.ktlint") version "12.1.2"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = project.property("GROUP_ID") as String
apply("gradle-tasks/specs.gradle.kts")
apply("$rootDir/gradle-tasks/snapshot.gradle")
allprojects {
repositories {
mavenCentral()
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)
}
}
}
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(
"max_line_length" to "200",
"indent_style" to "space",
"indent_size" to "4",
"insert_final_newline" to "true",
"end_of_line" to "lf",
),
)
}
}
nexusPublishing {
repositories {
sonatype {
username.set(System.getenv("SONATYPE_USERNAME"))
password.set(System.getenv("SONATYPE_PASSWORD"))
}
}
transitionCheckOptions {
maxRetries.set(60)
delayBetween.set(Duration.ofMillis(5000))
}
}