Commit Graph

1030 Commits

Author SHA1 Message Date
zml
3c487447fb Fix interface injection of inner class interfaces (#900)
Fixes #798
2023-06-13 11:20:46 +01:00
Luke Bemish
55c59ef97e Change zip entry ordering to place manifest first (#887)
* Change zip entry ordering to place manifest first

* Add handling for signature related files

* Update jar file hash

* Hopefully update correct file hashes this time

* Change jar hashes

* Add correct source hashes
2023-06-13 11:17:20 +01:00
modmuss
6e72125c0f Dont allow gradle to run game/genSources tasks in parallel (#901)
* Dont allow gradle to run game/genSources tasks in parallel

* Fix build
2023-06-13 11:16:56 +01:00
modmuss
af1f2497b5 Fix Kotlin 1.9.0 beta (#902)
* Fix Kotlin 1.9.0 beta

* Fix build
2023-06-13 11:16:14 +01:00
modmuss50
5c92ebd20b Loom 1.3 2023-06-13 11:10:08 +01:00
modmuss50
d1f35d4221 Fix publish 2023-05-05 13:30:54 +01:00
modmuss50
35e827566e Move jar merger to loom. (#882)
* Move jar merger to loom.

* Fix copyright years
2023-05-05 13:26:06 +01:00
modmuss50
92eed264ab Downloader improvements (#880)
* Fixes Integration tests locally often fail with download errors #878
* Hopefully fixes Loom is very slow to download files, often hanging for 10+ minutes #877
* "Forcing downloading" error should show much less often.
* Progress loggers get closed when download fails.
* Download assets uses a maxmium of 10 threads.
* Update tests to run against 8.3 nightlys.
* Fix windows arm tests as Mojang back-ported this change to all 1.19 versions.
2023-05-02 09:21:51 +01:00
modmuss50
dcbdbf0e30 Fix @Environment(EnvType.CLIENT) not being added to the named minecraft client only jar. 2023-04-23 14:15:45 +01:00
modmuss50
2e6a1a9128 Fix config roles. (#872) 2023-04-23 10:02:56 +01:00
Juuz
162b504d64 RunConfigSettings: Add support for fully custom main class (#871) 2023-04-23 09:22:41 +01:00
modmuss50
743ba4de66 Support 23w16a & Windows ARM64, and fix regression when adding ARM support on older versions. (#870)
* Support 23w16a & Windows ARM64, and fix regression when adding ARM support on older versions.

* Fix build
2023-04-20 22:42:44 +01:00
modmuss50
da9f601c2f Set configuration roles + cleanup setup classes. (#868) 2023-04-20 08:45:18 +01:00
modmuss50
b35753476c Fix applying mods to server libraries. 2023-04-18 14:27:54 +01:00
modmuss50
89d09600c5 Rewrite Kotlin metadata remapping to support the latest kotlin metadata library. (#866) 2023-04-17 23:46:45 +01:00
modmuss50
0d2152444f Allow decompilers to set a smaller min heap size. 2023-04-17 15:43:07 +01:00
modmuss50
1015ef09ff Update to Gradle 8.1 (#864)
* Update to Gradle 8.1

* Fix build, run RunConfigTest against all gradle versions.

* Fix build
2023-04-17 13:49:49 +01:00
modmuss50
c16303b9b2 Rewrite Minecraft Library handling. (#857)
This PR rewrites the Minecraft library processing with a more structured and testable set of "library processors". The old code is a mess of special cases and work arounds for various issues on various platforms.

Previously this was only really used on lesser used platforms/versions so wasnt a major issue if things broke, however current shipping Minecraft versions (1.19.4) use an LWJGL version that does not work well on Java versions new than 19. With this change LWJGL is upgraded when using Java 19 or later.

Upgraded libraries are also now only placed on the runtime classpath, this prevents you from using newer library features in your mod.
2023-04-17 00:07:52 +01:00
modmuss50
95a260d923 Test against Gradle 8.1 and 8.2 nightly. (#846) 2023-04-16 17:19:21 +01:00
modmuss50
9e7458f76a 1.2 2023-04-16 14:46:50 +01:00
modmuss50
4ff9f726e1 Work around Gradle 8.1 bug causing Files.readString(Path) to call path.toFile(). 2023-04-12 19:56:01 +01:00
modmuss50
75a98a5038 Only force re-downloads when manually refreshing deps (#851) 2023-04-02 15:40:09 +01:00
modmuss50
ad7d4e75b9 Reformat groovy code (#850)
* Reformat groovy

* Also format gradle files

* Groovy import order
2023-03-31 10:22:58 +01:00
marcus8448
b506a6280a fix: remapping of jars without a fabric.mod.json (#840)
* fix: remapping of jars without a fabric.mod.json
(jars that have `Fabric-Loom-Remap: true`)

* fix: checkstyle
2023-03-10 19:30:18 +00:00
Caoimhe
83b968df64 Warn when using clientOnlyMinecraftJar() on Minecraft versions newer than 1.3 (#824)
Single JARs break things like source generation on newer versions and
pretty much have no difference there, so we should log a warning,
similar to what we do for merged JARs not being supported on 1.2.5 or
older.
2023-02-18 21:04:17 +00:00
modmuss50
4a11cbae07 Test against Gradle 8 (#828)
* Test against Gradle 8

* Update
2023-02-18 21:04:17 +00:00
modmuss50
ab114b5d7a Fallback to HTTP 1.1 on the last retry when downloading. (#829) 2023-02-18 21:04:17 +00:00
Juuz
b19184751b Add toString to ModSettings and RemapConfigurationSettings (#831)
This helps a bit with debugging code that uses them as you don't
have to open the object to see which mod/remap configuration we're
investigating.
2023-02-18 21:04:17 +00:00
modmuss50
97f594da8e Recursively copy configurations.
Co-authored-by: Juuz <6596629+juuxel@users.noreply.github.com>
2023-01-28 13:46:33 +00:00
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
bab447ffe1 Fix publish 2023-01-22 13:38:54 +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
js6pak
8a434af084 Remove unnecessary publication (#619) 2023-01-16 19:09:06 +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