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

Pass sourcesets using TaskInputs.files, not .file #172

Merged
merged 5 commits into from
Oct 20, 2017

Conversation

zpencer
Copy link
Contributor

@zpencer zpencer commented Oct 18, 2017

TaskInputs.file can only accept real files, not sourcesets:
https://discuss.gradle.org/t/gradle-4-3-rc1-is-available-for-testing/24415/16

Copy link
Collaborator

@zhangkun83 zhangkun83 left a comment

Choose a reason for hiding this comment

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

Can you look into the CI failure?

@@ -55,6 +55,6 @@ buildscript {

where:
androidPluginVersion << ["2.2.0", "2.2.0", "3.0.0-alpha7"]
gradleVersion << ["2.14.1", "3.0", "4.1-milestone-1"]
gradleVersion << ["2.14.1", "3.0", "4.1-milestone-1", "4.3-rc-2"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

The 4.1 milestone should probably be changed to 4.1

@@ -63,7 +63,7 @@ class Utils {

static void addFilesToTaskInputs(Project project, TaskInputs inputs, Object files) {
if (compareGradleVersion(project, "3.0") >= 0) {
inputs.file(files).skipWhenEmpty()
inputs.files(files).skipWhenEmpty()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wow, glad to see it can be fixed in such a clean way.

Copy link

@teodor-appd teodor-appd Jun 23, 2022

Choose a reason for hiding this comment

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

@zpencer Had to dig as deep as this diff to solve my project's problem: org.gradle.api.internal.tasks.DefaultTaskOutputs@1cc16f4b' specified for property '$1' cannot be converted to a file. Thanks a lot!

P.S.: if you know how to start debugging such a problem (interested in how you did it), please tell me.

@zhangkun83
Copy link
Collaborator

LGTM! Thanks @zpencer!

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.

3 participants