Skip to content
This repository was archived by the owner on Jun 19, 2021. It is now read-only.

Commit 9dd5b27

Browse files
ToffikkTitaniumtown
authored andcommittedApr 27, 2021
[ci-skip] Updated Gradle to 7.0 (#453)
* Gradle 7.0 * Build JDK 16 * [CI-SKIP] rebase * Speed-Up build times Makes kotlin tasks run in parallel and adds back configure on demand * Updated to the final release of gradle 7.0 * Gradle Distribution SHA 256 Sum * Validate Gradle Wrapper * merged the two jobs * better name for validation * setup-java@v2 * fix? * specify arch * Setup JAVA_HOME and PATH * revert * Use the same jdk as @v1 * use setup-java@v1 too much errors * require Gradle Wrapper Validation to run build * setup-java@v2 * Regenerate cache maybe fix some issues * Auto set MC version of paperclip in GitHub Actions * Added .gitattributes Should fix issues with line endings * Update .gitattributes * Updated shadow jar plugin * fix
1 parent 7cf4be9 commit 9dd5b27

File tree

7 files changed

+70
-17
lines changed

7 files changed

+70
-17
lines changed
 

‎.gitattributes

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Handle line endings automatically for files detected as text
2+
# and leave all files detected as binary untouched.
3+
* text=auto
4+
#
5+
# The above will automatically detect and convert (crlf => lf) for all text files NOT listed below
6+
#
7+
# These files are text and should be normalized (Convert crlf => lf)
8+
*.java text eol=lf
9+
*.json text eol=lf
10+
*.properties text eol=lf
11+
*.txt text eol=lf
12+
*.xml text eol=lf
13+
*.kts text eol=lf
14+
*.gradle text eol=lf
15+
gradlew text eol=lf
16+
*.yml text eol=lf
17+
*.toml text eol=lf
18+
Jenkinsfile text eol=lf
19+
20+
# Preserve file endings
21+
*.patch -text
22+
23+
# Markdown
24+
*.md text diff=markdown
25+
26+
# Windows Files
27+
*.bat text eol=crlf
28+
*.cmd text eol=crlf
29+
30+
# Binary files
31+
*.class binary
32+
*.dll binary
33+
*.ear binary
34+
*.gif binary
35+
*.ico binary
36+
*.jar binary
37+
*.jpg binary
38+
*.jpeg binary
39+
*.png binary
40+
*.so binary
41+
*.war binary
42+
*.tiff binary
43+
*.tif binary

‎.github/workflows/build.yml

+16-9
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,34 @@ on:
1515
- 'Jenkinsfile'
1616

1717
jobs:
18+
validation:
19+
name: "Gradle Wrapper Validation"
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: gradle/wrapper-validation-action@v1
24+
1825
build:
26+
needs: validation
1927
runs-on: ubuntu-latest
20-
2128
strategy:
2229
matrix:
23-
java: [15, 11, 8]
30+
java: [ '8', '11', '16' ]
2431
fail-fast: false
25-
2632
steps:
2733
- uses: actions/checkout@v2
28-
- name: Set up JDK ${{ matrix.java }}
29-
uses: actions/setup-java@v1
34+
- name: Set up JDK ${{ matrix.Java }}
35+
uses: actions/setup-java@v2
3036
with:
37+
distribution: 'adopt'
3138
java-version: ${{ matrix.java }}
3239

3340
- name: Pull Gradle Cache
3441
uses: actions/cache@v2
3542
id: gradle-cache
3643
with:
3744
path: ~/.gradle
38-
key: ${{ runner.os }}-maven-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-java-${{ matrix.java }}
45+
key: ${{ runner.os }}-mavenCache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-openjdk-${{ matrix.java }}
3946

4047
- name: Setup Yatopia Project
4148
run: |
@@ -54,7 +61,7 @@ jobs:
5461
id: decompile-cache
5562
with:
5663
path: Paper/work/Minecraft/${{ steps.mcver.outputs.mcver }}
57-
key: ${{ hashFiles('Paper/work/BuildData/mappings/bukkit-$STEPS_MCVER_OUTPUTS_MCVER-cl.csrg') }}-${{ steps.mcver.outputs.mcver }}-${{ runner.os }}-java-${{ matrix.java }}-minecraft-decomp
64+
key: ${{ hashFiles('Paper/work/BuildData/mappings/bukkit-$STEPS_MCVER_OUTPUTS_MCVER-cl.csrg') }}-${{ steps.mcver.outputs.mcver }}-${{ runner.os }}-openjdk-${{ matrix.java }}-minecraft-decomp
5865

5966
- name: Apply Patches
6067
run: |
@@ -66,7 +73,7 @@ jobs:
6673
id: maven-cache
6774
with:
6875
path: ~/.m2/repository
69-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
76+
key: ${{ runner.os }}-mavenCache-${{ hashFiles('**/pom.xml') }}
7077

7178
- name: Build Yatopia
7279
run: |
@@ -76,5 +83,5 @@ jobs:
7683
uses: actions/upload-artifact@v2
7784
with:
7885
name: Yatopia-${{ matrix.java }}
79-
path: yatopia-1.16.5-paperclip.jar
86+
path: yatopia-${{ steps.mcver.outputs.mcver }}-paperclip.jar
8087

‎buildSrc/build.gradle.kts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
val kotlinxDomVersion = "0.0.10"
2-
val shadowVersion = "6.1.0"
2+
val shadowVersion = "7.0.0"
33
val mustacheVersion = "0.9.6"
44
val javaxMailVersion = "1.4.4"
55

@@ -9,14 +9,13 @@ plugins {
99

1010
repositories {
1111
mavenCentral()
12-
jcenter()
1312
maven("https://plugins.gradle.org/m2/")
1413
maven("https://jitpack.io/")
1514
}
1615

1716
dependencies {
1817
implementation("org.jetbrains.kotlinx:kotlinx.dom:$kotlinxDomVersion")
19-
implementation("com.github.jengelman.gradle.plugins:shadow:$shadowVersion")
18+
implementation("com.github.johnrengelman:shadow:$shadowVersion")
2019
implementation("com.github.spullara.mustache.java:compiler:$mustacheVersion")
2120
implementation("javax.mail:mail:$javaxMailVersion")
2221
implementation("com.github.ishlandbukkit:jbsdiff:deff66b794")

‎gradle.properties

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
org.gradle.daemon=true
2-
org.gradle.jvmargs=-Xmx2G
2+
org.gradle.jvmargs=-Xms1G -Xmx3G
33
org.gradle.parallel=true
4-
org.gradle.configureondemand=true
4+
kotlin.parallel.tasks.in.project=true
5+
org.gradle.caching=true
6+
org.gradle.​configureondemand=true
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
4+
# Check on https://gradle.org/release-checksums/
5+
distributionSha256Sum=eb8b89184261025b0430f5b2233701ff1377f96da1ef5e278af6ae8bac5cc305
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

‎gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ APP_NAME="Gradle"
4444
APP_BASE_NAME=`basename "$0"`
4545

4646
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
47+
DEFAULT_JVM_OPTS='"-Xmx3G" "-Xms1G"'
4848

4949
# Use the maximum available, or set MAX_FD != -1 to use that value.
5050
MAX_FD="maximum"

‎gradlew.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ set APP_HOME=%DIRNAME%
3333
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
3434

3535
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
36+
set DEFAULT_JVM_OPTS="-Xmx3G" "-Xms1G"
3737

3838
@rem Find java.exe
3939
if defined JAVA_HOME goto findJavaFromJavaHome

0 commit comments

Comments
 (0)
This repository has been archived.