Commit Graph

117 Commits

Author SHA1 Message Date
Juuz
c61a6a2956 RemapJarTask: Delete output if it exists to prevent ghost files
Fixes FabricMC#1270. This changed isn't necessary for
RemapSourcesJarTask as SourceRemapperService already deletes
the output.
2025-03-04 20:42:47 +02:00
Juuz
ea3d34b6c5 RemapJarTask: Support config cache for Aw2At 2024-12-07 00:08:13 +02:00
Juuz
39f351ce8f RemapJarTask: Make modPlatform property match other tasks 2024-12-06 20:25:22 +02:00
Juuz
b1ffa06e30 Support config caching in all vanilla Loom tasks 2024-12-06 20:24:16 +02:00
Juuz
ba287b469f RemapJarTask: Support config caching 2024-12-06 20:19:44 +02:00
Juuz
a75a1f0ddb Fix checkstyle errors 2024-12-06 19:46:44 +02:00
Juuz
a68e671678 Merge 1.8, part 4 2024-12-06 19:21:07 +02:00
shedaniel
c839826f09 Merge commit '9157c22448cb4847586772f8028010f717accc14' into dev/1.8 2024-11-16 20:23:13 +08:00
shedaniel
24e5aeb201 Merge commit '3c3225900123390868a718f5553d552bd0385000' into dev/1.8 2024-11-16 19:27:08 +08:00
modmuss
f3a9a49c6f Enable configuration cache for most tests by default (#1162)
* Enable configuration cache for all tests by default

* Support config cache in test projects

* Some config cache test fixes

* Config caching for run game tasks

* Problems for later

* More problems for later

* Bump min idea version, and remove version check.

* Untested client entries service

* Fixes
2024-08-30 14:39:48 +01:00
modmuss
9157c22448 Inital remap jar configuration cache support (#1161)
* Move everything to the new service system

* Checkstyle

* Fix unit tests + make them use the internet less

* Some more fixes

* Split the mixin ap mapping handling out into its own service.

* Checkstyle

* Fixes

* Move mixin refmap handling to a service

* Minor changes
2024-08-20 12:51:47 +01:00
modmuss
b533dacba8 Remove multi project optimisation (#1159)
* Remove multi project optimisation

* Fix build

* Fix FAPI test
2024-08-14 10:59:18 +01:00
Juuz
db95e8af23 Fix Forge jij 2024-07-01 19:51:33 +03:00
Juuz
4ae4134b70 Merge 1.7, part 2 2024-07-01 19:28:43 +03:00
Luke Bemish
63ebc35e1d Improve how include configuration works (#1080)
* Initial work on better include configuration

* Remove unused members

* Substantially simplify

* Only process configuration once

* Hopefully fix tests

* Make platform dependencies work again

* Fix edge case where include or super configuration has withDependencies action

* Fix including subproject/composite jars and add test

* Remove needless following of external result

* Change priority for module location discovery

* Fix failing test

* Apply suggestions from code review

Co-authored-by: modmuss <modmuss50@gmail.com>

---------

Co-authored-by: modmuss <modmuss50@gmail.com>
2024-05-04 18:16:32 +01:00
shedaniel
479331d9cd Merge remote-tracking branch 'FabricMC/exp/1.6' into exp/1.6
# Conflicts:
#	gradle/libs.versions.toml
#	src/main/java/net/fabricmc/loom/LoomGradleExtension.java
#	src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
#	src/main/java/net/fabricmc/loom/build/nesting/IncludedJarFactory.java
#	src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/MergedMinecraftProvider.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/MinecraftJarConfiguration.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/MinecraftProvider.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/SingleJarMinecraftProvider.java
#	src/main/java/net/fabricmc/loom/extension/LoomFiles.java
#	src/main/java/net/fabricmc/loom/extension/LoomFilesBaseImpl.java
#	src/main/java/net/fabricmc/loom/extension/LoomGradleExtensionApiImpl.java
#	src/main/java/net/fabricmc/loom/extension/LoomGradleExtensionImpl.java
#	src/main/java/net/fabricmc/loom/task/GenerateSourcesTask.java
#	src/main/java/net/fabricmc/loom/task/RemapJarTask.java
#	src/main/java/net/fabricmc/loom/util/fmj/FabricModJsonFactory.java
2024-03-23 01:06:56 +09:00
modmuss
dbebbdb944 Add RemapJarTask.getOptimizeFabricModJson() (#1068)
* Optimise fabric.mod.json files

* Fixes

* Make opt-in

* Revert

* Fix
2024-03-12 19:11:26 +00:00
shedaniel
c5a1a2d6b2 Merge remote-tracking branch 'FabricMC/dev/1.5' into dev/1.5
# Conflicts:
#	src/main/java/net/fabricmc/loom/configuration/mods/ModConfigurationRemapper.java
#	src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
#	src/main/java/net/fabricmc/loom/task/RemapJarTask.java
#	src/main/java/net/fabricmc/loom/task/service/TinyRemapperService.java
#	src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy
2024-01-10 22:27:36 +09:00
modmuss
480dd5e393 Some minor peformance improvements (#1019) 2024-01-06 17:17:26 +00:00
modmuss
872d12ace0 Update tiny-remapper, misc perf improvements, test fixes. (#1009)
* Only mixin remap/analyse classpath jars that use static mixin remappings.

* More of a mess

* Less of a mess?

* Nope?

* Exclude the none root MC jars from the remap classpath when using MPO

* Improve test a little

* Update TR

* Checkstyle

* Fix DLN test

* Fix possible crash when closing build services
2024-01-04 00:39:36 +00:00
shedaniel
119898df76 Migrate to Fabric TR 2023-12-26 18:57:21 +08:00
shedaniel
beb04d30f2 Merge remote-tracking branch 'FabricMC/exp/1.5' into exp/1.5
# Conflicts:
#	.github/workflows/publish.yml
#	gradle/libs.versions.toml
#	src/main/java/net/fabricmc/loom/LoomGradleExtension.java
#	src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
#	src/main/java/net/fabricmc/loom/build/nesting/IncludedJarFactory.java
#	src/main/java/net/fabricmc/loom/configuration/decompile/SingleJarDecompileConfiguration.java
#	src/main/java/net/fabricmc/loom/configuration/providers/mappings/tiny/TinyJarInfo.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/mapped/AbstractMappedMinecraftProvider.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/mapped/ProcessedNamedMinecraftProvider.java
#	src/main/java/net/fabricmc/loom/extension/LoomGradleExtensionApiImpl.java
#	src/main/java/net/fabricmc/loom/task/RemapTaskConfiguration.java
#	src/test/groovy/net/fabricmc/loom/test/unit/kotlin/KotlinRemapperClassloaderTest.groovy
2023-12-26 18:39:12 +08:00
Jamalam
f2e8ff2cef Check refmaps exist before adding them to mixin configs (#971) 2023-12-15 09:50:25 +00:00
shedaniel
de3c2056da Fix merge conflicts 2023-11-22 15:08:15 +08:00
shedaniel
e3c5226da7 Merge remote-tracking branch 'FabricMC/exp/1.5' into exp/1.5
# Conflicts:
#	gradle/libs.versions.toml
#	src/main/java/net/fabricmc/loom/configuration/mods/ArtifactMetadata.java
#	src/main/java/net/fabricmc/loom/configuration/mods/ModConfigurationRemapper.java
#	src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
#	src/main/java/net/fabricmc/loom/task/RemapJarTask.java
#	src/main/java/net/fabricmc/loom/util/Constants.java
#	src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy
2023-11-22 14:56:39 +08:00
modmuss
92da5adb48 Remove Minecraft libraries from the remap classpath. (#987) 2023-11-20 19:15:30 +00:00
modmuss
99380d98e5 Add Fabric-Loom-Mixin-Remap-Type manifest entry (#980) 2023-11-20 15:19:48 +00:00
Jason Penilla
f63a4f4d25 Skip remapping in AbstractRemapJarTasks when source and target namespaces match (#985)
* Skip remapping in `AbstractRemapJarTask`s when source and target namespaces match

The "remap jar" tasks have much more functionality than simply remapping jars at this point, such as adding namespace metadata, nesting jars, ensuring reproducible builds, etc. Some custom build logic may want to take advantage of these features without the full overhead of no-op remapping with TinyRemapper/Mercury.

* Add test
2023-11-20 10:35:46 +00:00
Juuz
a11b828380 NeoForge support (#166)
* Initial plumbing for NeoForge support

* Fix checkstyle

* Add ModPlatform.id

* Use NeoForge-specific cache

* Use NeoForge-specific dependency configuration

This is only for the "(neo)forge" configuration exposed
as API. The other configurations remain the same.

* Add test for basic NeoForge 1.20.2 projects

* Implement hacky fast track for NeoForge field migration

In other works, we skip field migrating for now.

* Disable patched decompilation task on Neo

* Disable mixin AP for building on NeoForge

* Many changes related to NeoForge mappings and remapping

* Code style and related fixes

* McpExecutor: Add support for downloading deps via Gradle

Also adds support for downloading a file without a repo
for NeoForm functions.

* Fix wrong configurations being used on NeoForge

* Fix mixin version detection on NeoForge

* Rename MinecraftPatchedProvider jar paths on NeoForge

* Test NeoForge against a client-only MC jar

* Add DFU for codecs, support NeoForge run config templates

* Centralise userdev config reading, support missing SAS

* Set up Shadow for bundling DFU

* Use correct name for NeoForm in cache files

* RemapJarTask: Fix check using isForgeLike for Forge

* MojangMappingsMerger: Complete and reorder mappings

* Fix SRG being used on NeoForge

* Fix SRG being used on NeoForge for ATs

* Use client pipeline for merged to avoid patch issues on Neo

* Update to architectury-loom-runtime 2.0

* Fix Minecraft jar name on Neo

* Fix MojangMappingsMerger having incomplete names

* Fix NeoForge mod dependency remapping using wrong mappings

* Quiet down MojangMappingsMerger

* Fix (Neo)Forge builtin coremods not being remapped

Fixes #146.

* Disable deprecated data generation API on NeoForge

* Use release version of the forge runtime

* Revert "Set up Shadow for bundling DFU"

This reverts commit 2bb8166744.

* Make NeoForge Field Migration work

* NeoForge shouldn't try to get datagen mods

* Fix checkstyle

* Remove mojang maven

* Split Forge and NeoForge extensions

* SimpleNeoForgeTest: Bump Neo version and fix Yarn version

* Remove resolved TODOs

* Re-enable joined NeoForm pipeline

* MPP: Rename srg -> intermediate jars

* Reintroduce namespace filtering for mapping trees

Should be a simple optimisation to avoid reading an
additional ns.

* ForgeRunTemplateTest: Fix code format

* Adapt SrgMerger into ForgeMappingsMerger (#169)

* Fix crash with NeoForge ext creation

* Adapt SrgMerger into ForgeMappingsMerger

* Update tiny-remapper

* Fix spotless

* Resolve reviews

* Fix checkstyle

* Remap ASMAPI.redirectFieldToMethod (#171)

* Remap ASMAPI.redirectFieldToMethod

* Move lastClassName outside the if

* Fix missing template variables in tests using forge/simple

* Add Java version to forge/simple test variables

* Disable naming service dependency on Neo

* Fix changing patch version not affecting mapped game jars

Fixes #167.

* Rename configuration: neoforge -> neoForge

---------

Co-authored-by: shedaniel <daniel@shedaniel.me>
2023-11-17 16:04:22 +02:00
shedaniel
649bbcaf55 Merge remote-tracking branch 'upstream/exp/1.4' into exp/1.4
# Conflicts:
#	.gitignore
#	build.gradle
#	settings.gradle
#	src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
#	src/main/java/net/fabricmc/loom/configuration/LoomConfigurations.java
#	src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
#	src/main/java/net/fabricmc/loom/extension/LoomGradleExtensionApiImpl.java
#	src/main/java/net/fabricmc/loom/task/service/JarManifestService.java
#	src/main/java/net/fabricmc/loom/task/service/TinyRemapperService.java
#	src/main/java/net/fabricmc/loom/util/Constants.java
2023-09-23 16:11:29 +08:00
modmuss50
0b36121357 Add Fabric-Jar-Type to jar manifest.
Either 'classes' or 'sources', the idea is mod distribution platforms can check that sources jars are not uploaded accidentally.

Closes #939
2023-09-11 11:47:19 +01:00
Juuz
66edc601f5 RemapJarTask: Avoid reordering nested jars
Fixes #155.
2023-08-12 13:02:57 +03:00
Juuz
13cfbb9da5 Merge remote-tracking branch 'upstream/exp/1.3' into exp/1.3
# Conflicts:
#	build.gradle
#	src/main/java/net/fabricmc/loom/LoomGradleExtension.java
#	src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java
#	src/main/java/net/fabricmc/loom/configuration/decompile/SingleJarDecompileConfiguration.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/MinecraftJarConfiguration.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/MinecraftProvider.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/mapped/IntermediaryMinecraftProvider.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/mapped/NamedMinecraftProvider.java
#	src/main/java/net/fabricmc/loom/task/GenerateSourcesTask.java
2023-06-21 21:40:25 +03:00
modmuss
68c7eb21ba Enable reproducible builds by default (#899)
* Enable reproducible builds by default

* Review feedback
2023-06-13 18:31:25 +01:00
Juuz
cf4ccf847c RemapJarTask: Fix refmaps on Forge 2023-02-17 21:54:11 +02:00
Juuz
16e1eda2c6 Merge with Fabric 1.1, stage 7 2023-02-16 20:59:03 +02:00
Juuz
1d6d7b5489 Merge commit 'af21d602' into exp/1.1 2023-02-16 20:46:17 +02:00
Juuz
0314829e26 Merge with Fabric 1.1, stage 3 2023-02-16 01:02:58 +02:00
Juuz
81d1f5d562 Merge with Fabric 1.1, stage 1 2023-02-16 00:53:48 +02:00
modmuss50
63ecb88082 Gradle 8 tests, perf/memory optimisations (#796)
* Add gradle 8 tests
Reuse gradle home between tests
Misc perf and mem optimisations

* Fix build warning.

* Added multi mc version test

* Use server launcher in ServerRunner

Co-authored-by: Luna <62033805+Luna5ama@users.noreply.github.com>
2023-01-16 18:39:26 +00:00
Juuz
f2c0d7a35d Split Architectury extensions to Fabric classes into new classes (#116)
* Split custom RemapJarTask logic into a new class

* Split a lot of logic for Arch and Quilt mod metadata into new classes

* ArchitecturyCommonJson: Fix outdated error message

* Add minimal unit tests for ACJ and QMJ

* QuiltModJson: Fix error when there are no injected interfaces

* QuiltModJsonTest: Add test for mixin configs

* QuiltModJsonTest: Move to correct package

* Add tests for creating ACJ and QMJ instances
2023-01-07 01:51:32 +02:00
modmuss50
2c6d4d930f Add getClientOnlySourceSetName (#770) 2022-12-30 13:06:12 +00:00
modmuss50
f87320fae8 Add multi project optimisation option to allow opt into shared tiny remapper. (#747)
* Add multi project optimisation option to allow opting into shared tiny remapper.

* Review feedback and fixes
2022-11-01 21:36:41 +00:00
modmuss50
0036d81a3a Fixes to legacy jar processors. 2022-10-06 22:48:09 +01:00
modmuss50
cc43cfc1dc Major steps towards config caching support :) 2022-10-06 21:42:45 +01:00
modmuss50
514dd24e9e Initial support for fabric.mod.json V2 2022-10-01 08:59:39 +01:00
Juuz
48126bd5d6 Merge with Fabric 0.13, stage 1 2022-08-09 17:18:43 +03:00
shedaniel
b9905c322c Support JarJar (#93)
* Support JarJar

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Use @Input instead @Internal and remove random lines

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Resolve reviews

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Turn them into records

Signed-off-by: shedaniel <daniel@shedaniel.me>
2022-07-18 01:09:57 +08:00
modmuss50
317c6daedd Apply the same manifest attributes to the sources jar. Including a list of client only entries.
Will be used to split the sources into client/common jars in a later change.
2022-06-20 21:11:11 +01:00
modmuss50
651bcec276 Use TR's ref coutning FileSystemHandler (#639)
* Dont depend on other prepare tasks, only run after.

* Update for: https://github.com/FabricMC/tiny-remapper/pull/93

* Cleanup

* Bump deps
2022-06-16 19:22:13 +01:00