Skip to content

Commit df834fc

Browse files
committed
build: clean up the main build script
Set LV to 2.1, and restore the 1.8 JVM target.
1 parent 0d8025b commit df834fc

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

build.gradle.kts

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
2-
31
import io.github.petertrr.configurePublishing
42
import io.github.petertrr.ext.booleanProperty
5-
import io.gitlab.arturbosch.detekt.Detekt
6-
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
73
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
84
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
95
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
@@ -26,16 +22,16 @@ kotlin {
2622
explicitApi()
2723

2824
compilerOptions {
29-
apiVersion = KotlinVersion.KOTLIN_1_9
30-
languageVersion = KotlinVersion.KOTLIN_1_9
25+
apiVersion = KotlinVersion.KOTLIN_2_1
26+
languageVersion = KotlinVersion.KOTLIN_2_1
3127
}
3228

3329
jvm {
3430
compilations.configureEach {
3531
compileTaskProvider.configure {
3632
compilerOptions {
3733
// Minimum bytecode level is 52
38-
jvmTarget = JvmTarget.JVM_11
34+
jvmTarget = JvmTarget.JVM_1_8
3935

4036
// Output interfaces with default methods
4137
freeCompilerArgs.addAll(
@@ -105,9 +101,7 @@ detekt {
105101
}
106102

107103
tasks {
108-
withType<Detekt> {
109-
named("check") {
110-
dependsOn(this@withType)
111-
}
104+
check {
105+
dependsOn(detekt)
112106
}
113107
}

gradle.properties

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
kotlin.code.style=official
2-
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
3-
org.gradle.caching=true
4-
# https://kotlinlang.org/docs/whatsnew19.html#preview-of-gradle-configuration-cache
5-
org.gradle.configuration-cache=false
6-
org.gradle.parallel=true
1+
#########################
2+
# Gradle settings
3+
#########################
4+
org.gradle.jvmargs = -Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
5+
org.gradle.parallel = true
6+
org.gradle.caching = true
7+
org.gradle.configuration-cache = true
8+
9+
#########################
10+
# Kotlin settings
11+
#########################
12+
kotlin.code.style = official

0 commit comments

Comments
 (0)