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

fix: Getting tasks for Gradle < 5.0 #1619

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

MrRetroChannel
Copy link

Addressing #1331. DefaultGradleProject was introduced to the API only in Gradle 5.0, so it does not support older versions. This implementation includes both ways for retrieving tasks

@jdneo
Copy link
Member

jdneo commented Nov 6, 2024

Thank you for your contribution, will review it recently.

subModels, tasks, node, plugins, closures, scriptClasspaths);
}

private List<GradleTask> getGradleTasks(Project rootProject, Project project) {
Copy link
Member

@jdneo jdneo Nov 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just directly fetch the tasks with this approach no matter the project's gradle version is > or < 5? Since they look very similar.

// The original code is not implemented by me so I'm not aware of the history of it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for long response, as far as I understand plugin's local gradle project model does not support some lazy tasks, so this commit was made as fix #1302 in which now plugin uses gradle built in model. I couldn't reproduce this bug though so I can try to unify these methods to be compatible with everything, but it surely will need more testing

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