update toolchain to Java 16

This commit is contained in:
gnembon committed 2021-05-12 22:48:44 -03:00
1 parent 1b0fc3202f
commit f5db84345e
5 files changed
+28 -22

No files matched your search

+2 -2
View File
@@ -15,10 +15,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up JDK 1.8 - name: Set up JDK 16
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 16
- name: Cache Gradle packages - name: Cache Gradle packages
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
+2 -2
View File
@@ -15,10 +15,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up JDK 1.8 - name: Set up JDK 16
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 16
- name: Cache Gradle packages - name: Cache Gradle packages
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
+5 -5
View File
@@ -65,10 +65,10 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
ref: ${{ steps.getbranchinfo.outputs.branchname }} ref: ${{ steps.getbranchinfo.outputs.branchname }}
- name: Set up JDK 1.8 - name: Set up JDK 16
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 16
- name: Cache Gradle packages - name: Cache Gradle packages
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
@@ -139,10 +139,10 @@ jobs:
steps: steps:
- name: Checkout Carpet sources - name: Checkout Carpet sources
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up JDK 1.8 - name: Set up JDK 16
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 16
- name: Cache Gradle packages - name: Cache Gradle packages
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
@@ -157,7 +157,7 @@ jobs:
{ {
"schemaVersion": 1, "schemaVersion": 1,
"id": "carpet", "id": "carpet",
"version": "1.4.11", "version": "1.4.36",
"entrypoints": { "entrypoints": {
"server": [ "carpet.utils.CarpetRulePrinter" ], "server": [ "carpet.utils.CarpetRulePrinter" ],
"preLaunch": [ "carpet.utils.CarpetRulePrinter" ] "preLaunch": [ "carpet.utils.CarpetRulePrinter" ]
+18 -12
View File
@@ -1,5 +1,5 @@
plugins { plugins {
id 'fabric-loom' version '0.5-SNAPSHOT' id 'fabric-loom' version '0.8-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }
@@ -18,7 +18,7 @@ dependencies {
// To change the versions see the gradle.properties file // To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}" minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modCompile "net.fabricmc:fabric-loader:${project.loader_version}" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway. // Fabric API. This is technically optional, but you probably want it anyway.
// modCompile "net.fabricmc:fabric:${project.fabric_version}" // modCompile "net.fabricmc:fabric:${project.fabric_version}"
@@ -31,14 +31,17 @@ dependencies {
processResources { processResources {
inputs.property "version", project.version inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) { filesMatching("fabric.mod.json") {
include "fabric.mod.json" expand "version": project.version
expand "version": project.mod_version
} }
//from(sourceSets.main.resources.srcDirs) {
// include "fabric.mod.json"
// expand "version": project.mod_version
//}
from(sourceSets.main.resources.srcDirs) { //from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json" // exclude "fabric.mod.json"
} //}
} }
@@ -52,10 +55,13 @@ tasks.withType(JavaCompile).configureEach {
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too // The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used. // JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
// We'll use that if it's available, but otherwise we'll use the older option. // We'll use that if it's available, but otherwise we'll use the older option.
def targetVersion = 8 //def targetVersion = 8
if (JavaVersion.current().isJava9Compatible()) { //if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetVersion // it.options.release = targetVersion
} //}
// Minecraft 1.17 (21w19a) upwards uses Java 16.
//it.options.release = 16
} }
java { java {
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists