diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index 363028e..64b698e 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -24,6 +24,7 @@ jobs: -x ".github/scripts/update-version.sh" \ -x ".github/workflows/buildscript-maintenance.yml" \ -x ".github/workflows/package-release.yml" \ + -x ".github/workflows/toolchain-compatibility.yml" \ \ -x "*docs/*" \ -x "README.md" \ @@ -52,6 +53,7 @@ jobs: -x ".github/scripts/update-version.sh" \ -x ".github/workflows/buildscript-maintenance.yml" \ -x ".github/workflows/package-release.yml" \ + -x ".github/workflows/toolchain-compatibility.yml" \ \ -x "*docs/*" \ -x "*src/*" \ diff --git a/.github/workflows/toolchain-compatibility.yml b/.github/workflows/toolchain-compatibility.yml new file mode 100644 index 0000000..e306095 --- /dev/null +++ b/.github/workflows/toolchain-compatibility.yml @@ -0,0 +1,40 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Check if toolchain is applied when using differnt java versions + +on: + pull_request: + branches: [ master, main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup the workspace + run: ./gradlew setupDecompWorkspace + + - name: Build the mod + run: ./gradlew build + + - name: Run server with mod + timeout-minutes: 1 + run: ./gradlew runServer + + - name: Run client with mod + timeout-minutes: 1 + run: ./gradlew runClient diff --git a/build.gradle b/build.gradle index dc4ccc2..592e95c 100644 --- a/build.gradle +++ b/build.gradle @@ -36,14 +36,14 @@ buildscript { } plugins { + id 'idea' + id 'scala' id("org.ajoberstar.grgit") version("3.1.1") id("com.github.johnrengelman.shadow") version("4.0.4") id("com.palantir.git-version") version("0.12.3") } -apply plugin: 'scala' apply plugin: 'forge' -apply plugin: 'idea' def projectJavaVersion = JavaLanguageVersion.of(8)