Update Gradle to 7.0.2

This commit is contained in:
Jonas Herzig
2021-06-04 23:38:48 +02:00
parent 59fb58c6fc
commit 4cdbfb7c46
8 changed files with 67 additions and 32 deletions

View File

@@ -7,8 +7,8 @@ Make sure your sub-projects are up-to-date: `git submodule update --init --recur
For compiling 1.7.10, you must run `./gradlew :jGui:1.7.10:setupDecompWorkspace :1.7.10:setupDecompWorkspace` once after the initial clone. This may take quite some time.
### No IDE
You can build the mod by running `./gradlew build` (or just `./gradlew shadowJar`). You can then find the final jar files in `versions/$MCVERSION/build/libs/`.
You can also build single versions by running `./gradlew :1.8:build` (or just `./gradlew :1.8:shadowJar`) (builds the MC 1.8 version).
You can build the mod by running `./gradlew build` (or just `./gradlew bundleJar`). You can then find the final jar files in `versions/$MCVERSION/build/libs/`.
You can also build single versions by running `./gradlew :1.8:build` (or just `./gradlew :1.8:bundleJar`) (builds the MC 1.8 version).
### IntelliJ
Ensure you have at least IDEA 2020.1.

View File

@@ -32,18 +32,18 @@ buildscript {
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.2'
classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
if (fabric) {
classpath 'fabric-loom:fabric-loom.gradle.plugin:0.6-SNAPSHOT'
classpath 'fabric-loom:fabric-loom.gradle.plugin:0.8-SNAPSHOT'
} else if (mcVersion >= 11400) {
classpath('net.minecraftforge.gradle:ForgeGradle:3.+'){
classpath('net.minecraftforge.gradle:ForgeGradle:5.+'){
exclude group: 'trove', module: 'trove' // preprocessor/idea requires more recent one
}
} else if (mcVersion >= 10800) {
classpath('com.github.ReplayMod:ForgeGradle:' + (
mcVersion >= 11200 ? '541e1485' : // FG 2.3
mcVersion >= 10904 ? '5c1f53dc' : // FG 2.2
'48c4f0c6' // FG 2.1
mcVersion >= 11200 ? '34ab703' : // FG 2.3
mcVersion >= 10904 ? '5d1e8d8' : // FG 2.2
'd1a7165' // FG 2.1
) + ':all')
} else {
classpath 'com.github.ReplayMod:ForgeGradle:a8a9e0ca:all' // FG 1.2
@@ -218,10 +218,10 @@ repositories {
configurations {
// Include dep in fat jar without relocation and, when forge supports it, without exploding (TODO)
shade
compile.extendsFrom shade
implementation.extendsFrom shade
// Include dep in fat jar with relocation and minimization
shadow
compile.extendsFrom shadow
implementation.extendsFrom shadow
}
def shadeExclusions = {
@@ -247,7 +247,7 @@ dependencies {
11603: '1.16.3+build.1:v2',
11604: '1.16.4+build.6:v2',
][mcVersion]
modCompile 'net.fabricmc:fabric-loader:' + [
modImplementation 'net.fabricmc:fabric-loader:' + [
11404: '0.7.8+build.189',
11502: '0.7.8+build.189',
11601: '0.8.8+build.202',
@@ -271,7 +271,7 @@ dependencies {
fabricApiModules.add("key-binding-api-v1")
}
fabricApiModules.each { module ->
modCompile fabricApi.module("fabric-$module", fabricApiVersion)
modImplementation fabricApi.module("fabric-$module", fabricApiVersion)
include fabricApi.module("fabric-$module", fabricApiVersion)
}
}
@@ -331,15 +331,15 @@ dependencies {
if (FABRIC) {
if (mcVersion >= 11602) {
modCompile 'com.terraformersmc:modmenu:1.16.8'
modImplementation 'com.terraformersmc:modmenu:1.16.8'
} else if (mcVersion >= 11600) {
modCompile 'io.github.prospector:modmenu:1.14.0+build.24'
modImplementation 'io.github.prospector:modmenu:1.14.0+build.24'
} else {
modCompile 'io.github.prospector.modmenu:ModMenu:1.6.2-92'
modImplementation 'io.github.prospector.modmenu:ModMenu:1.6.2-92'
}
}
testCompile 'junit:junit:4.11'
testImplementation 'junit:junit:4.11'
}
if (mcVersion <= 10710) {
@@ -431,8 +431,12 @@ task configureRelocation() {
}
}
tasks.removeByName('shadowJar') // we want to base our shadowed jar on the reobfJar output, not the sourceSet output
task shadowJar(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
// we want to base our shadowed jar on the reobfJar output, not the sourceSet output
// Tried tasks.replace but that does not actually seem to replace everything.
tasks.shadowJar.doFirst {
throw new GradleException("Wrong task! You want to run 'bundleJar' instead.")
}
tasks.register('bundleJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar).configure {
from { (FABRIC ? tasks.remapJar : tasks.jar).archiveFile.get() }
dependsOn { FABRIC ? tasks.remapJar : (mcVersion >= 10800 ? tasks.reobfJar : tasks.reobf) }
@@ -478,7 +482,7 @@ task shadowJar(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar)
exclude(dependency('.*spongepowered:mixin:.*'))
}
}
tasks.assemble.dependsOn tasks.shadowJar
tasks.assemble.dependsOn tasks.bundleJar
jar {
classifier = 'raw'

Binary file not shown.

View File

@@ -1,6 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

18
gradlew vendored
View File

@@ -1,5 +1,21 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
@@ -28,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=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

18
gradlew.bat vendored
View File

@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@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=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

2
jGui

Submodule jGui updated: a4cf26044d...c3efefdc99

View File

@@ -2,8 +2,8 @@ import groovy.json.JsonOutput
import java.io.ByteArrayOutputStream
plugins {
id("fabric-loom") version "0.6-SNAPSHOT" apply false
id("com.replaymod.preprocess") version "3d85a00"
id("fabric-loom") version "0.8-SNAPSHOT" apply false
id("com.replaymod.preprocess") version "4b4dfe5"
id("com.github.hierynomus.license") version "0.15.0"
}
@@ -25,7 +25,7 @@ if (gitDescribe().endsWith("*")) {
group = "com.replaymod"
val shadowJar by tasks.creating(Copy::class) {
val bundleJar by tasks.creating(Copy::class) {
into("$buildDir/libs")
}
@@ -37,10 +37,10 @@ subprojects {
}
afterEvaluate {
val projectShadowJar = project.tasks.findByName("shadowJar")
if (projectShadowJar != null && projectShadowJar.hasProperty("archivePath") && project.name != "core") {
shadowJar.dependsOn(projectShadowJar)
shadowJar.from(projectShadowJar.withGroovyBuilder { getProperty("archivePath") })
val projectBundleJar = project.tasks.findByName("bundleJar")
if (projectBundleJar != null && projectBundleJar.hasProperty("archivePath") && project.name != "core") {
bundleJar.dependsOn(projectBundleJar)
bundleJar.from(projectBundleJar.withGroovyBuilder { getProperty("archivePath") })
}
}
}
@@ -173,7 +173,7 @@ val doRelease by tasks.registering {
}
}
defaultTasks("shadowJar")
defaultTasks("bundleJar")
preprocess {
"1.16.4"(11604, "yarn") {