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

Disable Gradle Daemon for Gradle Tasks Performed in Project Generation #131

Open
SonicGDX opened this issue Sep 10, 2023 · 2 comments
Open

Comments

@SonicGDX
Copy link

SonicGDX commented Sep 10, 2023

The gradle task run when generating a project with iOS MOE enabled seems to run with the daemon being enabled (probably because that is the default). I think the daemon isn't necessary in most cases because only one seems to be done.

Running Gradle tasks:
./gradlew ios-moe:moeUpdateXcodeSettings ios-moe:copyNatives

Welcome to Gradle 8.3!

Here are the highlights of this release:
 - Faster Java compilation
 - Reduced memory usage
 - Support for running on Java 20

For more details see https://docs.gradle.org/8.3/release-notes.html

Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
@SonicGDX SonicGDX changed the title Potentially Unnecessary Gradle Daemon Created Disable Gradle Daemon for Gradle Tasks Performed in Project Generation Sep 10, 2023
@tommyettinger
Copy link
Member

The daemon stays running after gdx-liftoff closes, if I'm understanding it correctly, so it should probably still be operational when you open the project and build it. I think if Gradle can locate and use a compatible daemon, it speeds up things like the initial project import (but not the lengthy step IDEA takes to index all the files) and later Gradle tasks you run. If the Gradle daemon wasn't started by Liftoff, then the one task Liftoff runs might be faster, but as soon as you open the project it just has to create the daemon for the first time then.

That said, I am very far from being an expert in Gradle, so if anyone can verify my guesses here, that would be great!

@SonicGDX
Copy link
Author

The daemon stays running after gdx-liftoff closes, if I'm understanding it correctly, so it should probably still be operational when you open the project and build it. I think if Gradle can locate and use a compatible daemon, it speeds up things like the initial project import (but not the lengthy step IDEA takes to index all the files) and later Gradle tasks you run. If the Gradle daemon wasn't started by Liftoff, then the one task Liftoff runs might be faster, but as soon as you open the project it just has to create the daemon for the first time then.

That said, I am very far from being an expert in Gradle, so if anyone can verify my guesses here, that would be great!

That's true. I think whether the daemon can be reused depends on if the JDK/Java version that runs Gradle is the same

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

No branches or pull requests

2 participants