Skip to content
Snippets Groups Projects
Verified Commit 5cb172ad authored by Griefed's avatar Griefed :joystick:
Browse files

build: Update to gradle 8.3

parent 3fab5b38
No related branches found
No related tags found
4 merge requests!554Milestone 5 Release,!534Beta,!533Beta,!526Ms5
...@@ -35,9 +35,6 @@ dependencies { ...@@ -35,9 +35,6 @@ dependencies {
tasks.compileKotlin<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { tasks.compileKotlin<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
logger.lifecycle("Configuring $name with version ${project.getKotlinPluginVersion()} in project ${project.name}") logger.lifecycle("Configuring $name with version ${project.getKotlinPluginVersion()} in project ${project.name}")
kotlinOptions { kotlinOptions {
val list = freeCompilerArgs.toMutableList()
list.add("-Xjsr305=strict")
freeCompilerArgs = list.toList()
allWarningsAsErrors = false allWarningsAsErrors = false
jvmTarget = props.getProperty("jdkVersion") jvmTarget = props.getProperty("jdkVersion")
languageVersion = props.getProperty("kotlinMajor") languageVersion = props.getProperty("kotlinMajor")
...@@ -48,9 +45,6 @@ tasks.compileKotlin<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { ...@@ -48,9 +45,6 @@ tasks.compileKotlin<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
tasks.compileTestKotlin<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { tasks.compileTestKotlin<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
logger.lifecycle("Configuring $name with version ${project.getKotlinPluginVersion()} in project ${project.name}") logger.lifecycle("Configuring $name with version ${project.getKotlinPluginVersion()} in project ${project.name}")
kotlinOptions { kotlinOptions {
val list = freeCompilerArgs.toMutableList()
list.add("-Xjsr305=strict")
freeCompilerArgs = list.toList()
allWarningsAsErrors = false allWarningsAsErrors = false
jvmTarget = props.getProperty("jdkVersion") jvmTarget = props.getProperty("jdkVersion")
languageVersion = props.getProperty("kotlinMajor") languageVersion = props.getProperty("kotlinMajor")
......
...@@ -11,7 +11,7 @@ repositories { ...@@ -11,7 +11,7 @@ repositories {
} }
tasks.withType<DokkaTask>().configureEach { tasks.withType<DokkaTask>().configureEach {
outputDirectory.set(buildDir.resolve("dokka")) outputDirectory.set(layout.buildDirectory.asFile.get().resolve("dokka"))
dokkaSourceSets { dokkaSourceSets {
configureEach { configureEach {
documentedVisibilities.set( documentedVisibilities.set(
......
...@@ -32,10 +32,6 @@ if (KOTLIN_VERSION != embeddedMajorAndMinorKotlinVersion) { ...@@ -32,10 +32,6 @@ if (KOTLIN_VERSION != embeddedMajorAndMinorKotlinVersion) {
tasks.compileKotlin<KotlinCompile> { tasks.compileKotlin<KotlinCompile> {
logger.lifecycle("Configuring $name with version ${project.getKotlinPluginVersion()} in project ${project.name}") logger.lifecycle("Configuring $name with version ${project.getKotlinPluginVersion()} in project ${project.name}")
kotlinOptions { kotlinOptions {
@Suppress("SpellCheckingInspection")
val list = freeCompilerArgs.toMutableList()
list.add("-Xjsr305=strict")
freeCompilerArgs = list.toList()
allWarningsAsErrors = false allWarningsAsErrors = false
jvmTarget = JDK_VERSION jvmTarget = JDK_VERSION
languageVersion = KOTLIN_VERSION languageVersion = KOTLIN_VERSION
...@@ -46,10 +42,6 @@ tasks.compileKotlin<KotlinCompile> { ...@@ -46,10 +42,6 @@ tasks.compileKotlin<KotlinCompile> {
tasks.compileTestKotlin<KotlinCompile> { tasks.compileTestKotlin<KotlinCompile> {
logger.lifecycle("Configuring $name with version ${project.getKotlinPluginVersion()} in project ${project.name}") logger.lifecycle("Configuring $name with version ${project.getKotlinPluginVersion()} in project ${project.name}")
kotlinOptions { kotlinOptions {
@Suppress("SpellCheckingInspection")
val list = freeCompilerArgs.toMutableList()
list.add("-Xjsr305=strict")
freeCompilerArgs = list.toList()
allWarningsAsErrors = false allWarningsAsErrors = false
jvmTarget = JDK_VERSION jvmTarget = JDK_VERSION
languageVersion = KOTLIN_VERSION languageVersion = KOTLIN_VERSION
......
...@@ -17,9 +17,6 @@ kotlin { ...@@ -17,9 +17,6 @@ kotlin {
compilations.all { compilations.all {
kotlinOptions.allWarningsAsErrors = false kotlinOptions.allWarningsAsErrors = false
kotlinOptions.apiVersion = KOTLIN_VERSION kotlinOptions.apiVersion = KOTLIN_VERSION
val compilerArgs = kotlinOptions.freeCompilerArgs.toMutableList()
compilerArgs.add("-Xjsr305=strict")
kotlinOptions.freeCompilerArgs = compilerArgs.toList()
kotlinOptions.jvmTarget = JDK_VERSION kotlinOptions.jvmTarget = JDK_VERSION
kotlinOptions.languageVersion = KOTLIN_VERSION kotlinOptions.languageVersion = KOTLIN_VERSION
jvmToolchain { jvmToolchain {
......
import org.gradle.api.tasks.Copy
import org.gradle.kotlin.dsl.register
import org.gradle.kotlin.dsl.repositories
import org.gradle.kotlin.dsl.version
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpm import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpm
import java.io.File
plugins { plugins {
id("org.siouan.frontend-jdk11") id("org.siouan.frontend-jdk11")
...@@ -20,8 +15,6 @@ frontend { ...@@ -20,8 +15,6 @@ frontend {
nodeInstallDirectory.set(project.layout.projectDirectory.dir("node")) nodeInstallDirectory.set(project.layout.projectDirectory.dir("node"))
yarnEnabled.set(false) yarnEnabled.set(false)
//yarnVersion = "1.22.11"
//yarnInstallDirectory = file("${projectDir}/frontend/yarn")
cleanScript.set("run clean") cleanScript.set("run clean")
assembleScript.set("run build") assembleScript.set("run build")
......
No preview for this file type
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000 networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
...@@ -90,4 +90,3 @@ exit /b %EXIT_CODE% ...@@ -90,4 +90,3 @@ exit /b %EXIT_CODE%
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal
:omega :omega
...@@ -9,7 +9,6 @@ repositories { ...@@ -9,7 +9,6 @@ repositories {
} }
kotlin { kotlin {
@Suppress("UNUSED_VARIABLE")
sourceSets { sourceSets {
val commonMain by getting { val commonMain by getting {
dependencies { dependencies {
...@@ -31,7 +30,7 @@ kotlin { ...@@ -31,7 +30,7 @@ kotlin {
dependencies { dependencies {
implementation("org.jetbrains.kotlin:kotlin-bom") implementation("org.jetbrains.kotlin:kotlin-bom")
implementation("org.jetbrains.kotlin:kotlin-stdlib") implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation(files("$buildDir/resources/")) implementation(files("${layout.buildDirectory.asFile.get()}/resources/"))
api("de.comahe.i18n4k:i18n4k-core-jvm:0.5.0") api("de.comahe.i18n4k:i18n4k-core-jvm:0.5.0")
api("com.electronwill.night-config:toml:3.6.6") api("com.electronwill.night-config:toml:3.6.6")
api("com.fasterxml.jackson.core:jackson-databind:2.15.0") api("com.fasterxml.jackson.core:jackson-databind:2.15.0")
...@@ -86,8 +85,8 @@ tasks.jvmProcessResources { ...@@ -86,8 +85,8 @@ tasks.jvmProcessResources {
//Fix resources missing in multiplatform jvm inDev run https://youtrack.jetbrains.com/issue/KTIJ-16582/Consumer-Kotlin-JVM-library-cannot-access-a-Kotlin-Multiplatform-JVM-target-resources-in-multi-module-Gradle-project //Fix resources missing in multiplatform jvm inDev run https://youtrack.jetbrains.com/issue/KTIJ-16582/Consumer-Kotlin-JVM-library-cannot-access-a-Kotlin-Multiplatform-JVM-target-resources-in-multi-module-Gradle-project
tasks.register<Copy>("fixMissingResources") { tasks.register<Copy>("fixMissingResources") {
dependsOn(tasks.jvmProcessResources) dependsOn(tasks.jvmProcessResources)
from("$buildDir/processedResources/jvm/main") from("${layout.buildDirectory.asFile.get()}/processedResources/jvm/main")
into("$buildDir/resources/") into("${layout.buildDirectory.asFile.get()}/resources/")
} }
tasks.dokkaHtml { tasks.dokkaHtml {
......
...@@ -22,7 +22,7 @@ dependencies { ...@@ -22,7 +22,7 @@ dependencies {
api(project(":serverpackcreator-gui")) api(project(":serverpackcreator-gui"))
api(project(":serverpackcreator-web")) api(project(":serverpackcreator-web"))
api(project(":serverpackcreator-updater")) api(project(":serverpackcreator-updater"))
api("de.griefed:versionchecker:1.1.5") api("de.griefed:versionchecker:1.1.9")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3") testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.3") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.3")
} }
...@@ -42,15 +42,15 @@ tasks.clean { ...@@ -42,15 +42,15 @@ tasks.clean {
} }
task("copyDependencies", Copy::class) { task("copyDependencies", Copy::class) {
from(configurations.runtimeClasspath).into("$buildDir/jars") from(configurations.runtimeClasspath).into("${layout.buildDirectory.asFile.get()}/jars")
} }
task("copyJar", Copy::class) { task("copyJar", Copy::class) {
from(tasks.jar).into("$buildDir/jars") from(tasks.jar).into("${layout.buildDirectory.asFile.get()}/jars")
} }
tasks.register<Delete>("cleanTmpPackager") { tasks.register<Delete>("cleanTmpPackager") {
delete("$buildDir/tmp/jpackager") delete("${layout.buildDirectory.asFile.get()}/tmp/jpackager")
} }
// https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpackage.html // https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpackage.html
...@@ -73,16 +73,16 @@ tasks.jpackage { ...@@ -73,16 +73,16 @@ tasks.jpackage {
ver ver
} }
copyright = "Copyright (C) ${Calendar.getInstance().get(Calendar.YEAR)} Griefed" copyright = "Copyright (C) ${Calendar.getInstance().get(Calendar.YEAR)} Griefed"
destination = "$buildDir/dist" destination = "${layout.buildDirectory.asFile.get()}/dist"
icon = File(packagerResources, "app.png").path icon = File(packagerResources, "app.png").path
input = "$buildDir/jars" input = "${layout.buildDirectory.asFile.get()}/jars"
javaOptions = listOf("-Dfile.encoding=UTF-8", "-Dlog4j2.formatMsgNoLookups=true") javaOptions = listOf("-Dfile.encoding=UTF-8", "-Dlog4j2.formatMsgNoLookups=true")
licenseFile = parent.path + "/licenses/LICENSE-AGREEMENT" licenseFile = parent.path + "/licenses/LICENSE-AGREEMENT"
mainJar = tasks.jar.get().archiveFileName.get() mainJar = tasks.jar.get().archiveFileName.get()
mainClass = "de.griefed.serverpackcreator.app.ServerPackCreatorKt" mainClass = "de.griefed.serverpackcreator.app.ServerPackCreatorKt"
resourceDir = packagerResources.path resourceDir = packagerResources.path
runtimeImage = System.getProperty("java.home") runtimeImage = System.getProperty("java.home")
temp = "$buildDir/tmp/jpackager" temp = "${layout.buildDirectory.asFile.get()}/tmp/jpackager"
vendor = "griefed.de" vendor = "griefed.de"
verbose = true verbose = true
mac { mac {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment