diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index df826ebf..923c0235 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -16,11 +16,11 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 17 + java-version: 21 check-latest: true - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43608ff6..5f3848c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,11 +14,11 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 17 + java-version: 21 check-latest: true - name: Remove tags for release on other versions run: ./scripts/tagcleaner.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc3b5c91..705b1824 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,16 +2,15 @@ ModernFix is a standard Minecraft-style Gradle project powered by Architectury L run the `build` task (e.g. via `./gradlew build`). You can also use `./gradlew forge:build` or `./gradlew fabric:build` to build for just one loader (e.g. when debugging and wanting to rebuild quickly). -You must use Java 17 to develop ModernFix as the toolchain requires it. Nonetheless, the 1.16 mod JARs will work on -a Minecraft instance with Java 8. +You must use Java 21 to develop ModernFix as the toolchain requires it. Nonetheless, the built 1.20.1 JAR is still +compatible with Java 17. ## Submitting pull requests Code or documentation contributions are welcome. Please keep the following points in mind: -* This project supports many Minecraft versions. Ideally, contributions should be made to the oldest relevant MC version. -For instance, a PR optimizing new worldgen should be made to 1.18 (not 1.19 or 1.20) while a PR optimizing something -like recipes should be made to 1.16 (the oldest supported version). +* This project supports many Minecraft versions. Ideally, contributions should be made to the oldest relevant MC version (currently 1.20) + and then they will be ported forward. This somewhat unconventional policy ensures that all supported versions are treated equal when it comes to development, rather than the onus being on other modders and players to backport changes that are needed. Changes to older versions are diff --git a/annotation-processor/build.gradle b/annotation-processor/build.gradle index 797b62cc..0cefd6df 100644 --- a/annotation-processor/build.gradle +++ b/annotation-processor/build.gradle @@ -31,8 +31,7 @@ dependencies { } tasks.withType(JavaCompile) { - options.compilerArgs += '--enable-preview' - options.release = 17 + options.release = 21 } shadowJar { diff --git a/annotation-processor/src/main/java/org/fury_phoenix/mixinAp/annotation/MixinProcessor.java b/annotation-processor/src/main/java/org/fury_phoenix/mixinAp/annotation/MixinProcessor.java index 747f8865..52bffe94 100644 --- a/annotation-processor/src/main/java/org/fury_phoenix/mixinAp/annotation/MixinProcessor.java +++ b/annotation-processor/src/main/java/org/fury_phoenix/mixinAp/annotation/MixinProcessor.java @@ -26,7 +26,6 @@ import org.fury_phoenix.mixinAp.config.MixinConfig; @SupportedAnnotationTypes({"org.spongepowered.asm.mixin.Mixin", "org.embeddedt.modernfix.annotation.ClientOnlyMixin"}) @SupportedOptions({"rootProject.name", "project.name", "org.fury_phoenix.mixinAp.validator.debug"}) -@SupportedSourceVersion(SourceVersion.RELEASE_17) @AutoService(Processor.class) public class MixinProcessor extends AbstractProcessor { @@ -38,6 +37,11 @@ public class MixinProcessor extends AbstractProcessor { private final Map> mixinConfigList = new HashMap<>(); + @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } + @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { try { diff --git a/build.gradle b/build.gradle index fe2e811f..20fc6203 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { id 'org.ajoberstar.grgit' version '5.2.0' id 'se.bjurr.gitchangelog.git-changelog-gradle-plugin' version '1.79.0' id "com.modrinth.minotaur" version "2.+" apply false - id("com.diffplug.spotless") version "6.18.0" apply false + id("com.diffplug.spotless") version "6.25.0" apply false id 'modernfix.common-conventions' apply false } diff --git a/buildSrc/src/main/groovy/modernfix.mod-common-conventions.gradle b/buildSrc/src/main/groovy/modernfix.mod-common-conventions.gradle index 2607468c..dc9f149b 100644 --- a/buildSrc/src/main/groovy/modernfix.mod-common-conventions.gradle +++ b/buildSrc/src/main/groovy/modernfix.mod-common-conventions.gradle @@ -34,8 +34,6 @@ tasks { } tasks.withType(JavaCompile) { - options.fork = true - options.forkOptions.jvmArgs << '--enable-preview' configure(options) { if (!name.toLowerCase().contains('test')) { options.compilerArgs << "-ArootProject.name=${rootProject.name}" << "-Aproject.name=${project.name}" diff --git a/fabric/build.gradle b/fabric/build.gradle index a414db57..3d918727 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -26,18 +26,6 @@ configurations { } } -// TODO remove - -repositories { - maven { - name = "Technici4n" - url = "https://raw.githubusercontent.com/Technici4n/Technici4n-maven/master/" - content { - includeGroup "net.fabricmc.fabric-api" - } - } -} - dependencies { modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" testImplementation "net.fabricmc:fabric-loader-junit:${rootProject.fabric_loader_version}" @@ -78,7 +66,7 @@ dependencies { testAgent(project("path": ":test_agent", "configuration": "agentJar")) } -test { +tasks.named("test") { useJUnitPlatform() def runDir = file('test_run') doFirst() {