Update buildscript

- Update Gradle from 5.6.3 to 5.6.4
- Move some versions to gradle.properties
- Switch to new Forge Maven URL
- Update JEI to 1.16.5 and Mixin processor to 0.8.2
- Add out/ to .gitignore
This commit is contained in:
PepperBell 2021-06-17 22:04:21 -07:00
parent a15c9b0ad5
commit 1e41a390e4
7 changed files with 78 additions and 40 deletions

1
.gitignore vendored
View file

@ -8,6 +8,7 @@ gradle-app.setting
## IntelliJ IDEA ## IntelliJ IDEA
.idea/ .idea/
out/
*.iml *.iml
*.iws *.iws
*.ipr *.ipr

View file

@ -1,23 +1,24 @@
buildscript { buildscript {
repositories { repositories {
maven { url = 'https://files.minecraftforge.net/maven' } maven { url = 'https://maven.minecraftforge.net' }
jcenter()
mavenCentral() mavenCentral()
maven { url='https://repo.spongepowered.org/repository/maven-public/' } jcenter()
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
} }
dependencies { dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: "${forgegradle_version}", changing: true
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT' classpath group: 'org.spongepowered', name: 'mixingradle', version: "${mixingradle_version}"
} }
} }
plugins { plugins {
id 'com.github.johnrengelman.shadow' version '5.2.0' id 'com.github.johnrengelman.shadow' version "${shadow_version}"
id 'com.matthewprenger.cursegradle' version '1.4.0' id 'com.matthewprenger.cursegradle' version "${cursegradle_version}"
} }
apply plugin: 'net.minecraftforge.gradle' apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equals('false'); boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equals('false');
@ -32,10 +33,10 @@ sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = co
minecraft { minecraft {
mappings channel: 'snapshot', version: '20200920-mixed-1.16.3' mappings channel: 'snapshot', version: '20200920-mixed-1.16.3'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs { runs {
client { client {
workingDirectory project.file('run') workingDirectory project.file('run')
arg '-mixin.config=create.mixins.json' arg '-mixin.config=create.mixins.json'
//jvmArgs '-XX:+UnlockCommercialFeatures' // uncomment for profiling //jvmArgs '-XX:+UnlockCommercialFeatures' // uncomment for profiling
@ -85,19 +86,19 @@ sourceSets.main.resources {
repositories { repositories {
maven { maven {
// location of the maven that hosts JEI files (And TiC) // location of the maven that hosts JEI files (And TiC)
name "Progwml6 maven" name = "Progwml6 maven"
url "https://dvs1.progwml6.com/files/maven/" url = "https://dvs1.progwml6.com/files/maven/"
} }
/* /*
maven { maven {
// location of a maven mirror for JEI files, as a fallback // location of a maven mirror for JEI files, as a fallback
name "ModMaven" name = "ModMaven"
url "https://modmaven.k-4u.nl" url = "https://modmaven.k-4u.nl"
}*/ }*/
maven { maven {
//location of the maven for vazkii's mods //location of the maven for vazkii's mods
name "blamejared" name = "blamejared"
url "http://maven.blamejared.com/" url = "http://maven.blamejared.com/"
} }
maven { maven {
//location of the maven for mixed mappings and registrate //location of the maven for mixed mappings and registrate
@ -121,9 +122,9 @@ dependencies {
shade registrate shade registrate
// compile against the JEI API but do not include it at runtime // compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei-1.16.4:${jei_version}:api") compileOnly fg.deobf("mezz.jei:jei-1.16.5:${jei_version}:api")
// at runtime, use the full JEI jar // at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-1.16.4:${jei_version}") runtimeOnly fg.deobf("mezz.jei:jei-1.16.5:${jei_version}")
// implementation fg.deobf("curse.maven:druidcraft-340991:3101903") // implementation fg.deobf("curse.maven:druidcraft-340991:3101903")
@ -133,7 +134,7 @@ dependencies {
//runtimeOnly fg.deobf("slimeknights.mantle:Mantle:1.16.5-1.6.103") //runtimeOnly fg.deobf("slimeknights.mantle:Mantle:1.16.5-1.6.103")
//runtimeOnly fg.deobf("slimeknights.tconstruct:TConstruct:1.16.5-3.0.3.168") //runtimeOnly fg.deobf("slimeknights.tconstruct:TConstruct:1.16.5-3.0.3.168")
annotationProcessor 'org.spongepowered:mixin:0.8:processor' annotationProcessor 'org.spongepowered:mixin:0.8.2:processor'
} }
jar { jar {
@ -162,6 +163,10 @@ reobf {
shadowJar {} shadowJar {}
} }
mixin {
add sourceSets.main, "create.refmap.json"
}
String getChangelogText() { String getChangelogText() {
def changelogFile = file('changelog.txt') def changelogFile = file('changelog.txt')
String str = '' String str = ''
@ -212,13 +217,7 @@ curseforge {
displayName = "Create - ${version}" displayName = "Create - ${version}"
} }
relations { relations {
optionalDependency 'jei' optionalDependency 'jei'
} }
} }
} }
apply plugin: 'org.spongepowered.mixin'
mixin {
add sourceSets.main, "create.refmap.json"
}

View file

@ -1,20 +1,26 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties. # Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process. # This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G org.gradle.jvmargs = -Xmx3G
org.gradle.daemon=false org.gradle.daemon = false
# mod version info # mod version info
mod_version=0.3.2 mod_version = 0.3.2
minecraft_version=1.16.5 minecraft_version = 1.16.5
forge_version=36.0.42 forge_version = 36.1.32
# build dependency versions
forgegradle_version = 3.+
mixingradle_version = 0.7-SNAPSHOT
shadow_version = 5.2.0
cursegradle_version = 1.4.0
# dependency versions # dependency versions
registrate_version=1.0.4 registrate_version = 1.0.5
jei_version=7.6.1.71 jei_version = 7.7.0.106
# curseforge information # curseforge information
projectId=328085 projectId = 328085
curse_type=beta curse_type = beta
# github information # github information
github_project=Creators-of-Create/Create github_project = Creators-of-Create/Create

Binary file not shown.

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-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip

22
gradlew vendored
View file

@ -1,5 +1,21 @@
#!/usr/bin/env sh #!/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
#
# https://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 ## Gradle start up script for UN*X
@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"` 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. # 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. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD="maximum"
@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi fi
# For Cygwin, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if $cygwin ; then if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"` APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"` JAVACMD=`cygpath --unix "$JAVACMD"`

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 https://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 @if "%DEBUG%" == "" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% 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. @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 @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome