diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b01da52..003e1c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,9 +11,7 @@ jobs: strategy: matrix: # Use these Java versions - java: [ - 21, # Current Java LTS - ] + java: [ 17 ] runs-on: ubuntu-22.04 steps: - name: checkout repository @@ -30,8 +28,8 @@ jobs: - name: build run: ./gradlew build - name: capture build artifacts - if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java + if: ${{ matrix.java == '17' }} # Only upload artifacts built from latest java uses: actions/upload-artifact@v4 with: name: Artifacts - path: build/libs/ \ No newline at end of file + path: build/libs/ diff --git a/build.gradle b/build.gradle index 2f6c710..6a20446 100644 --- a/build.gradle +++ b/build.gradle @@ -40,9 +40,11 @@ processResources { expand "version": project.version } } - +compileJava { + options.compilerArgs += ['--enable-preview'] +} tasks.withType(JavaCompile).configureEach { - it.options.release = 21 + it.options.release = 17 } java { @@ -51,8 +53,8 @@ java { // If you remove this line, sources will not be generated. withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } jar { @@ -77,4 +79,4 @@ publishing { // The repositories here will be used for publishing your artifact, not for // retrieving dependencies. } -} \ No newline at end of file +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f3805e0..a4b76b9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index cea7a79..e18bc25 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index f5feea6..f3b75f3 100755 --- a/gradlew +++ b/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/src/main/java/dev/oxydien/workers/ModDownloadWorker.java b/src/main/java/dev/oxydien/workers/ModDownloadWorker.java index 23e932b..7c98758 100644 --- a/src/main/java/dev/oxydien/workers/ModDownloadWorker.java +++ b/src/main/java/dev/oxydien/workers/ModDownloadWorker.java @@ -413,8 +413,8 @@ private void runModification(SyncData.Modification modification) { for (var filePath : relativeMatches) { var matcher = pattern.matcher(filePath); if (matcher.matches()) { - matches.add(filePath); - Log.Log.debug("bw.runModification", "Found match for {} at {}", modification.getPattern(), filePath); + matches.add(workingDirectory + "/" + filePath); + Log.Log.debug("bw.runModification", "Found match for {} at {}", modification.getPattern(), (workingDirectory + "/" + filePath)); break; } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index afb8f91..d899901 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -29,6 +29,6 @@ "fabricloader": ">=0.16.5", "minecraft": "~1.20.1", "fabric-api": "*", - "java": ">=21" + "java": ">=17" } } diff --git a/src/main/resources/simple-mod-sync.mixins.json b/src/main/resources/simple-mod-sync.mixins.json index 1c88c03..aa6b0a9 100644 --- a/src/main/resources/simple-mod-sync.mixins.json +++ b/src/main/resources/simple-mod-sync.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "dev.oxydien.mixin", - "compatibilityLevel": "JAVA_21", + "compatibilityLevel": "JAVA_17", "mixins": [ "TitleScreenMixin" ],