Skip to content

Commit

Permalink
Merge branch 'updates'
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxNeedsSnacks committed Apr 15, 2023
2 parents 4a3e779 + 7cdf3e8 commit 355dfe3
Show file tree
Hide file tree
Showing 12 changed files with 457 additions and 54 deletions.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
plugins {
id "org.jetbrains.kotlin.jvm" version "1.5.31"
id "org.jetbrains.kotlin.plugin.serialization" version "1.5.31"
id "org.jetbrains.kotlin.jvm" version "1.8.10"
id "org.jetbrains.kotlin.plugin.serialization" version "1.8.10"
}

repositories {
mavenCentral()
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0"
implementation "org.kohsuke:github-api:1.135"
implementation "org.dom4j:dom4j:2.1.3"
}
Expand Down
426 changes: 420 additions & 6 deletions generator.config.json

Large diffs are not rendered by default.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 14 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# 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"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -205,6 +209,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
2 changes: 1 addition & 1 deletion templates/architectury/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
}

architectury {
Expand Down
2 changes: 1 addition & 1 deletion templates/architectury/forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ loom {

configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentForge.extendsFrom common
Expand Down
2 changes: 1 addition & 1 deletion templates/architectury_fabric/fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ loom {

configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
Expand Down
2 changes: 1 addition & 1 deletion templates/architectury_quilt/quilt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ loom {

configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentQuilt.extendsFrom common
Expand Down
28 changes: 2 additions & 26 deletions templates/forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "dev.architectury.loom" version "0.12.0-SNAPSHOT"
id "dev.architectury.loom" version "1.1-SNAPSHOT"
id "maven-publish"
}

Expand Down Expand Up @@ -32,24 +32,6 @@ loom {
// also, any names used in your access transformer will need to be
// in SRG mapped ("func_" / "field_" with MCP class names) to work!
// (both of these things may be subject to change in the future)

// this will create a data generator configuration
// that you can use to automatically generate assets and data
// using architectury loom. Note that this currently *only* works
// for forge projects made with architectury loom!
dataGen {
mod project.mod_id
}
}

// This allows you to modify your launch configurations,
// for example to add custom arguments. In this case, we want
// the data generator to check our resources directory for
// existing files. (see Forge's ExistingFileHelper for more info)
launches {
data {
arg "--existing", file("src/main/resources").absolutePath
}
}
}

Expand Down Expand Up @@ -139,13 +121,7 @@ jar {
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.world.item.Items;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.ExplosionEvent;
import @FORGE_EXPLOSION_EVENT_PACKAGE@.ExplosionEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
Expand Down Expand Up @@ -41,7 +41,7 @@ public ExampleMod() {

private void commonSetup(final FMLCommonSetupEvent event) {
LOGGER.info("Hello from common setup! This is *after* registries are done, so we can do this:");
LOGGER.info("Look, I found a {}!", Items.DIAMOND.getRegistryName());
LOGGER.info("Look, I found a {}!", Items.DIAMOND);
}

private void clientSetup(final FMLClientSetupEvent event) {
Expand All @@ -50,6 +50,6 @@ private void clientSetup(final FMLClientSetupEvent event) {

@SubscribeEvent
public void kaboom(ExplosionEvent.Detonate event) {
LOGGER.info("Kaboom! Something just blew up in {}!", event.getWorld());
LOGGER.info("Kaboom! Something just blew up in {}!", event.@FORGE_EXPLOSION_EVENT_GET_LEVEL@());
}
}

0 comments on commit 355dfe3

Please sign in to comment.