1925 Commits

Author SHA1 Message Date
shedaniel
119898df76 Migrate to Fabric TR 2023-12-26 18:57:21 +08:00
shedaniel
cea4b39f22 Fix merge conflicts 2023-12-26 18:45:04 +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
modmuss50
6452509ec5 Optimise IncludedJarFactory & ZipReprocessorUtil
No longer processes the jar multiple times, caches the jar in place.

ZipReprocessorUtil now directly writes the file to disk, instead of first copying it to memory.
2023-12-20 16:58:51 +00:00
modmuss
85101bca01 Fix Intelij download sources hook. (#1006)
* Fix Intelij download sources hook.

* Cleanup and performance improvements
2023-12-20 16:49:42 +00:00
modmuss
ecc7e730e9 Read data generation modid from FMJ by default. And code cleanup. (#1008)
* Read data generation modid from FMJ by default. And code cleanup.

Closes #999

* Fix #1000
2023-12-20 15:52:13 +00:00
modmuss
51e1da7330 Update deps (#1007)
* Update deps

* Fix KotlinRemapperClassloaderTest
2023-12-20 10:14:26 +00:00
modmuss50
e980ee60ad Use a Property for appendProjectPathToConfigName 2023-12-19 16:49:27 +00:00
modmuss50
a6547244e9 Add loom.getMinecraftVersion()
Closes #982
2023-12-19 16:31:35 +00:00
Matt Sturgeon
bbf7f96b41 Allow disabling RunConfig appending project path (#1005)
* Fix data gen folder not being added to resources.

Closes https://github.com/FabricMC/fabricmc.net/issues/69

* Allow disabling RunConfig appending project path

Add a `appendConfigNameWithPath` property to `RunConfigSettings` controlling whether to append the path for non-root projects.

Default behaviour is unchanged.

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2023-12-19 16:25:19 +00:00
Jason Penilla
6f38d5f2e8 Change how include disables transitive dependencies to allow platform dependencies to work (#838)
* Change how `include` disables transitive dependencies to allow platform dependencies to work

* style fix

* Cleanup and add test

* spotlessApply

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2023-12-19 13:46:35 +00:00
Jamalam
f2e8ff2cef Check refmaps exist before adding them to mixin configs (#971) 2023-12-15 09:50:25 +00:00
modmuss
014a6fce2b Remapper extensions (#984)
* Remapper extension API

* Fix build

* More work

* Fixes, thanks Gradle.

* Build fix

* Cleanup
2023-12-15 09:47:26 +00:00
Juuz
0e9663b7a4 Add missing Minecraft version check for mappings, fix typos (#1002)
* Fix data gen folder not being added to resources.

Closes https://github.com/FabricMC/fabricmc.net/issues/69

* Add missing Minecraft version check for mappings, fix typos

Fixes #1001.

* Add test for TinyJarInfo

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2023-12-15 09:46:53 +00:00
modmuss50
cf8cbb245b Fix data gen folder not being added to resources.
Closes https://github.com/FabricMC/fabricmc.net/issues/69
2023-12-09 22:28:50 +00:00
J.T. McQuigg
3df66d612a Update Github Actions (#997) 2023-12-09 22:14:33 +00:00
dicedpixels
7dfe800768 Filter out realms connection error message from debug log (#991)
* feat: filter out realms connection error message from debug log

* fix: multiple regex filters
2023-12-09 14:03:02 +00:00
J.T. McQuigg
53112fb0b5 Replace Deprecated .getBuildDir with .getLayout().getBuildDirectory() and make Lazy (#978)
* replace Deprecated .getBuildDir with .getLayout().getBuildDirectory().getAsFile().get()

Signed-off-by: Joseph T. McQuigg <J.T.McQuigg12@gmail.com>

* Make lazy

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

* MORE

Signed-off-by: Joseph T. McQuigg <J.T.McQuigg12@gmail.com>

* remove file import

Signed-off-by: Joseph T. McQuigg <J.T.McQuigg12@gmail.com>

---------

Signed-off-by: Joseph T. McQuigg <J.T.McQuigg12@gmail.com>
Co-authored-by: modmuss <modmuss50@gmail.com>
2023-12-08 09:00:34 +00:00
Jason Penilla
229b3b3800 Don't resolve source artifacts in CI (#994) 2023-12-04 11:52:11 +00:00
modmuss
b987b4e711 Always use unix line endings on windows (#986)
* Always use unix line endings on windows

* Also run checks on windows.

* Fix binary files :)
2023-11-23 22:36:57 +00:00
shedaniel
de3c2056da Fix merge conflicts 2023-11-22 15:08:15 +08:00
shedaniel
00254ea567 Don't remap Forge with classpath (?) 2023-11-22 15:02:33 +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
modmuss
846d16ce2d Update deps (#983) 2023-11-19 16:59:35 +00:00
shedaniel
4e805d2b9b Fix compile errors 2023-11-18 00:38:54 +08:00
shedaniel
ea1d58e106 Merge remote-tracking branch 'FabricMC/exp/1.5' into exp/1.5
# Conflicts:
#	build.gradle
#	gradle/libs.versions.toml
#	src/main/java/net/fabricmc/loom/configuration/ide/RunConfigSettings.java
#	src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
#	src/main/java/net/fabricmc/loom/configuration/providers/mappings/MappingConfiguration.java
#	src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy
2023-11-18 00:33:59 +08:00
Juuz
63b47619ec test-push: Remove test reporting 2023-11-17 18:26:44 +02:00
Juuz
229f073492 Improve log message for experimental platforms 2023-11-17 16:24:29 +02:00
Juuz
7c08c02796 ModPlatform: Introduce display name 2023-11-17 16:24:16 +02:00
Juuz
ad7eee6fa5 ModProcessor: Clean up with MappingOption.forNamespaces 2023-11-17 16:19:52 +02: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
e3b51e9e97 Fix Field Migration (#168)
* Fix #162

* Refactor some field migrator code
2023-11-13 14:52:02 +08:00
shedaniel
683a866284 Fix dependencies not being remapped with srg 2023-11-12 22:02:42 +08:00
modmuss50
7c3bec39cb Create remap configurations for automatic data generation configuration.
Closes #972
2023-11-09 22:33:17 +00:00
modmuss50
09a4ffb803 Disable run config tasks when removed from loom.runs
It's not possible to remove a gradle task once registered.
2023-11-09 22:26:38 +00:00
modmuss
afe3d8ad89 Fix tests on newer Gradle versions (#979)
* Test against Gradle 8.5-rc1

* Test fixes for 8.5/8.6

* Spotless
2023-11-09 13:39:17 +00:00
modmuss
83ab524639 Update MIO to 0.5.0 (#974)
* Update MIO to 0.5.0

* Beta 3 + fix
2023-11-06 19:16:44 +00:00
modmuss
ee0e5df98c Fix server only jars. (#968)
* Actally fix server only jars.

* Cleanup the single jar names
2023-11-06 10:40:49 +00:00
Juuz
731f0728da Support mixins without refmaps in mod dependencies (#976)
* Support mixins without refmaps in mod dependencies

* Fix review concerns

* Add test for MixinDetector

* Change warning to a RuntimeException

* FabricAPITest: Test building without mixin AP

* Deal with Eclipse being stuck in the 2010s and not supporting basic Groovy syntax

* Auto-fix Groovy code format

* Fix FabricAPITest not running

* Fix code style
2023-11-06 10:40:24 +00:00
modmuss
fd34697015 Raspberry Pi support (#973)
* Raspberry Pi support

* Reduce log level
2023-11-02 21:51:57 +00:00
modmuss50
a60928ab28 Start on 1.5 2023-11-02 19:21:52 +00:00
Juuz
b82a5bcc04 Move NeoForge integration test to a neoforge subpackage 2023-10-31 18:24:13 +02:00
Juuz
8403d42403 Use version catalog for Forge support dependencies 2023-10-31 00:29:25 +02:00
Juuz
95dfd29ac9 Remove unused lorenz-asm dependency 2023-10-31 00:20:51 +02:00
shedaniel
31147018be Publish 1.4 beta builds 2023-10-24 11:23:40 +08:00
shedaniel
48c39617c5 Support newer versions of MinecraftForge 1.20.2. (#164)
* Support newer versions of MinecraftForge 1.20.2.

* Add directly to settings.getEnvironmentVariables()
2023-10-24 11:22:38 +08:00
shedaniel
c8599e7f66 Merge remote-tracking branch 'upstream/dev/1.4' into dev/1.4 2023-10-24 11:19:58 +08:00