Commit Graph

862 Commits

Author SHA1 Message Date
modmuss50
0fa4e1e05e Fix #815 - Regression causing TAWs from runtime only deps to be applied. 2023-01-25 09:30:36 +00:00
modmuss50
74c9497166 Fix unit test 2023-01-24 23:20:05 +00:00
modmuss50
2bcee320d4 Fix download sources hook not working for client only jars. 2023-01-24 23:17:57 +00:00
modmuss50
f61afd865e Fix client environment annotations not being applied to the client only jar when using split sources. 2023-01-24 23:13:19 +00:00
modmuss50
5094a8af86 Update MCE (#818) 2023-01-24 10:54:37 +00:00
modmuss50
a1e671b719 Fix and test jar processor caching. 2023-01-23 22:06:05 +00:00
modmuss50
b22c66f0be Update dependencies 2023-01-22 13:34:28 +00:00
modmuss50
2eac854fb7 Add a test for cross project access widenerners 2023-01-22 13:23:19 +00:00
modmuss50
0d609502fa Fix checksum test.
This is only really testing to ensure that it does not crash, we don't care about the output
2023-01-21 23:07:32 +00:00
Juuz
06e9fb16e5 Rewrite the internals of mod configuration remapping to fix bugs (#807)
* Add test for #801

* Add test for #572

* Rewrite mod configuration remapping internals to fix bugs

Fixes #801. Fixes #572.

- Instead of individual mod configs getting remapped, Loom now remaps
  "collector configs": `mod[Compile/Runtime]Classpath[source set name]`
  (eg `modRuntimeClasspathMain` -> `modRuntimeClasspathMainRemapped`)
  - This lets us use Gradle's `org.gradle.usage` attributes to select
    whether it's a compile-time or runtime dependency
  - Note: Remap configurations sourcing from `api` are partially left
    intact due to their special logic in the `namedElements` configuration.
- Setting the proper usages fixes #801.
- No dependency files are added to the real target configurations
  (like `api` and `implementation`) anymore.
  - This fixes #572, since `runtimeClasspath` and `compileClasspath` don't
    leak transitive dependencies unlike `implementation` etc.

* Fix checkstyle

* Fix split env dependency consumers

* Only use collector configs for remapped deps and let the inputs stay intact

This way the code has less duplication.

* Improve log messages

* Update year

* Add some comments

* Fix compilation

* Use LinkedHashMap for reliable iteration order through remapped configs

* Use ImmutableMap.of instead of Map.of for reliable ordering

* ModConfigurationRemapper: Move namedElements handling out of forEach

* Add regression test for a crash where loader is resolved after other mods

* Fix the aforementioned bug

* Rename InstallerDataTest -> DependencyOrderTest

* Add TODO about refresh dependencies

The code currently processes the same deps multiple times when
--refresh-dependencies/-Dloom.refresh=true/a cache invalidation
is applied.

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2023-01-21 23:03:42 +00:00
modmuss50
7f06b64693 Fix issue caused in previous commit. 2023-01-16 21:53:44 +00: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
0c68994aa6 Fix #755 2023-01-16 18:38:16 +00:00
modmuss50
2d10e42f4d Fix broken etag handling. Maybe fixes #802 2023-01-16 18:25:59 +00:00
modmuss50
2b9072f37d Add RemapConfigurationSettings.getApplyDependencyTransforms to close #797 (#799) 2023-01-16 18:19:48 +00:00
modmuss50
7586911af8 Fix #789 2023-01-11 19:36:24 +00:00
modmuss50
60d4dac6ca Support MinimalExternalModuleDependency's as a FileSpec input (#785) 2023-01-11 10:54:03 +00:00
modmuss50
da4b01427f Move access widener jar processor for new processor API. (#787) 2023-01-10 23:19:21 +00:00
Vladimir Romashchenko
af21d602e9 fix: Colored logging in neovim (#795) 2023-01-10 18:07:23 +00:00
modmuss50
e9362b75d9 Merge remote-tracking branch 'origin/dev/1.0' into exp/1.1
# Conflicts:
#	src/main/java/net/fabricmc/loom/util/Constants.java
2023-01-10 18:05:16 +00:00
modmuss50
fea5fee15f Fix #790 (#791) 2023-01-06 10:58:26 +00:00
modmuss50
912e54cd7a Disallow insecure protocols for downloads. (#784) 2023-01-03 14:11:16 +00:00
modmuss50
69d25b7f60 Include projects in jar processor inputs (#771)
* Include projects in jar processor inputs

* Add option to disable + tests
2022-12-30 15:09:30 +00:00
modmuss50
2c6d4d930f Add getClientOnlySourceSetName (#770) 2022-12-30 13:06:12 +00:00
modmuss50
b79b64298b Update mercury (#777) 2022-12-18 15:59:53 +00:00
modmuss50
e16d9b0fa2 Update mercury, use the java release version to set the merucry source compat version (#773) 2022-12-16 10:48:58 +00:00
modmuss50
a465cb71e6 Update to 8.1 nightlys 2022-12-11 20:39:09 +00:00
modmuss50
39be6fa6e0 Merge remote-tracking branch 'origin/dev/1.0' into exp/1.1
# Conflicts:
#	src/main/java/net/fabricmc/loom/build/mixin/AnnotationProcessorInvoker.java
#	src/main/java/net/fabricmc/loom/task/AbstractRemapJarTask.java
2022-12-11 20:31:07 +00:00
modmuss50
aef884d005 Add mixin mappings as compile task outputs (#768)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2022-12-11 18:27:37 +00:00
modmuss50
be4e7a42a3 Fix getRuntimeRemapConfigurations() returning the wrong classpath. (#769) 2022-12-11 18:26:39 +00:00
Juuz
34c24cde3c Add ModSettings.sourceSet overloads taking source set names (#765)
Closes #764. Also fixes some minor stuff in the javadocs of sourceSet().
2022-12-09 08:50:21 +00:00
Juuz
ec76760ca4 Clear Fernflower context after decompiling (#760) 2022-12-09 08:49:43 +00:00
modmuss50
7173c2a6cb Add AbstractRemapJarTask.getAdditionalClientOnlyEntries 2022-11-21 19:24:21 +00:00
modmuss50
2a5947de0b Return a map of all class tweakers in FabricModJson 2022-11-08 20:46:49 +00:00
modmuss50
aedfd09657 Read "Fabric-Loom-Remap" manifest entry to allow an artifact to control if its remapped or not. (#749)
This allows for none mod jars to opt-into remapping, as well as mods or mod loaders to opt-out.

Setting "Fabric-Loom-Remap" to true/false in the jar's manifest.
2022-11-04 19:29:10 +00:00
Phoenix-Starlight
03e1369adc Patch download to work with symlinks (#736)
* Fix Download to work with symlinks

- Create SymlinkWalker
    * isPathSymbolic for whether any part of the path is symbolic, existing or not.
    * getRealPath for obtaining absolute, real path.
- Change Download to use SymlinkWalker
- Add in a new test for testing with symlinks

* Refactor
Switch to using Guava method for creating directories

* Fix import

* Alter test and fix arguments

* Forgot a def

* Fix method argument

* Change argument to child file

* Bump
2022-11-03 18:26:49 +00:00
modmuss50
ddf4605845 Ensure minecraft provider names are lowercase. 2022-11-03 18:26:09 +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
Juuz
e48a7124f5 Add LoomGradleExtensionAPI.getRuns() for consistency with runs() (#748)
* Add LoomGradleExtensionAPI.getRuns() for consistency with runs()

* Improve jd
2022-11-01 19:31:03 +00:00
modmuss50
c73b3735cf Fix ProcessedNamedMinecraftProvider always re-processing jars. 2022-10-29 22:03:32 +01:00
modmuss50
c46abf8ac4 Update deps, test fixes, and fix github actions deprecation warnings. (#745) 2022-10-29 16:57:06 +01:00
modmuss50
e7bee0daa8 Store minecraft jars in a maven repo instead of an ivy repo.
Improve intelij support for attaching sources.
2022-10-26 12:51:08 +01:00
modmuss50
5f67780824 Update nightly gradle version. 2022-10-26 12:51:08 +01:00
modmuss50
ccc3e77fe1 Only use mixin mappings from projects with the same mapping id. 2022-10-26 12:51:08 +01:00
modmuss50
00a3b7ff4e Move Iface injection to new MinecraftJarProcessor API 2022-10-26 12:51:08 +01:00
modmuss50
47987b2aa3 Cleanup configuration related code by passing ConfigContext 2022-10-26 12:51:08 +01:00
modmuss50
06074ae73c Start on improved mappings service 2022-10-26 12:47:36 +01:00
modmuss50
9d7a3eef8f Fix crash.
More small fixes.
2022-10-26 12:47:36 +01:00
modmuss50
bfb7d9fcc2 Merge remote-tracking branch 'origin/dev/1.0' into fmj_2
# Conflicts:
#	src/main/java/net/fabricmc/loom/util/gradle/SourceSetHelper.java
#	src/test/groovy/net/fabricmc/loom/test/LoomTestConstants.groovy
2022-10-07 10:19:11 +01:00
modmuss50
0036d81a3a Fixes to legacy jar processors. 2022-10-06 22:48:09 +01:00