-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Run prepare tasks are not available if Gradle is set to configure on demand #838
Comments
This seems to be caused by our registration of the run configuration-related tasks1 during a ExampleTake the following example: tasks.create("task1") { group 'boop' }
afterEvaluate {
tasks.create("task2") { group 'boop' }
gradle.projectsEvaluated {
tasks.create("task3") { group 'boop' }
}
} When running According to @OrionDevelopment2, this is because the "task tree evaluation happens in practice immediately after project evaluation, but before the ForgeGradleIn ForgeGradle, we register our run config-related tasks in both userdev and patcherdev plugins by calling the This means that when configuration on demand is enabled, as seen in the example above, the run config-related tasks will fail to run due to them seemingly being nonexistent to Gradle. ConclusionsFixing this seems to be non-trivial -- the 'ideal' solution would be to modify @OrionDevelopment's suggestion to fixing it would be to register the tasks as early as possible -- when the run configs are registered to their containers -- then using 'configuration tasks' which run before each run config task and configure them according to the This issue seems related to gradle/gradle#9489, which also relates to task execution troubles with configuration on demand and Footnotes
|
If
org.gradle.configureondemand=true
is present ingradle.properties
, or if running the task with--configure-on-demand
, running theprepareRunClient
or any similar task in a multiproject setup will fail, saying that the task was not found in the project. This blocks running the game through Gradle, as the run tasks require these tasks.Tested with FG 5.1.+ and Gradle 7.3.3.
Reporting at Sci's request on discord.
The text was updated successfully, but these errors were encountered: