Commit Graph

237 Commits (5a16440c1efec12870953e369f0f481d37c16b23)

Author SHA1 Message Date
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 efddf8f35c Run validate access widener task before genSources. Closes #550 2021-12-04 19:00:47 +00:00
modmuss50 6d65e120e7 Remove deprecated stuff 2021-12-04 19:00:47 +00:00
modmuss50 5f379e4f42
Make CFR the default decompiler (#527)
* Make CFR the default decompiler
Expose decompiler options

* Remove convention, default value is an empty map.

* Checkstyle..
2021-11-01 13:43:03 +00:00
modmuss50 177264420e Fix misleading error message when decompiling fails. 2021-10-28 18:15:59 +01:00
shedaniel 5c190cc3ef
Use NIO instead of ZipUtil (#513)
* Use nio for zip utils

* Make tests work

* Please work

* Fix some issues with tests

* Fix more issues with tests

* NIOZipUtils -> ZipUtils

* Resolve Juuxel's reviews

* Use our own FS utils

* Improve error handling, add loom Pair

* Add Unit tests + fixes

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2021-10-26 13:08:17 +01:00
modmuss50 61b5cfa733
Improve run config argument handling, should work with spaces a bit better. (#524) 2021-10-24 14:11:01 +01:00
modmuss50 a10307464e
Add AccessWidenerValidator (#518)
* Add AccessWidenerValidator

* Move to task

* Review feedback
2021-10-23 15:04:22 +01:00
modmuss50 0248bacc16 Forward stdin in AbstractRunTask. Fixes begin unable to run server commands. 2021-10-20 23:12:49 +01:00
modmuss50 0864e0a671 Ensure decompiler worker deamons are stopped after failure. 2021-10-15 22:30:27 +01:00
modmuss50 e2439b7f57
Rewrite GenSources including full support for CFR. (#511)
* Rewrite CFR decompiler interface. Support javadoc

* CFR line numbers and fixes.

* Cleanup and fix

* Use WorkerExecutor to fork, massively cleans up the fernflower code, but does remove the fancy multithreaded logging.

* Use IPC to get logging back from the decompilers.

* Cleanup UnpickJarTask, fix leak in IPCServer

* Used published CFR build

* Handle older windows versions that do not support AF_UNIX.

* Fixes and basic unit test

* Improve memory handling of genSources

* Stop decompile worker JVM
2021-10-11 13:47:16 +01:00
modmuss50 ce0a3308ff Make Run Config run dir relative to the project and not the root project. Move eclipse launch config files out of the root project. Closes #509 2021-09-30 19:59:46 +01:00
shedaniel be17a02e90
Use better gradle conventions, and fix #311 (#503)
* Use better gradle conventions, and fix #311

* Fix checkstyle

* Revert some changes

* Use convention

* Remove set classpath
2021-09-22 21:59:51 +01: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
shartte d48c74161e
Access Widener 2.0 with support for Transitive Access Wideners (#484)
* Added global access widener support.

* Adapt loom to changed API of latest AW PR.

* Fix expected access widener to fix the test. Since the access widener is now streamed directly into the writer, the expanded rules (i.e. accessible field makes the owning class also accessible) are no longer found in the remapped file.

* Add basic transitive accesswidener test

* Extracted applying transitive access wideners into their own jar processor since they also need to be applied if there is no AW in the mod itself.

* Misc assortment of fixes

* Set up the processor lazily to allow for adding the intermediary MC jar, which is needed to correctly remap intermediary AWs to named.

* Rework to setup the tiny remapper classpath with the mc jar
Add an extension prop to disable

* Add TransitiveDetectorVisitor

* Minor refactoring.

* Use release-version of access-widener.

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2021-09-14 22:40:47 +01:00
modmuss50 08e548b6c6
Expose layered mappings as an API (#490)
* Expose layered mappings as an API

* Add FileSpec

* Cleanup and support DependencyFileSpec
2021-09-13 17:58:52 +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
Juuxel 08f055489b
Fix the java software component not working with Loom and fix #200 (#460)
* Add modCompileOnlyApi, modRuntimeOnly; deprecate modRuntime

* begin

* continue

* Make RemapSourcesJarTask use properties

* finish

* Remove cursed version hack 😉

* Finish for real

* Add missing header

* Clarify a comment

* Fix tests

* Use Gradle's own *Elements and remove -dev jars

* Fix maven test

* Put mappingsFinal onto runtimeClasspath instead of implementation

* Make non-mod dependencies work with the legacy pom magic too

* Be a bit more clever when removing dev artifacts
2021-09-05 16:08:16 +01:00
modmuss50 b1b395cedf Revert "Make SourceRemapper threaded (#446)"
This reverts commit ef2816b0d0.
2021-09-02 12:50:56 +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
Juuxel f9a06cbd41
Make RemapSourcesJarTask use properties (#459) 2021-07-31 23:45:43 +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 ef2816b0d0
Make SourceRemapper threaded (#446)
Should be a little bit faster, but nothing magicial.
2021-07-25 22:54:22 +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
modmuss50 2259a4efc8
Add versions used to compile/build against to jar manifest (#428)
* Add versions used to compile/build against to jar manifest

* checkstyle

* Move to post remap

* Fix build

* Add mc version and mixin group

* Typo

* Make test run across versions better.
2021-07-13 23:10:07 +01:00
Juuxel f26e9e2c7b
Fix AW field remapping (#434)
* Fix AW field remapping

* Fix by updating TR instead

* Fix checkstyle so that tests run
2021-07-13 08:52:42 +01:00
modmuss50 ad5ac78e06 Improve some bad stack traces.
Idk why this happens.
2021-07-13 00:05:33 +01:00
modmuss50 54fe0909ff Use spotless for header validation, years have been back-filled from git history 2021-07-10 21:50:53 +01:00
modmuss50 b24e067215 Fix yet another gradle deprecation, expand tests to cover it 2021-07-05 23:04:08 +01:00
shedaniel 54d6ef7896
Fix typo "officalMojangMappings" (#420)
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-06-20 13:24:10 +01:00
modmuss50 1f9f48052b
Basic layered mappings with @ParchmentMC support (#413) 2021-06-14 18:39:03 +01:00
modmuss50 9fb167d506
General cleanup by making use of java 16 features (#397)
* General cleanup by making use of java 16 features

* use jackson-databind in place of gson when reading to a record

* Fixes

* cleanup

* dep updates

* Replace commons IOUtils usage with native java

* Update fernflower
2021-05-13 22:06:34 +01:00
modmuss50 c8df12cf0f
Update to Gradle 7 (#380)
* Gradle 7 part 1

* Fix actions?

* Update actions

* Fix tests not running

* Fix some broken tests

* Update kotlin to try and fix JDK 16 support

* Disable KotlinTest on j16

* exclude kotlin test from actions...
2021-04-04 23:02:00 +01:00
modmuss50 759cac2e6b
Constant unpicking (#328)
* Start adding constant unpicking

* Update to use unpick cli

* Fix build?

* Fix?

* Fix log spam when unpicking

* Improve unpick tests
2021-03-25 19:03:35 +00:00
modmuss50 e6ac2afc7b
Ensure outputs are reproducable across all OS's. (#363) 2021-03-15 23:31:18 +00:00
modmuss50 7231b9e053
Mod Remapping Refactor. (#362)
Improved gradle 7 support
General cleanup
2021-03-12 22:16:24 +00:00
modmuss50 d02055eb23
Fix custom sourceset not being correctly set for runconfig tasks (#357) 2021-03-03 21:22:10 +00:00
Juuxel 737c6cbd4f
RunConfigSettings.generateIDEConfig -> ideConfigGenerated + normal getter/setter (#349) 2021-02-12 18:43:05 +00:00
modmuss50 0d1f40aee4
Rewrite minecraft game data handling.
Much faster asset and native validation logic.
Simplfied game metadata model.
2021-02-12 17:50:54 +00:00
modmuss50 24c166fc79 Generate IDE run configs on a per config basis. Allows for much finer grain control over what run configs are generated.
Defaults to generate all run configs on the root project.
2021-02-11 18:50:25 +00:00
modmuss50 4daec03a0f Rename `runs` -> `runConfigs` 2021-02-11 18:18:07 +00:00
modmuss50 409f5f8e93
Update MCE - Remove auto population of minVersion in mixins - Drop some log levels. 2021-02-11 18:12:27 +00:00
modmuss50 5b3222e9b9 Rename mode -> environment + Hopefully fix a regression with the run tasks 2021-01-31 00:12:10 +00:00
modmuss50 6a315be278
Improve run configs (#318) (#338)
Co-authored-by: ShadewRG <onankman@gmail.com>
Co-authored-by: UndeadCat | Shadew <redgalaxysw@gmail.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
2021-01-29 18:04:39 +00:00
Bytzo 16f72e1c95
Set classpath before compileJava task (#330) (#333) 2021-01-26 18:08:19 +00:00
modmuss50 792a64e2ef
Optimise loom configuration, saves 1.2 seconds in my testing. #319 2020-12-27 16:25:30 +00:00
modmuss50 03444f26b0
General code cleanup (#313)
* First general cleanup pass

* Review feedback

* Fix build

* Fix tests
2020-12-24 20:58:30 +00:00
i509VCB b0860c36d6
Add ability to specify additional tiny remapper options in remapJar (#292)
* Add ability to specify additional tiny remapper options in remapJar

* Imports go brr

* Fix checkstyle

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2020-12-21 21:02:39 +00:00
modmuss50 e20993daf8 Allow setting the RemapJarTask classpath. Closes #307 2020-12-21 20:42:23 +00:00