Revert "Use gradle toolchains in the buildscript"
This reverts commit 84ea864e
This commit is contained in:
parent
74df5b8639
commit
a86cc3d695
|
@ -32,7 +32,6 @@ version = "0.3.2"
|
|||
val groupAndName = "${rootProject.group}.${rootProject.name.toLowerCase()}"
|
||||
|
||||
val javaVer: String = "8"
|
||||
val sourceJavaVer: String = "16"
|
||||
val kotlinVer: String by rootProject
|
||||
val kotlinBaseVer = kotlinVer.substring(0..2)
|
||||
val serializationVer: String by rootProject
|
||||
|
@ -41,10 +40,6 @@ val mcBase: String = (rootProject.property("minecraft") as String).also {
|
|||
}.substring(0..3)
|
||||
val kotlinX: String = "org.jetbrains.kotlinx"
|
||||
|
||||
val toolchainJavaVersion = Action<JavaToolchainSpec> {
|
||||
languageVersion.set(JavaLanguageVersion.of(sourceJavaVer.toInt()))
|
||||
}
|
||||
|
||||
subprojects {
|
||||
group = rootProject.group.toString()
|
||||
apply(plugin = "org.cqfn.diktat.diktat-gradle-plugin")
|
||||
|
@ -196,8 +191,6 @@ allprojects {
|
|||
apply(plugin = "java")
|
||||
apply(plugin = "org.jetbrains.kotlin.jvm")
|
||||
apply(plugin = "architectury-plugin")
|
||||
val compiler = javaToolchains.compilerFor(toolchainJavaVersion)
|
||||
val launcher = javaToolchains.launcherFor(toolchainJavaVersion)
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8", kotlinVer))
|
||||
implementation(kotlin("reflect", kotlinVer))
|
||||
|
@ -205,7 +198,6 @@ allprojects {
|
|||
}
|
||||
tasks {
|
||||
withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
|
||||
kotlinJavaToolchain.toolchain.use(launcher)
|
||||
with(kotlinOptions) {
|
||||
// https://github.com/JetBrains/kotlin/blob/master/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt
|
||||
freeCompilerArgs = listOf(
|
||||
|
@ -224,10 +216,9 @@ allprojects {
|
|||
encoding = "UTF-8"
|
||||
isFork = true
|
||||
release.set(javaVer.toInt())
|
||||
javaCompiler.set(compiler)
|
||||
sourceCompatibility = sourceJavaVer
|
||||
sourceCompatibility = "11"
|
||||
targetCompatibility = javaVer
|
||||
compilerArgs.addAll(listOf("-Xplugin:jabel"))
|
||||
compilerArgs.add("-Xplugin:jabel")
|
||||
}
|
||||
}
|
||||
withType(ProcessResources::class) {
|
||||
|
|
Loading…
Reference in New Issue