Skip to content

Commit

Permalink
Fix Connector Mod not being deobfuscated in userdev
Browse files Browse the repository at this point in the history
  • Loading branch information
Su5eD committed Nov 17, 2023
1 parent fea90db commit 5abbc1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ repositories {
}
}
dependencies {
implementation fg.deobf("dev.su5ed.sinytra:Connector:<version>")
// Add Connector to the launch classpath
minecraftLibrary fg.deobf("dev.su5ed.sinytra:Connector:<version>")
// Add FFAPI dependency (if required)
runtimeOnly fg.deobf("dev.su5ed.sinytra.fabric-api:fabric-api:<version>")
// Install desired Fabric mods
implementation "some.fabric:mod:<version>"
}
```

Expand Down
8 changes: 6 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,14 @@ val fullJar: Jar by tasks.creating(Jar::class) {
into("adapter_data")
include("*.json")
}
from(modJar)
// Despite not being part of jarjar metadata, the mod jar must be located in this directory
// in order to be deobfuscated by FG in userdev environments
into("META-INF/jarjar/") {
from(modJar)
}
manifest {
from(tasks.jar.get().manifest)
attributes("Embedded-Dependencies-Mod" to modJar.archiveFile.get().asFile.name)
attributes("Embedded-Dependencies-Mod" to "META-INF/jarjar/" + modJar.archiveFile.get().asFile.name)
}
}

Expand Down

0 comments on commit 5abbc1d

Please sign in to comment.