Commit Graph

1237 Commits

Author SHA1 Message Date
Juuz
549fd9c930 Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java
#	src/main/java/net/fabricmc/loom/task/RemapTaskConfiguration.java
2022-07-07 11:04:31 +03:00
shedaniel
989bde901d Fix #91
Signed-off-by: shedaniel <daniel@shedaniel.me>
2022-07-03 18:34:22 +08:00
modmuss50
b25e5cd5a6 Only realise the gradle property being queried.
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2022-07-02 23:38:49 +01:00
modmuss50
97927f913a Replace getRemapArchives & getSetupRemappedVariants with a gradle property. (#678)
* Replace getRemapArchives & getSetupRemappedVariants with a gradle property as they are evaluated too early to be set.

* Use true for all projects.

* Cleanup, you can set properties for each subproject.

* Fix docs.
2022-07-01 18:13:56 +01:00
modmuss50
9b2b857b38 Update MC manifest url. 2022-06-21 19:05:09 +01:00
Jared
722a72f999 Add Jetbrains Annotations to test compile (#670) 2022-06-16 19:07:40 +01:00
Juuz
bf804e3596 Fix code format 2022-06-09 00:45:38 +03:00
Juuz
f4bef55fc8 Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0 2022-06-09 00:41:49 +03:00
modmuss50
84a70b3e5d Disable excluding client only libraries from the server run.
Mojang hot-fixed netty on the client only, causing loom to think its now a client only lib...

This needs improving to not care about the versions.
2022-06-08 19:26:17 +01:00
shedaniel
3d574e01f5 Fix alternative mappings on Forge 1.19
Signed-off-by: shedaniel <daniel@shedaniel.me>
2022-06-09 01:42:51 +08:00
shedaniel
6e785f9375 Merge remote-tracking branch 'FabricMC/dev/0.12' into dev/0.12.0
# Conflicts:
#	src/test/kotlin/net/fabricmc/loom/test/kotlin/KotlinClassMetadataRemappingAnnotationVisitorTest.kt
2022-06-04 16:51:14 +08:00
modmuss50
38bc74db30 Fix build 2022-05-30 19:09:28 +01:00
modmuss50
ddd1081c28 Fix failing tests 2022-05-30 17:20:13 +01:00
modmuss50
768d15d7d9 Fix #659 Crash on arm machines with using 1.19-pre1+ 2022-05-29 09:58:57 +01:00
Juuxel
547c8aa158 Deduplicate mod classes from ModSettings and ForgeLocalMods combined
Previously it was only done at the level of individual
ModSettings or ForgeLocalMods, which doesn't work if you
have both with the same name.
2022-05-27 15:24:23 +03:00
Juuxel
7801be3588 Downgrade Mercury Java version
See architectury/mercury#2
2022-05-27 14:11:59 +03:00
Juuxel
64a77ee3cd Support ModSettings on Forge for MOD_CLASSES (untested) 2022-05-27 14:01:59 +03:00
Juuxel
f8c2feeede Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0
# Conflicts:
#	build.gradle
2022-05-27 13:38:31 +03:00
modmuss50
a2e84e242a Fix #654 2022-05-26 11:32:53 +01:00
modmuss50
3066b58059 Fix retrieving kotlin plugin version for beta/rc builds. 2022-05-26 11:31:45 +01:00
modmuss50
07ded449ee Update mercury and set source compatibility version to 17 2022-05-26 11:21:53 +01:00
modmuss50
4f079f83aa Add dependency and configuration helpers to ModSettings. 2022-05-26 11:09:25 +01:00
Juuz
13b20feefd Update Unprotect to 1.2.0 to fix hot swap issues 2022-05-24 20:42:38 +03:00
Juuxel
70def8a31d Use MCPConfig data for processing Forge jar, support single-jar Forge (#87)
* Use MCPConfig data for merging and remapping Forge jar

* Make DependencyDownloader support multiple deps

* Support server-/client-only Minecraft with Forge

There's one slight caveat here: the server jar
contains some client-only classes that have been
patched. This also happens with the official
Forge installer in production, so it's
probably fine.

* Remove binpatcher dep

* Move McpConfigProvider to correct package

* Print tool name for functions in McpExecutor

* Fix Forge tools outputting verbose output at IDEA refresh

* Fix certain Forge deps being excluded from run configs

* Always produce the client extra jar

* Add step count to McpExecutor logging

* Allow missing args and jvmargs in MCP functions

This should fix using 1.14.4 and 1.16.5, which
don't have JVM args for everything.

* Make MCP function downloads follow redirects

* Refactor MCP step outputs, don't copy raw MC jars

* Remove MinecraftProviderBridge
2022-05-22 18:41:27 +03:00
Juuz
8ba98091a0 Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0 2022-05-21 11:49:29 +03:00
modmuss50
1956c03df2 Handle missing classpath entries when source remapping. 2022-05-21 01:05:10 +01:00
modmuss50
86d74b789a Fix client remap classpath. 2022-05-21 00:53:14 +01:00
Juuz
bf7880bfed Fix certain Forge deps being excluded from run configs 2022-05-20 16:46:13 +03:00
Juuz
69c6afbf8d Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/task/LoomTasks.java
#	src/main/java/net/fabricmc/loom/task/RemapJarTask.java
2022-05-20 15:54:29 +03:00
modmuss50
79668102c0 Fix crash when syncing idea when server only is enabled. Closes #652 2022-05-20 13:46:43 +01:00
modmuss50
40b3ebc80e Add property to control if a remap jar includes client only entries. 2022-05-20 11:22:05 +01:00
modmuss50
743e009068 Fix default client run config name when using split sourcesets. 2022-05-20 01:01:01 +01:00
modmuss50
e1dc1f0684 Ensure nightly gradle version exists before using it to run tests.
Will stop all tests failing when nightly version is removed.
2022-05-19 20:42:54 +01:00
modmuss50
1b6fa615c4 Preserve extraInt in kotlin metadata remapper
The `extraInt` (`xs`, [1]) parameter of Kotlin's Metadata annotation does not become
part of the KmClass/KmLambda and must be preserved explicitly to not be lost
during remapping.

It does carry important information though, so we must not neglect it.
In particular, bit 7 indicates that the class is used in the scope of an inline
function and is therefore implicitly part of the public API. If this flag is
missing from a class which requires it, then it becomes impossible to use that
inline function because the Kotlin compiler will crash hitting an assertion
while trying to inline the required code [2].

Based on the descriptions in [1], it looks like none of this data should be
affected by our remapping in any way, so it seems safe to simply copy over the
value from the original annotation. And that's what this commit does.

[1]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-metadata/extra-int.html
[2]: https://i.johni0702.de/sOpA8.png

Co-authored-by: Jonas Herzig <jonas@spark-squared.com>
2022-05-19 20:17:54 +01:00
Juuz
ffc7953f28 Fix ForgeSimpleMixinApTest on Windows
Thank you Windows for your beautiful
CRLF line endings please keep them FOREVER!!!
<3 <3 <3
2022-05-19 15:12:27 +03:00
Juuz
a8dc18ff98 Add test for Forge refmaps 2022-05-19 13:24:31 +03:00
Juuz
7f96f72502 Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0 2022-05-19 10:13:24 +03:00
modmuss50
c46100c76e Fix split env overriding custom run config sourcesets. 2022-05-19 01:24:58 +01:00
modmuss50
997f9a8acd Fix generation of invalid classpath groups when idea compiler output dir is not set. 2022-05-18 23:47:17 +01:00
modmuss50
5a8e048950 Delay removal of legacy publication data changes. 2022-05-18 23:00:12 +01:00
modmuss50
23dfe606bb Fix mod settings for sourcesets from other projects. (#642) 2022-05-18 22:56:35 +01:00
Juuz
7fdd9950df Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java
#	src/main/java/net/fabricmc/loom/task/RemapJarTask.java
#	src/main/java/net/fabricmc/loom/task/launch/GenerateDLIConfigTask.java
2022-05-18 22:53:34 +03:00
modmuss50
b8687c87ce Support 1.19-pre1, natives are now all loaded via the classpath. 2022-05-18 18:27:11 +01:00
Juuxel
bab1aa8216 Expose underlying messages in RemapJarTask and Minecraft setup (#650)
Closes #649. Closes #638.
2022-05-17 21:35:38 +01:00
Juuz
4d042cd4a5 Fix mixin refmap generation on Forge 2022-05-17 21:46:36 +03:00
Juuz
668c9dbeba Isolate mappings provider and TR service on Forge 2022-05-17 21:07:17 +03:00
Juuz
4369492b55 Make missing TR mapping namespace throw an exception instead of printing to stderr 2022-05-17 20:44:05 +03:00
Juuz
9c0b95860a Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0 2022-05-11 19:18:28 +03:00
modmuss50
9f341a9b47 Dont depend on other prepare tasks, only run after. (#637) 2022-05-10 23:22:01 +01:00
modmuss50
138685d141 Reduce log level when transitive access widener fails to find target method in mappings.
See: https://github.com/FabricMC/fabric-loom/issues/644
2022-05-10 19:37:00 +01:00