diff --git a/build.gradle b/build.gradle index 9f38294105..7753790c0d 100644 --- a/build.gradle +++ b/build.gradle @@ -51,6 +51,13 @@ subprojects { if (!skipSonarlint) { apply plugin: "name.remal.sonarlint" } + + java { + toolchain { + // Nails the Java-Version of every Subproject + languageVersion = JavaLanguageVersion.of(21) + } + } // sonarlint configuration, not to be confused with sonarqube/sonarcloud. sonarLint { @@ -61,17 +68,6 @@ subprojects { } } - def compileTasks = { - options.encoding = 'UTF-8' - - // Nails the Java-Version of every Subproject - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 - } - - compileJava(compileTasks) - compileTestJava(compileTasks) - spotless { java { // Excludes build folder since it contains generated java classes. diff --git a/settings.gradle b/settings.gradle index 8e6ad3a90f..a75dbc61f2 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,7 +1,10 @@ +plugins { + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' +} + rootProject.name = 'TJ-Bot' include 'application' include 'database' include 'formatter' include 'utils' -