Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up build #59

Merged
merged 7 commits into from
Feb 15, 2024
Merged

Speed up build #59

merged 7 commits into from
Feb 15, 2024

Conversation

makamys
Copy link
Collaborator

@makamys makamys commented Feb 15, 2024

This PR splits :retrofuturagradle's shadow task into separate tasks for source and dependency shadowing. Now only the main sourceset's classes get relocated on every build. This speeds up assembly from ~2 minutes to ~25 seconds.

It's somewhat messy but I'm not sure if there's a better way to implement this. It could be simplified a bit by removing the shadowJar task since it does nothing now.

Known differences:

  • oldasmwrapper is no longer double-relocated (e.g. com.gtnewhorizons.retrofuturagradle.shadow.com.gtnewhorizons.retrofuturagradle.fg23shadow.* is now simply com.gtnewhorizons.retrofuturagradle.fg23shadow.*)
  • jdtAdapterCompiler.jar is now missing for some reason. Switching to a Jar task brought it back.

Update: I also added an option to skip the javadoc task since it takes 6 seconds for me.

Speeds up assembly from ~2 minutes to ~25 seconds
Slightly faster: ~5.443s -> ~4.813s
Reduces assemble time by 6 seconds
@makamys makamys changed the title Split shadow task into source and dependency shadowing Speed up build Feb 15, 2024
@eigenraven eigenraven self-requested a review February 15, 2024 17:27
@eigenraven eigenraven merged commit 283b7f9 into GTNewHorizons:master Feb 15, 2024
1 check passed
@makamys makamys deleted the split-shadow branch February 15, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants