JDK 19 + Gradle 8.1.1 + kotlin 1.8.21 + spotless
This commit is contained in:
@@ -2,8 +2,10 @@ package be.simplenotes
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.JavaPluginConvention
|
||||
import org.gradle.api.plugins.JavaPluginExtension
|
||||
import org.gradle.api.tasks.SourceSetContainer
|
||||
import org.gradle.kotlin.dsl.get
|
||||
import org.gradle.kotlin.dsl.getByType
|
||||
import org.gradle.kotlin.dsl.register
|
||||
import java.io.File
|
||||
|
||||
@@ -17,7 +19,7 @@ class PostcssPlugin : Plugin<Project> {
|
||||
getByName("processResources").dependsOn("postcss")
|
||||
}
|
||||
|
||||
val sourceSets = project.convention.getPlugin(JavaPluginConvention::class.java).sourceSets
|
||||
val sourceSets = project.extensions.getByType<SourceSetContainer>()
|
||||
val root = File("${project.buildDir}/generated-resources/css")
|
||||
sourceSets["main"].resources.srcDir(root)
|
||||
}
|
||||
|
||||
@@ -12,8 +12,10 @@ group = "be.simplenotes"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_15
|
||||
targetCompatibility = JavaVersion.VERSION_15
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(19))
|
||||
vendor.set(JvmVendorSpec.ORACLE)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package be.simplenotes
|
||||
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
@@ -13,14 +15,14 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions {
|
||||
jvmTarget = "15"
|
||||
javaParameters = true
|
||||
freeCompilerArgs = listOf(
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_19)
|
||||
javaParameters.set(true)
|
||||
freeCompilerArgs.addAll(
|
||||
"-Xinline-classes",
|
||||
"-Xno-param-assertions",
|
||||
"-Xno-call-assertions",
|
||||
"-Xno-receiver-assertions"
|
||||
"-Xno-receiver-assertions",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user