chore: changed jre target to 1.8

Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
limited_dev 2023-03-12 04:10:53 +01:00
parent e9967c9d8e
commit 005be67fd0

View file

@ -3,7 +3,7 @@ import org.jetbrains.gradle.ext.TaskTriggersConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
kotlin("jvm") version "1.8.0" kotlin("jvm") version "1.8.10"
id("com.github.johnrengelman.shadow") version "7.1.2" id("com.github.johnrengelman.shadow") version "7.1.2"
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.6" id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.6"
`maven-publish` `maven-publish`
@ -57,7 +57,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
} }
val targetJavaVersion = 17 val targetJavaVersion = 1.8
val templateSrc = project.rootDir.resolve("src/main/templates") val templateSrc = project.rootDir.resolve("src/main/templates")
val templateDest = project.buildDir.resolve("generated/templates") val templateDest = project.buildDir.resolve("generated/templates")
val templateProps = mapOf( val templateProps = mapOf(
@ -92,24 +92,17 @@ tasks {
dependsOn("generateTemplates", "processResources") dependsOn("generateTemplates", "processResources")
} }
withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
dependencies {
include(dependency("com.formdev:flatlaf:2.4"))
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"))
}
dependsOn("generateTemplates", "processResources")
}
withType<JavaCompile> { withType<JavaCompile> {
// ensure that the encoding is set to UTF-8, no matter what the system default is // ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly // this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too. // If Javadoc is generated, this must be specified in that task too.
options.encoding = "UTF-8" options.encoding = "UTF-8"
/*
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) { if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) {
options.release.set(targetJavaVersion) options.release.set(targetJavaVersion)
} }
*/
dependsOn("generateTemplates", "processResources") dependsOn("generateTemplates", "processResources")
} }
@ -134,9 +127,11 @@ tasks {
java { java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion) val javaVersion = JavaVersion.toVersion(targetJavaVersion)
/*
if (JavaVersion.current() < javaVersion) { if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion)) toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
} }
*/
withSourcesJar() withSourcesJar()
} }
@ -188,5 +183,11 @@ rootProject.idea.project {
} }
} }
kotlin {
jvmToolchain(8)
}
//rootProject.eclipse.synchronizationTasks("generateTemplates", "processResources") //rootProject.eclipse.synchronizationTasks("generateTemplates", "processResources")
//Fuck eclipse users amirite? //Fuck eclipse users amirite?