diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b01da52..d7e8f1b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,26 @@ # against bad commits. name: build -on: [pull_request, push] + +on: + pull_request: + paths: &build_paths + - '.github/workflows/build.yml' + - 'build.gradle' + - 'gradle.properties' + - 'gradle/**' + - 'gradlew' + - 'gradlew.bat' + - 'settings.gradle' + - 'src/**' + + push: + branches: [main] + paths: *build_paths + +concurrency: + group: "java-build-${{ github.ref }}" + cancel-in-progress: true jobs: build: @@ -12,7 +31,7 @@ jobs: matrix: # Use these Java versions java: [ - 21, # Current Java LTS + 25, # Current Java LTS ] runs-on: ubuntu-22.04 steps: @@ -30,8 +49,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 == '25' }} # 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 a86e80a..253bd8a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version "${loom_version}" + id 'net.fabricmc.fabric-loom' version "${loom_version}" id 'maven-publish' } @@ -21,11 +21,10 @@ repositories { dependencies { // To change the versions see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + implementation "net.fabricmc:fabric-loader:${project.loader_version}" // Fabric API. This is technically optional, but you probably want it anyway. - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" } @@ -38,7 +37,7 @@ processResources { } tasks.withType(JavaCompile).configureEach { - it.options.release = 21 + it.options.release = 25 } java { @@ -47,8 +46,8 @@ java { // If you remove this line, sources will not be generated. withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.VERSION_25 + targetCompatibility = JavaVersion.VERSION_25 } jar { @@ -75,4 +74,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.properties b/gradle.properties index 114e481..5787095 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,15 +4,14 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.21.11 -yarn_mappings=1.21.11+build.3 +minecraft_version=26.1-snapshot-3 loader_version=0.18.4 loom_version=1.14-SNAPSHOT # Mod Properties -mod_version=1.0.4+1.21.11 +mod_version=1.0.5-beta+26.1-snapshots maven_group=me.imgalvin.playerfinder archives_base_name=player-finder # Dependencies -fabric_version=0.140.2+1.21.11 \ No newline at end of file +fabric_api_version=0.142.0+26.1