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

Use TaskCollection.named overload taking Spec #1

Merged
merged 3 commits into from
Mar 4, 2024
Merged

Conversation

lukellmann
Copy link
Member

Use the new TaskCollection.named method taking a Spec for depending on tasks that might not exist.

See https://docs.gradle.org/8.6/release-notes.html#lazy-name-based-filtering-of-tasks

Use the new TaskCollection.named method taking a Spec for depending on
tasks that might not exist.

See https://docs.gradle.org/8.6/release-notes.html#lazy-name-based-filtering-of-tasks
@lukellmann lukellmann requested a review from DRSchlaubi February 2, 2024 23:38
@lukellmann
Copy link
Member Author

btw, what the reason for this commit? asking to make sure this won't conflict with that change.

@DRSchlaubi
Copy link
Member

For some reason named thrw an exception when the task doesn't exist. Did you test this on kord

@lukellmann
Copy link
Member Author

Did you test this on kord

not yet, how would i best do this?

@DRSchlaubi
Copy link
Member

Push to Maven local

@lukellmann
Copy link
Member Author

For some reason named thrw an exception when the task doesn't exist.

makes sense, it's documented to do so: https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectCollection.html#named-java.lang.String-

@DRSchlaubi
Copy link
Member

ig this doesn't matter when using the predicate

@lukellmann
Copy link
Member Author

yes, it's just gonna be an empty collection and dependsOn seems to just accept that

@lukellmann
Copy link
Member Author

Did you test this on kord

i did, it works after fixing this npe and running kord's build with gradle 8.6

@lukellmann
Copy link
Member Author

with kordlib/kord#920 kord will use gradle 8.6

@lukellmann lukellmann changed the title Update Gradle to 8.6 Use TaskCollection.named overload taking Spec Mar 2, 2024
@lukellmann lukellmann merged commit 3742b7a into main Mar 4, 2024
@lukellmann lukellmann deleted the gradle-8.6 branch March 4, 2024 01:15
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