Skip to content

Commit 388c7b1

Browse files
committed
chore(build): Use Gradle's new Kotlin DSL assignment syntax
1 parent 44139c8 commit 388c7b1

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ repositories {
2828
}
2929

3030
quiltflower {
31-
quiltflowerVersion.set(libs.versions.quiltflower.get())
32-
addToRuntimeClasspath.set(true)
31+
quiltflowerVersion = libs.versions.quiltflower.get()
32+
addToRuntimeClasspath = true
3333
preferences["win"] = 0
3434
}
3535

@@ -38,12 +38,12 @@ java {
3838
sourceCompatibility = JavaVersion.toVersion(targetVersion)
3939
targetCompatibility = sourceCompatibility
4040
if (JavaVersion.current() < JavaVersion.toVersion(targetVersion)) {
41-
toolchain.languageVersion.set(JavaLanguageVersion.of(targetVersion))
41+
toolchain.languageVersion = JavaLanguageVersion.of(targetVersion)
4242
}
4343
}
4444

4545
tasks.withType(JavaCompile::class).configureEach {
46-
options.release.set(targetVersion)
46+
options.release = targetVersion
4747
options.encoding = "UTF-8"
4848
options.compilerArgs.addAll(listOf("-Xlint:all", "-Xlint:-processing"))
4949
}
@@ -155,7 +155,7 @@ tasks {
155155
val scriptDest = project.layout.buildDirectory.file(if (System.getProperty("os.name").contains("windows", ignoreCase = true)) { "run-dev.bat" } else { "run-dev" })
156156
val argsDest = project.layout.buildDirectory.file("run-dev-args.txt")
157157
val taskClasspath = project.files(jar.map { it.outputs }, configurations.runtimeClasspath)
158-
val toolchain = project.javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(targetVersion)) }
158+
val toolchain = project.javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(targetVersion) }
159159
inputs.files(taskClasspath)
160160
.ignoreEmptyDirectories()
161161
.withPropertyName("runClasspath")

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
org.gradle.jvmargs=-Xmx1G
1+
org.gradle.jvmargs=-Xmx1G
2+
systemProp.org.gradle.unsafe.kotlin.assignment=true

0 commit comments

Comments
 (0)