Skip to content

Commit 8194ca0

Browse files
committed
[1.17.1-] Fix Guava version, drop Forge support
Guice 6.0.0 needs Guava 31, Minecraft 1.17.1 uses an older Guava version. Fabric can bundle the newer version of Guava and resolve the dependency correctly. Forge's JiJ system does not actually support 1.17.1, and Shadowing this Guava version will conflict with the base game and crash, forcing us to either downgrade the project to 5.1.0 and make porting a pain, or remain on 6.0.0+ and drop Forge for these versions.
1 parent db02e48 commit 8194ca0

File tree

8 files changed

+23
-126
lines changed

8 files changed

+23
-126
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ See [Getting Started](https://github.com/The-Fireplace-Minecraft-Mods/Annotated-
1717
## Current Target Game Versions
1818
New releases are not planned to occur outside of these version ranges. Existing versions outside these ranges may still function, but are no longer supported.
1919
- Fabric: Minecraft 1.14 - Current
20-
- Forge: Minecraft 1.15.2 - 1.20.6
20+
- Forge: Minecraft 1.18 - 1.20.6

changelog.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Added French translation
1+
[1.17.1-] Fixed crash when mods attempt to use the DI system.

fabric/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ dependencies {
1919
implementation 'com.google.code.findbugs:jsr305:3.0.2'
2020

2121
modApi("com.google.inject:guice:${project.guice_version}") {
22-
exclude(group: 'com.google.guava')
2322
}
2423
include "com.google.inject:guice:${project.guice_version}"
24+
include 'com.google.guava:guava:31.0.1-jre'
25+
include 'com.google.guava:failureaccess:1.0.3'
2526
include 'javax.inject:javax.inject:1'
2627
include 'jakarta.inject:jakarta.inject-api:2.0.1'
2728
include 'aopalliance:aopalliance:1.0'

forge/build.gradle

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ buildscript {
88
plugins {
99
id 'java'
1010
id 'java-library'
11+
//id 'com.gradleup.shadow' version '9.0.0-beta15'
12+
id 'com.github.johnrengelman.shadow' version '7.1.2'
1113
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
1214
// Mod Hosting Publish
1315
id 'com.matthewprenger.cursegradle' version '1.4.0'
@@ -25,23 +27,28 @@ dependencies {
2527
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
2628

2729
implementation 'com.google.code.findbugs:jsr305:3.0.2'
28-
api("com.google.inject:guice:${project.guice_version}") {
30+
api("com.google.inject:guice:5.1.0") {
2931
exclude(group: 'com.google.guava')
3032
}
31-
32-
jarJar("com.google.inject:guice:[${project.guice_version}]") {
33+
shadow("com.google.inject:guice:5.1.0") {
3334
exclude(group: 'com.google.guava')
3435
}
35-
jarJar 'javax.inject:javax.inject:[1]'
36-
jarJar 'jakarta.inject:jakarta.inject-api:[2.0.1]'
37-
jarJar 'aopalliance:aopalliance:[1.0]'
36+
shadow 'javax.inject:javax.inject:[1]'
37+
shadow 'aopalliance:aopalliance:[1.0]'
3838

3939
compileOnly project(":common")
4040
annotationProcessor project(':processor-forge')
4141
}
4242

43-
tasks.jarJar {
44-
archiveClassifier = ''
43+
shadowJar {
44+
archiveClassifier.set('')
45+
configurations = [project.configurations.shadow]
46+
47+
finalizedBy 'reobfShadowJar'
48+
}
49+
50+
reobf {
51+
shadowJar {}
4552
}
4653

4754
minecraft {
@@ -150,11 +157,12 @@ if (hasProperty('modrinthApiKey') || System.getenv("MODRINTH_API_KEY") != null)
150157
}
151158
}
152159

160+
jar.finalizedBy('reobfJar')
161+
153162
publishing {
154163
publications {
155164
mavenJava(MavenPublication) {
156165
from components.java
157-
jarJar.component(it)
158166
groupId project.maven_group
159167
artifactId project.archivesBaseName
160168
version project.version

gradle.properties

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ minecraft_version=1.16.5
77
# Fabric
88
fabric_loader_version=0.14.10
99
fabric_curseforge_url=https://www.curseforge.com/minecraft/mc-mods/annotated-di
10-
# Forge
11-
forge_version=36.2.35
12-
forge_curseforge_url=https://www.curseforge.com/minecraft/mc-mods/annotated-di-forge
13-
forge_update_json_url=https://api.modrinth.com/updates/annotated-di/forge_updates.json
1410
# Mod Properties
1511
maven_group=dev.the-fireplace
1612
archives_base_name=Annotated-DI
17-
mod_version=4.0.6
13+
mod_version=4.0.7
1814
release_type=release
1915
license_id=Apache-2.0
2016
license_name=Apache License 2.0

processor-forge/build.gradle

Lines changed: 0 additions & 93 deletions
This file was deleted.

processor-forge/src/main/java/dev/the_fireplace/annotateddi/processor/ForgeImplementationProcessor.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ pluginManagement {
1313
}
1414

1515
rootProject.name = 'AnnotatedDI'
16-
include('common', 'processor', 'fabric', 'forge', 'processor-fabric', 'processor-forge')
16+
include('common', 'processor', 'fabric', 'processor-fabric')

0 commit comments

Comments
 (0)