Skip to content

Commit

Permalink
Fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Sep 23, 2023
1 parent 649bbca commit f9f275d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 13 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ dependencies {
implementation libs.jackson
implementation libs.guava
implementation libs.bundles.asm
implementation libs.progressbar

// game handling utils
implementation (libs.fabric.stitch) {
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jackson = "2.15.2"
guava = "32.1.2-jre"

stitch = "0.6.2"
tiny-remapper = "0.8.9"
tiny-remapper = "1.9.22"
access-widener = "2.1.0"
mapping-io = "0.4.2"
lorenz-tiny = "4.0.2"
mercury = "0.4.0"
mercury = "0.1.2.15"
kotlinx-metadata = "0.7.0"

# Plugins
Expand All @@ -35,11 +35,11 @@ jackson = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref
guava = { module = "com.google.guava:guava", version.ref = "guava" }

fabric-stitch = { module = "net.fabricmc:stitch", version.ref = "stitch" }
fabric-tiny-remapper = { module = "net.fabricmc:tiny-remapper", version.ref = "tiny-remapper" }
fabric-tiny-remapper = { module = "dev.architectury:tiny-remapper", version.ref = "tiny-remapper" }
fabric-access-widener = { module = "net.fabricmc:access-widener", version.ref = "access-widener" }
fabric-mapping-io = { module = "net.fabricmc:mapping-io", version.ref = "mapping-io" }
fabric-lorenz-tiny = { module = "net.fabricmc:lorenz-tiny", version.ref = "lorenz-tiny" }
fabric-mercury = { module = "net.fabricmc:mercury", version.ref = "mercury" }
fabric-mercury = { module = "dev.architectury:mercury", version.ref = "mercury" }

# Misc
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
Expand Down
18 changes: 17 additions & 1 deletion gradle/runtime.libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ terminal-console-appender = "1.2.0"
jetbrains-annotations = "24.0.1"
native-support = "1.0.1"

# Forge Runtime depedencies
javax-annotations = "3.0.2"
forge-runtime = "1.1.8"
access-transformers = "3.0.1"
access-transformers-new = "8.0.5"
unprotect = "1.2.0"
asm = "9.3"

[libraries]
# Decompilers
fernflower = { module = "net.fabricmc:fabric-fernflower", version.ref = "fernflower" }
Expand All @@ -22,4 +30,12 @@ mixin-compile-extensions = { module = "net.fabricmc:fabric-mixin-compile-extensi
dev-launch-injector = { module = "net.fabricmc:dev-launch-injector", version.ref = "dev-launch-injector" }
terminal-console-appender = { module = "net.minecrell:terminalconsoleappender", version.ref = "terminal-console-appender" }
jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrains-annotations" }
native-support = { module = "net.fabricmc:fabric-loom-native-support", version.ref = "native-support" }
native-support = { module = "net.fabricmc:fabric-loom-native-support", version.ref = "native-support" }

# Forge Runtime depedencies
javax-annotations = { module = "com.google.code.findbugs:jsr305", version.ref = "javax-annotations" }
forge-runtime = { module = "dev.architectury:architectury-loom-runtime", version.ref = "forge-runtime" }
access-transformers = { module = "net.minecraftforge:accesstransformers", version.ref = "access-transformers" }
access-transformers-new = { module = "net.minecraftforge:accesstransformers", version.ref = "access-transformers-new" }
unprotect = { module = "io.github.juuxel:unprotect", version.ref = "unprotect" }
asm = { module = "org.ow2.asm:asm", version.ref = "asm" }
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ public void run() {
extendsFrom(JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME, Constants.Configurations.FORGE_EXTRA);

// Add Forge dev-time dependencies
getDependencies().add(Constants.Configurations.FORGE_EXTRA, Constants.Dependencies.FORGE_RUNTIME + Constants.Dependencies.Versions.FORGE_RUNTIME);
getDependencies().add(Constants.Configurations.FORGE_EXTRA, Constants.Dependencies.UNPROTECT + Constants.Dependencies.Versions.UNPROTECT);
getDependencies().add(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME, Constants.Dependencies.JAVAX_ANNOTATIONS + Constants.Dependencies.Versions.JAVAX_ANNOTATIONS);
getDependencies().add(Constants.Configurations.FORGE_EXTRA, LoomVersions.FORGE_RUNTIME.mavenNotation());
getDependencies().add(Constants.Configurations.FORGE_EXTRA, LoomVersions.UNPROTECT.mavenNotation());
getDependencies().add(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME, LoomVersions.JAVAX_ANNOTATIONS.mavenNotation());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import net.fabricmc.loom.util.DependencyDownloader;
import net.fabricmc.loom.util.ExceptionUtil;
import net.fabricmc.loom.util.ForgeToolExecutor;
import net.fabricmc.loom.util.LoomVersions;
import net.fabricmc.loom.util.fmj.FabricModJson;
import net.fabricmc.lorenztiny.TinyMappingsReader;

Expand Down Expand Up @@ -158,8 +159,8 @@ public String getName() {
public static void executeAt(Project project, Path input, Path output, AccessTransformerConfiguration configuration) throws IOException {
boolean serverBundleMetadataPresent = LoomGradleExtension.get(project).getMinecraftProvider().getServerBundleMetadata() != null;
FileCollection classpath = new DependencyDownloader(project)
.add(Constants.Dependencies.ACCESS_TRANSFORMERS + (serverBundleMetadataPresent ? Constants.Dependencies.Versions.ACCESS_TRANSFORMERS_NEW : Constants.Dependencies.Versions.ACCESS_TRANSFORMERS))
.add(Constants.Dependencies.ASM + Constants.Dependencies.Versions.ASM)
.add((serverBundleMetadataPresent ? LoomVersions.ACCESS_TRANSFORMERS_NEW : LoomVersions.ACCESS_TRANSFORMERS).mavenNotation())
.add(LoomVersions.ASM.mavenNotation())
.download();
List<String> args = new ArrayList<>();
args.add("--inJar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
import net.fabricmc.loom.api.mappings.layered.MappingsNamespace;
import net.fabricmc.loom.configuration.providers.mappings.TinyMappingsService;
import net.fabricmc.loom.task.GenerateSourcesTask;
import net.fabricmc.loom.util.Constants;
import net.fabricmc.loom.util.DeletingFileVisitor;
import net.fabricmc.loom.util.DependencyDownloader;
import net.fabricmc.loom.util.FileSystemUtil;
import net.fabricmc.loom.util.ForgeToolExecutor;
import net.fabricmc.loom.util.LoomVersions;
import net.fabricmc.loom.util.SourceRemapper;
import net.fabricmc.loom.util.ThreadingUtils;
import net.fabricmc.loom.util.TinyRemapperHelper;
Expand Down Expand Up @@ -210,7 +210,7 @@ private static void remapForgeSourcesInner(Project project, SharedServiceManager
}

Set<File> files = project.getConfigurations()
.detachedConfiguration(project.getDependencies().create(Constants.Dependencies.JETBRAINS_ANNOTATIONS + Constants.Dependencies.Versions.JETBRAINS_ANNOTATIONS))
.detachedConfiguration(project.getDependencies().create(LoomVersions.JETBRAINS_ANNOTATIONS.mavenNotation()))
.resolve();

for (File file : files) {
Expand Down

0 comments on commit f9f275d

Please sign in to comment.