Commit Graph

1125 Commits

Author SHA1 Message Date
modmuss50
9c2b1e8d6d Fix access widener file hashcode calculation breaking caching.
When using transitive access wideners the mc jar would always be re-processed.
2021-11-17 15:30:23 +00:00
modmuss50
dd7882598e Add getBaseMappedJar to make it easier to get the pre-transformed game jar. 2021-11-15 13:42:07 +00:00
shedaniel
08aae05000 Revert "Fix unobfuscated names not having params or docs. (#532)"
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-11-14 20:41:14 +08:00
shedaniel
b7946e4ad5 Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/configuration/providers/mappings/MappingsProviderImpl.java
#	src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy
2021-11-13 00:40:44 +08:00
modmuss50
35afda4398 Fix namedElements not extending from api (#533)
* Fix `namedElements` not extending from api
Fix artifact not waiting for remapAllJars with shared caches

* Use apiElements

* Add a better test for this.

* Also add remapped api mods to namedElements
2021-11-12 10:46:23 +00:00
modmuss50
2994c2d488 Fix for 1.18-pre1 server bundler.
In the bundler its called 1.18 Pre-release 1 not 1.18-pre1, so we just assume there is only ever going to be 1 version per jar.
2021-11-11 18:28:15 +00:00
modmuss50
e2b4bc8985 Reduce log level of "Using project based jar storage".
This will be used on a lot more projects now as transitive access wideners becomes more widely used.
2021-11-10 17:42:41 +00:00
modmuss50
ba4b9289e2 Ensure that the encoding is set to UTF-8 2021-11-10 14:23:32 +00:00
modmuss50
b2228e3175 Fix unobfuscated names not having params or docs. (#532) 2021-11-09 22:07:43 +00:00
shedaniel
c412c11354 Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
#	src/main/java/net/fabricmc/loom/extension/MinecraftGradleExtension.java
2021-11-06 17:19:57 +08:00
modmuss50
cb5c009e1a Fix missing blank line between javadoc and params 2021-11-01 18:30:42 +00:00
Cat Core
a91b75c05c Allow to set custom intermediary url again (#528)
* allow to set custom intermediary url again

* apply suggestions

* add some javadoc
2021-11-01 15:47:28 +00:00
modmuss50
5f379e4f42 Make CFR the default decompiler (#527)
* Make CFR the default decompiler
Expose decompiler options

* Remove convention, default value is an empty map.

* Checkstyle..
2021-11-01 13:43:03 +00:00
shedaniel
a48989057d Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0 2021-10-30 18:54:16 +08:00
Juuxel
587db4abae Add localRuntime and modLocalRuntime configurations (#526)
Closes #481.

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2021-10-29 22:26:59 +01:00
modmuss50
e409f13b8c Add dev config with default jar task on it, to aid with depending on … (#525)
* Add dev config with default jar task on it, to aid with depending on sub projects.

* Rename to `namedElements`

* Update src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
2021-10-29 13:29:29 +01:00
modmuss50
177264420e Fix misleading error message when decompiling fails. 2021-10-28 18:15:59 +01:00
shedaniel
e5478c1a76 Fix Gradle 8 deprecation
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-28 14:14:11 +08:00
shedaniel
70d4a1d691 Forgot to commit fix merge conflicts
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-27 12:04:17 +08:00
shedaniel
b23636065e Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
# Conflicts:
#	build.gradle
#	src/main/java/net/fabricmc/loom/configuration/ide/RunConfig.java
#	src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
#	src/main/java/net/fabricmc/loom/configuration/providers/mappings/MappingsProviderImpl.java
#	src/main/java/net/fabricmc/loom/task/RemapJarTask.java
#	src/main/java/net/fabricmc/loom/util/FileSystemUtil.java
#	src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java
2021-10-26 21:16:40 +08:00
shedaniel
5c190cc3ef Use NIO instead of ZipUtil (#513)
* Use nio for zip utils

* Make tests work

* Please work

* Fix some issues with tests

* Fix more issues with tests

* NIOZipUtils -> ZipUtils

* Resolve Juuxel's reviews

* Use our own FS utils

* Improve error handling, add loom Pair

* Add Unit tests + fixes

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2021-10-26 13:08:17 +01:00
modmuss50
b7142ae468 Ensure path exists when loading transitive access wideners. 2021-10-25 18:13:28 +01:00
modmuss50
13f4b29d12 Alter TransitiveAccessWidenerJarProcessor to use the same logic used in ModCompileRemapper for resolving mod jars. 2021-10-25 16:34:06 +01:00
modmuss50
61b5cfa733 Improve run config argument handling, should work with spaces a bit better. (#524) 2021-10-24 14:11:01 +01:00
modmuss50
7359dc4e98 Enable META-INF fixer when remapping mods. 2021-10-24 13:05:42 +01:00
modmuss50
a10307464e Add AccessWidenerValidator (#518)
* Add AccessWidenerValidator

* Move to task

* Review feedback
2021-10-23 15:04:22 +01:00
modmuss50
0248bacc16 Forward stdin in AbstractRunTask. Fixes begin unable to run server commands. 2021-10-20 23:12:49 +01:00
modmuss50
2b9907e0f0 Fix mappings not begin on test runtime classpath. 2021-10-16 22:20:27 +01:00
modmuss50
0864e0a671 Ensure decompiler worker deamons are stopped after failure. 2021-10-15 22:30:27 +01:00
modmuss50
d834895ff2 Fix null related issues in CFRObfuscationMapping 2021-10-14 18:14:23 +01:00
modmuss50
c380b36739 Update tiny-remapper and enable "inferNameFromSameLvIndex" to fix issues with decompiling some locals. 2021-10-14 17:04:40 +01:00
shedaniel
f1257e5980 Fix -dev-dev in maven publications
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-13 21:45:26 +08:00
shedaniel
7d05d26eeb Fix #57
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-13 15:15:30 +08:00
shedaniel
72295a8196 Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
Signed-off-by: shedaniel <daniel@shedaniel.me>

# Conflicts:
#	.github/workflows/test.yml
#	src/main/java/net/fabricmc/loom/configuration/RemapConfiguration.java
#	src/main/java/net/fabricmc/loom/configuration/ide/RunConfig.java
#	src/main/java/net/fabricmc/loom/configuration/providers/MinecraftProviderImpl.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/assets/MinecraftAssetsProvider.java
#	src/main/java/net/fabricmc/loom/decompilers/fernflower/AbstractFernFlowerDecompiler.java
#	src/main/java/net/fabricmc/loom/decompilers/fernflower/ForkingJavaExec.java
#	src/main/java/net/fabricmc/loom/task/GenVsCodeProjectTask.java
#	src/main/java/net/fabricmc/loom/task/GenerateSourcesTask.java
#	src/main/java/net/fabricmc/loom/util/SourceRemapper.java
#	src/test/resources/projects/parchment/build.gradle
2021-10-13 15:13:02 +08:00
modmuss50
d8675e056b Don't allow none reproducible dependencies in layered mappings as it breaks the caching guarantee. 2021-10-12 16:11:44 +01:00
modmuss50
6666b95b54 Fix mod* configurations not being on the test compile/runtime configuration. Closes #488 2021-10-12 13:31:12 +01:00
Juuxel
1c208f99b4 Fix regression in TinyJavadocProvider (#516)
This was param.getName using tiny-mappings-parser before #495. It was writing the method name as the parameter name, which doesn't seem too correct...
2021-10-11 21:31:59 +01:00
modmuss50
e2439b7f57 Rewrite GenSources including full support for CFR. (#511)
* Rewrite CFR decompiler interface. Support javadoc

* CFR line numbers and fixes.

* Cleanup and fix

* Use WorkerExecutor to fork, massively cleans up the fernflower code, but does remove the fancy multithreaded logging.

* Use IPC to get logging back from the decompilers.

* Cleanup UnpickJarTask, fix leak in IPCServer

* Used published CFR build

* Handle older windows versions that do not support AF_UNIX.

* Fixes and basic unit test

* Improve memory handling of genSources

* Stop decompile worker JVM
2021-10-11 13:47:16 +01:00
shedaniel
64f10eb47b Turn the tinyMappingsJar dependency into a module dependency
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-09 18:28:40 +08:00
NinjaPhenix
e55763aca2 Use conventions in RemapConfiguration to avoid need for afterEvaluate. (#514) 2021-10-04 21:37:48 +01:00
shedaniel
5582887ee7 Fix java.lang.IllegalArgumentException in ThreadingUtils
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-04 02:14:46 +08:00
modmuss50
ce0a3308ff Make Run Config run dir relative to the project and not the root project. Move eclipse launch config files out of the root project. Closes #509 2021-09-30 19:59:46 +01:00
modmuss50
782344ac59 Fix crash in JarProcessorManager when the input jar does not have a manifest. 2021-09-29 19:44:26 +01:00
modmuss50
da66abfaef Support 21w39a 2021-09-29 19:33:04 +01:00
shedaniel
d71745f318 Fix checkstyles
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-29 01:30:52 +08:00
shedaniel
4e510be1de Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/configuration/providers/mappings/LayeredMappingsDependency.java
2021-09-29 01:29:17 +08:00
shedaniel
b4fd2e10f5 Fix merge conflicts
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-29 01:28:29 +08:00
modmuss50
f33637aa3c Improve error handling around dep remapping. 2021-09-28 17:22:13 +01:00
modmuss50
80ad300b97 Fix failure when running dependencies task when using layered mappings.
A SelfResolvingDependency has to be a FileCollectionDependency or a ModuleDependency by the looks of it.
2021-09-28 16:34:43 +01:00
shedaniel
c6f51f1dd2 Add -Dloom.refresh=true option (#508)
* Add -Dloom.refresh=true option

* Use Boolean.getBoolean
2021-09-28 12:18:08 +01:00