Skip to content

Commit

Permalink
Fix for Gradle error of fetchNatives task using the output of Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
obigu committed Nov 12, 2023
1 parent 02edfe8 commit d051d5c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ allprojects {
greclipse().configFile new File(rootProject.projectDir.absolutePath, 'eclipse-formatter.xml')
}
}

tasks.named("spotlessGroovyGradle") {
mustRunAfter(":fetchNatives")
}

tasks.named("spotlessJava") {
mustRunAfter(":fetchNatives")
}
}

configure(subprojects - project(":tests:gdx-tests-android") - project(":backends:gdx-backend-android")) {
Expand Down Expand Up @@ -183,7 +191,7 @@ task setupExternalNativesDirs() {
file("extensions/gdx-lwjgl3-glfw-awt-macos/res/macosx64").mkdirs();
file("extensions/gdx-lwjgl3-glfw-awt-macos/res/macosarm64").mkdirs();
}
outputs.upToDateWhen { false }
doNotTrackState("Don't track state")
}

task fetchAngleNativesZIP(dependsOn: setupExternalNativesDirs, type: Download) {
Expand Down Expand Up @@ -214,7 +222,7 @@ task fetchExternalNatives(dependsOn: [
] , type: Copy) {
from zipTree("build/gdx-angle-natives.zip")
into "./extensions/gdx-lwjgl3-angle/res"
outputs.upToDateWhen { false }
doNotTrackState("Don't track state")
}

task fetchGdxNativesZIP(dependsOn: fetchExternalNatives, type: Download) {
Expand All @@ -227,7 +235,7 @@ task fetchGdxNativesZIP(dependsOn: fetchExternalNatives, type: Download) {
task fetchNatives(dependsOn: fetchGdxNativesZIP, type: Copy) {
from zipTree("build/natives.zip")
into "."
outputs.upToDateWhen { false }
doNotTrackState("Don't track state")
}

apply from: rootProject.file('publish.gradle')
Expand Down

0 comments on commit d051d5c

Please sign in to comment.