Commit Graph

33 Commits

Author SHA1 Message Date
modmuss
4165168558 Resolve libraries for all platforms when generating verification metadata. (#1286)
* Resolve libraries for all platforms when generating verification metadata.

* Fix build
2025-04-07 21:01:45 +01:00
modmuss
1f28935221 Initial project isolation support (#1215)
* Enable project isolation

* Add test for COD

* Make spotless happy
2024-11-14 21:56:20 +00:00
Space Walker
e5b785ab41 Select jar configuration based on which sides are present (#1182)
* auto select jar configuration based on which sides are present

* move logic into jar configuration property convention
2024-09-30 14:37:25 +01:00
modmuss50
fa8a43b531 Remove configuration cache warning 2024-09-26 22:31:06 +01:00
modmuss
e4d4503e2a Update deps, suppress 8.11 warnings, remove self resolving dependency code (#1180)
* Update a handful of deps

* Fully remove deprecated SelfResolvingDependency support

* Work around Gradle 8.11 deprecation, lets deal with it later.
2024-09-26 22:29:43 +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
modmuss
9a3b82c8a3 Initial config caching work (#1053) 2024-04-15 18:56:59 +01:00
Space Walker
3670ccb959 Support merging pre 1.3 Minecraft versions. (#1026)
Co-authored-by: modmuss50 <modmuss50@gmail.com>
2024-03-19 17:25:57 +00:00
modmuss
8250b509a4 Prepare for SelfResolvingDependency's removal & Update to Gradle 8.6 (#1038)
* Prepare for SelfResolvingDependency's removal
Update to Gradle 8.6

* Update docker images

* ProjectDependency is also a SRD

* Throw if layered mappings are created too late.
2024-02-03 23:26:33 +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
modmuss
fe823ddb30 Add an internal API to allow 3rd party loom extensions to add library processors. (#906)
Stability of this API will not be guaranteed.
2023-06-15 20:14:52 +01:00
modmuss50
75a98a5038 Only force re-downloads when manually refreshing deps (#851) 2023-04-02 15:40:09 +01: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
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
06074ae73c Start on improved mappings service 2022-10-26 12:47:36 +01:00
modmuss50
ab4234330e First look at MinecraftJarProcessor API 2022-10-03 22:00:07 +01:00
modmuss50
e561cca19a Split mod dependencies into client/common as required. 2022-08-04 08:56:37 +01:00
modmuss50
3913c2e897 Add a lock file around building the loom cache. Regenerate if the lock file exists.
This helps to ensure that failed or canceled builds do not cause the cache to be left in an undetectable invalid state.
2022-07-30 19:21:56 +01:00
modmuss50
c4c6de23e3 Rewrite download utils (#681)
- eTag support (It seems Mojang's CDN and our meta/maven do not support this right now)
- Age based caching.
- Sha1 based caching.
- HTTP(S) proxy settings should now be respected.
- The downloader has better awareness of offline mode and refresh deps, cleaning up the calling code a bit.
- Uses the new Java 11 HTTP client, provides async support for downloading multiple files
- Progress handling (TODO needs hooking up to gradle)
- Better compression support. Handled by [Methanol](https://mizosoft.github.io/methanol/) 
- Unit tested with a real web server.
2022-07-25 18:01:11 +01:00
modmuss50
da2992e7d9 Configurable remap configs. (#674)
* First pass at configurable remap configs.

* No benefit to making it lazy: https://github.com/gradle/gradle/blob/v7.4.2/subprojects/plugins/src/main/java/org/gradle/api/plugins/BasePlugin.java#L104 ... fixes some stuff to make it work.
2022-06-25 21:38:43 +01:00
modmuss50
de31f1e083 Intermediate mapping handling improvements. (#593)
* Add API for intermediate mappings. Add hacky option to run with no intermediate mappings.

* Add setter, and some getters that I need :)

* Remove unused inject.

* Don't add asm-all to the libraries.

* Fix unit tests.
2022-02-09 13:49:15 +00:00
modmuss50
d40241d75a Fix performance regressions in large multi-project builds. (#571)
* Perf improvements to multi-project builds.

* Fixes.

* More fixes.

* Layered mappings fixes

* Perf improvements. Undo broken fix.

* Fix remap classpath being empty.

* Another gradle bug? Either way this is fine and works.

* Fix broken test

* Final fixes?

* Fix and cleanup mixin ap mappings.
2022-01-14 19:50:45 +00:00
modmuss50
4158062ce5 Experimental support for split common and clientonly minecraft jars. (#561)
This lays the ground work for split client and server mod code. With this first phase when enabled loom will generate a clientonly and common minecraft jar. Fabric loader and API will both need changes to support this before it can be used to develop mods.

Phase two of this project will handle splitting mod code into a client and common source set along with spliting any dependencies. 

Mostly fixes #539 by sepreating decompile tasks
2022-01-04 21:19:03 +00:00
modmuss50
ab21e0e550 Rewrire Jar and Source remapping tasks. (#504) 2021-12-20 16:29:11 +00:00
modmuss50
5a16440c1e Support ARM natives, rewrite native handling and misc cleanup. (#554)
* Rewrite natives handling, upgrade LWJGL on ARM machines.

* Remove old natives override hack, should now always be done via gradle.

* Use "idea" everywhere

* Add server specific libraries onto their own classpath. Includes misc code cleanup.

* Start on writing the excluded server libs.

* Gradle deprecation fixes, and misc cleanup

* Add support mod.

* Make native support mod none transitive.

* Update gradle.
2021-12-17 15:37:00 +00:00
modmuss50
9d9be1b842 Migrate fully to mapping-io + Add comments about transitive access widners to generated sources (#495)
* Add comments about transitive access widners to generated sources

* Migrate fully to mapping io

* Use release version of lorenz-tiny

* Review comment
2021-09-16 15:28:06 +01:00
Logic
3b0dc7f0f4 Use tiny-remapper to remap mixin annotation. (#441)
* use tiny-remapper 0.5.0

* add property of useLegacyMixinAp and rename mixin to mixinAp

* disable mixin ap if useLegacyMixinAp is false

* fix tests

* remove experimental for mixinAp

* enable mixin remapper

* revert changes on API

* rename MixinAp*** to Mixin***

* move useLegacyMixinAp inside MixinExtension

* cleaner code

* update test

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2021-09-07 11:28:51 +01:00
shedaniel
97a629eef9 File Structure Changes (#462)
* File Structure changes

* Fix checkstyle

* Fix processed jars

* Fix unpick tests

* Resolve reviews

* Fix merge conflicts
2021-08-13 21:02:45 +01:00
shedaniel
75234f4cbd Use Property in LoomGradleExtension & Move task groups to constants (#445)
* Use Property in LoomGradleExtension

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

* Fix customMinecraftManifest

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

* Add deprecation messages, let's wait for the tests to run to fix the tests that are using deprecated apis

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

* Apply license

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

* Update src/main/java/net/fabricmc/loom/util/DeprecationHelper.java

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

* Fix some tests, move mixinRefmapName -> mixin.defaultRefmapName

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

* Move back to the api

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

* Fix some tests

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

* Apply reviews

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

* Update src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java

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

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
2021-07-26 20:08:03 +01:00
modmuss50
e6793b5ed7 Revert "Fix MojangMappingsSpec having the same hash version for each mc version."
This reverts commit 61fa4d9f
2021-07-21 23:30:40 +01:00
modmuss50
61fa4d9fb6 Fix MojangMappingsSpec having the same hash version for each mc version.
I dont think this would be a real cause for concern as the jar would have had the mc version in it anyway.
2021-07-21 22:29:23 +01:00
LogicFan
81fa551382 Better Mixin AP configuration (#423)
* [SPON-15] Apply Mixin AP config for all projects.

* Revert "[SPON-15] Apply Mixin AP config for all projects."

This reverts commit 93576e83b1221949d551b6307938f7dd6dc8fbbe.

* use setter & getter

* fix broken test introduced in 54d6ef7896

* initial commit for mixin extension

* refactor getConfiguration

* apply mixin extension

* [SPON-15] allow across project AP config

* [SPON-15] revert some changes

* [SPON-15] refactor codes

* [SPON-15] fix bugs

* [SPON-15] bring back cross-project apconfig

* [SPON-15] bug fix: move add default sourceSet earlier

* [SPON-15] fix style

* [SPON-15] refactor MixinAPExtension

* add test

* update test

* [SPON-15] fix test

* Update MixinAnnotationProcessorExtension.java

* [SPON-15] fix test

* fix deprecated gradle API

* [SPON-15] refactor ApInvoker

* [SPON-15] refactor ApInvoker

* allow change refmap name in sourceSet bases

* add new condition on test

* [SPON-15] fix wrong suffix

* Revert "[SPON-15] fix wrong suffix"

This reverts commit 98910392d91c26cd0454cca8cfc03c4e3d417fd6.

* fix mixinjson suffix

* use stream instead of collection for mixin json name

* change name for function

* use correct auto-refmap

* fix file name

* add with action

* add test

* refactor some codes

* refactor code

* update test

* fix checkstyle

* better error message

* fix checkstyle

* remove corss project option

* allow mixin inside loom

* remove project0

I should remove all project0. If I forget one please tell me.

* move `mixin` inside `loom`

* fix spotless

* merge attempt

* fix checkstyle

* seperate api & impl

* add experimental annotation for API

* use API

* Fix indentation

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

* fix typo

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

* fix typo

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

* better javadoc

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
2021-07-18 14:13:47 +01:00
modmuss50
e439a1b354 Refactor LoomGradleExtension (#431)
* First pass at refactoring the extension

* Fix inital issues.

* Combine some interfaces

* Checkstyle

* Fix years

* Add isShareCaches to api
2021-07-14 00:03:21 +01:00