Skip to content

Commit

Permalink
Add implementation version
Browse files Browse the repository at this point in the history
  • Loading branch information
Su5eD committed Jul 5, 2023
1 parent e7be46e commit c4083c9
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@ jobs:
with:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew check build publishToMavenLocal --stacktrace --warning-mode=fail -Porg.gradle.parallel.threads=4
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-excludes: |
gradle.properties
- name: Setup gradle.properties
env:
GRADLE_PROPERTIES: ${{ vars.GRADLE_PROPERTIES }}
shell: bash
run: |
mkdir -p ~/.gradle/
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties
- name: Create placeholder assets dir
run: mkdir -p ${{ env.GRADLE_USER_HOME }}/caches/fabric-loom/assets
- run: ./gradlew check build publishToMavenLocal --stacktrace
- uses: Juuxel/publish-checkstyle-report@v1
if: ${{ failure() }}
with:
Expand Down Expand Up @@ -76,5 +91,20 @@ jobs:
with:
distribution: 'microsoft'
java-version: '17'
- run: ./gradlew generateResources --stacktrace --warning-mode=fail
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-excludes: |
gradle.properties
- name: Setup gradle.properties
env:
GRADLE_PROPERTIES: ${{ vars.GRADLE_PROPERTIES }}
shell: bash
run: |
mkdir -p ~/.gradle/
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties
- name: Create placeholder assets dir
run: mkdir -p ${{ env.GRADLE_USER_HOME }}/caches/fabric-loom/assets
- run: ./gradlew generateResources --stacktrace
- run: if [ -n "$(git status --porcelain)" ]; then exit 1; fi
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def ENV = System.getenv()
def signingEnabled = ENV.SIGNING_SERVER

def configuredVersion = project.version
version = project.version + "+" + (ENV.GITHUB_RUN_NUMBER ? "" : "local-") + getBranch()
version = project.version + '+' + project.forgified_version + "+" + (ENV.GITHUB_RUN_NUMBER ? "" : "local-") + getBranch()
logger.lifecycle("Building Fabric: " + version)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function initializeCoreMod() {
list.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "net/fabricmc/fabric/api/event/Event", "invoker", "()Ljava/lang/Object;"));
list.add(new TypeInsnNode(Opcodes.CHECKCAST, "net/fabricmc/fabric/api/client/rendering/v1/TooltipComponentCallback"));
list.add(new VarInsnNode(Opcodes.ALOAD, 0));
list.add(new MethodInsnNode(Opcodes.INVOKEINTERFACE, "net/fabricmc/fabric/api/client/rendering/v1/TooltipComponentCallback", "getComponent", "(Lnet/minecraft/client/item/TooltipData;)Lnet/minecraft/client/gui/tooltip/TooltipComponent;"));
list.add(new MethodInsnNode(Opcodes.INVOKEINTERFACE, "net/fabricmc/fabric/api/client/rendering/v1/TooltipComponentCallback", "getComponent", yarn ? "(Lnet/minecraft/client/item/TooltipData;)Lnet/minecraft/client/gui/tooltip/TooltipComponent;" : "(Lnet/minecraft/world/inventory/tooltip/TooltipComponent;)Lnet/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent;"));
list.add(new InsnNode(Opcodes.DUP));
list.add(new JumpInsnNode(Opcodes.IFNULL, end));
list.add(new InsnNode(Opcodes.ARETURN));
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ loom.platform=forge
forge_version=1.19.4-45.1.2
server_data_pack_format=12
pack_format=13
forgified_version=1.1.0
1 change: 1 addition & 0 deletions gradle/ffapi-setup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ remapJar {
.map { it.left().collect { it.resolve() } }
}
remapTestmodJar {
mustRunAfter remapJar
forgeNestedJars.addAll includedJarFactory.getForgeNestedJars(configurations.includedTestModRemappedJars)
.map { it.left().collect { it.resolve() } }
addNestedDependencies = true
Expand Down

0 comments on commit c4083c9

Please sign in to comment.