From b3d76232769ce13185d48ac667cafca470aa1f95 Mon Sep 17 00:00:00 2001 From: coolGi2007 Date: Sun, 26 Jun 2022 11:00:09 +0000 Subject: [PATCH] Added network stuff to standalone jar --- .gitlab-ci.yml | 38 +++++++++++++++++++++++++++++++++----- Readme.md | 6 ++++++ core | 2 +- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e01bc15c6..cb359f2df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,11 @@ # use Eclipse's JDK image: gradle:eclipse-temurin +# The ci should always use an unix/unix-like OS to work # all stages need to be defined here stages: + #Dont build the standalone yet cus it isnt done + # - build_standalone - build_19 - build_18_2 - build_18_1 @@ -20,6 +23,35 @@ before_script: - echo GE_JOB_ID=$CI_JOB_ID >> generate_jars.env +# The standalone build +build_standalone: + stage: build_standalone + script: + # make sure any previously merged jars are removed before running this job. + # note: if the merged folder doesn't exist "rm -R Merged" will throw an error, which can be ignored + # the "|| true" makes that step always succeed. + - ./gradlew core:build --gradle-user-home cache/; + + # Copy the file with the shortest name to the root DistantHorizons.jar so it can be sent off + - cp $(find core/build/libs/ | awk 'function base(f){sub(".*/", "", f); return f;} {print length(base($0)), $0}'| sort -n | head -2 | grep -P "[0-9][0-9] core/build/libs/*" | sed -r "s/([0-9][0-9] )//g") DistantHorizons.jar + # build using Java 16 + image: eclipse-temurin:16 + artifacts: + name: "NightlyBuild_standalone-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" + paths: + # Get the standalone jar + - DistantHorizons.jar + expire_in: 1 day + # even if one build fails, upload the successful jars + when: always + cache: + key: "gradleCache" + policy: pull-push + paths: + - .gradle + - cache/ + allow_failure: true + # 1.16.5 build build_16_5: @@ -29,7 +61,6 @@ build_16_5: # note: if the merged folder doesn't exist "rm -R Merged" will throw an error, which can be ignored # the "|| true" makes that step always succeed. - rm -R Merged || true; - - ./gradlew deleteMerged --gradle-user-home cache/; - ./gradlew build -PmcVer="1.16.5" --gradle-user-home cache/; - ./gradlew merge --gradle-user-home cache/; - ./gradlew test --gradle-user-home cache/; @@ -56,7 +87,6 @@ build_17_1: stage: build_17_1 script: - rm -R Merged || true; - - ./gradlew deleteMerged --gradle-user-home cache/; - ./gradlew build -PmcVer="1.17.1" --gradle-user-home cache/; - ./gradlew merge --gradle-user-home cache/; - ./gradlew test --gradle-user-home cache/; @@ -80,7 +110,6 @@ build_18_1: stage: build_18_1 script: - rm -R Merged || true; - - ./gradlew deleteMerged --gradle-user-home cache/; - ./gradlew build -PmcVer="1.18.1" --gradle-user-home cache/; - ./gradlew merge --gradle-user-home cache/; - ./gradlew test --gradle-user-home cache/; @@ -105,7 +134,6 @@ build_18_2: stage: build_18_2 script: - rm -R Merged || true; - - ./gradlew deleteMerged --gradle-user-home cache/; - ./gradlew build -PmcVer="1.18.2" --gradle-user-home cache/; - ./gradlew merge --gradle-user-home cache/; - ./gradlew test --gradle-user-home cache/; @@ -128,7 +156,7 @@ build_18_2: build_19: stage: build_19 script: - - ./gradlew deleteMerged --gradle-user-home cache/; + - rm -R Merged || true; - ./gradlew build -PmcVer="1.19" --gradle-user-home cache/; - ./gradlew merge --gradle-user-home cache/; - ./gradlew test --gradle-user-home cache/; diff --git a/Readme.md b/Readme.md index 2ae06c107..873602753 100644 --- a/Readme.md +++ b/Readme.md @@ -21,30 +21,35 @@ If you want to see a quick demo, check out a video covering the mod here: This branch supports the following versions of Minecraft: #### 1.19 (WIP) +Supported MC versions: [1.19]\ Forge version: 41.0.19\ Fabric version: 0.14.7\ Fabric API version: 0.55.3+1.19\ Modmenu version: 4.0.0 #### 1.18.2 +Supported MC versions: [1.18.2]\ Forge version: 40.0.18\ Fabric version: 0.13.3\ Fabric API version: 0.48.0+1.18.2\ Modmenu version: 3.1.0 #### 1.18.1 +Supported MC versions: [1.18.1, 1.18]\ Forge version: 39.1.2\ Fabric version: 0.13.3\ Fabric API version: 0.42.6+1.18\ Modmenu version: 3.0.1 #### 1.17.1 +Supported MC versions: [1.17.1, 1.17]\ Forge version: 37.1.1\ Fabric version: 0.13.2\ Fabric API version: 0.46.1+1.17\ Modmenu version: 2.0.14 #### 1.16.5 +Supported MC versions: [1.16.5, 1.16.4]\ Forge version: 36.2.28\ Fabric vetsion: 0.13.2\ Fabric API version: 0.42.0+1.16\ @@ -131,6 +136,7 @@ If your IDE fails to auto-detect the source jars when browsing Minecraft classes ## Useful commands Run the standalone jar: `./gradlew run`\ +Build the standalone jar: `./gradlew core:build`\ Only build Fabric: `./gradlew fabric:assemble` or `./gradlew fabric:build`\ Only build Forge: `./gradlew fabric:assemble` or `./gradlew forge:build`\ Run the Fabric client (for debugging): `./gradlew fabric:runClient`\ diff --git a/core b/core index a374d5890..239958384 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit a374d58907e5bada85dd63b7cd0eccebc9952f9d +Subproject commit 2399583841c5f06274903014b80a1538f6bd3791