diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..ebebf97d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,43 @@ +# Handle line endings automatically for files detected as text +# and leave all files detected as binary untouched. +* text=auto +# +# The above will automatically detect and convert (crlf => lf) for all text files NOT listed below +# +# These files are text and should be normalized (Convert crlf => lf) +*.java text eol=lf +*.json text eol=lf +*.properties text eol=lf +*.txt text eol=lf +*.xml text eol=lf +*.kts text eol=lf +*.gradle text eol=lf +gradlew text eol=lf +*.yml text eol=lf +*.toml text eol=lf +Jenkinsfile text eol=lf + +# Preserve file endings +*.patch -text + +# Markdown +*.md text diff=markdown + +# Windows Files +*.bat text eol=crlf +*.cmd text eol=crlf + +# Binary files +*.class binary +*.dll binary +*.ear binary +*.gif binary +*.ico binary +*.jar binary +*.jpg binary +*.jpeg binary +*.png binary +*.so binary +*.war binary +*.tiff binary +*.tif binary diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43e485d4..2bdd3dfa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,19 +15,26 @@ on: - 'Jenkinsfile' jobs: - build: + validation: + name: "Gradle Wrapper Validation" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 + + build: + needs: validation runs-on: ubuntu-latest - strategy: matrix: - java: [15, 11, 8] + java: [ '8', '11', '16' ] fail-fast: false - steps: - uses: actions/checkout@v2 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + - name: Set up JDK ${{ matrix.Java }} + uses: actions/setup-java@v2 with: + distribution: 'adopt' java-version: ${{ matrix.java }} - name: Pull Gradle Cache @@ -35,7 +42,7 @@ jobs: id: gradle-cache with: path: ~/.gradle - key: ${{ runner.os }}-maven-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-java-${{ matrix.java }} + key: ${{ runner.os }}-mavenCache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-openjdk-${{ matrix.java }} - name: Setup Yatopia Project run: | @@ -54,7 +61,7 @@ jobs: id: decompile-cache with: path: Paper/work/Minecraft/${{ steps.mcver.outputs.mcver }} - key: ${{ hashFiles('Paper/work/BuildData/mappings/bukkit-$STEPS_MCVER_OUTPUTS_MCVER-cl.csrg') }}-${{ steps.mcver.outputs.mcver }}-${{ runner.os }}-java-${{ matrix.java }}-minecraft-decomp + key: ${{ hashFiles('Paper/work/BuildData/mappings/bukkit-$STEPS_MCVER_OUTPUTS_MCVER-cl.csrg') }}-${{ steps.mcver.outputs.mcver }}-${{ runner.os }}-openjdk-${{ matrix.java }}-minecraft-decomp - name: Apply Patches run: | @@ -66,7 +73,7 @@ jobs: id: maven-cache with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ runner.os }}-mavenCache-${{ hashFiles('**/pom.xml') }} - name: Build Yatopia run: | @@ -76,5 +83,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: Yatopia-${{ matrix.java }} - path: yatopia-1.16.5-paperclip.jar + path: yatopia-${{ steps.mcver.outputs.mcver }}-paperclip.jar diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 1991567b..540b3574 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,5 +1,5 @@ val kotlinxDomVersion = "0.0.10" -val shadowVersion = "6.1.0" +val shadowVersion = "7.0.0" val mustacheVersion = "0.9.6" val javaxMailVersion = "1.4.4" @@ -9,14 +9,13 @@ plugins { repositories { mavenCentral() - jcenter() maven("https://plugins.gradle.org/m2/") maven("https://jitpack.io/") } dependencies { implementation("org.jetbrains.kotlinx:kotlinx.dom:$kotlinxDomVersion") - implementation("com.github.jengelman.gradle.plugins:shadow:$shadowVersion") + implementation("com.github.johnrengelman:shadow:$shadowVersion") implementation("com.github.spullara.mustache.java:compiler:$mustacheVersion") implementation("javax.mail:mail:$javaxMailVersion") implementation("com.github.ishlandbukkit:jbsdiff:deff66b794") diff --git a/gradle.properties b/gradle.properties index 944e302d..054cd316 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,6 @@ org.gradle.daemon=true -org.gradle.jvmargs=-Xmx2G +org.gradle.jvmargs=-Xms1G -Xmx3G org.gradle.parallel=true -org.gradle.configureondemand=true +kotlin.parallel.tasks.in.project=true +org.gradle.caching=true +org.gradle.​configureondemand=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 442d9132..87426754 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +# Check on https://gradle.org/release-checksums/ +distributionSha256Sum=eb8b89184261025b0430f5b2233701ff1377f96da1ef5e278af6ae8bac5cc305 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0c..86609264 100755 --- a/gradlew +++ b/gradlew @@ -44,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +DEFAULT_JVM_OPTS='"-Xmx3G" "-Xms1G"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index 107acd32..be98c877 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -33,7 +33,7 @@ set APP_HOME=%DIRNAME% for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" +set DEFAULT_JVM_OPTS="-Xmx3G" "-Xms1G" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome