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

Declare test task inputs. #1304

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions sqldelight-gradle-plugin/build.gradle
Expand Up @@ -46,6 +46,11 @@ dependencies {
}

test {
inputs.files("../gradle/dependencies.gradle").withPathSensitivity(PathSensitivity.RELATIVE)
Copy link

Choose a reason for hiding this comment

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

Relative path sensitivity only makes sense for directories. What you want here is NONE, because you don't care about the path at all, only the contents.

inputs.property("ANDROID_HOME", System.getenv("ANDROID_HOME"))
Copy link

@oehme oehme Apr 17, 2019

Choose a reason for hiding this comment

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

This will prevent cache relocation, as you are using an absolute path. I'm sure you don't care about the path at all, but about what's installed there. So it's best to declare the actual files you care about in there as input files.

inputs.property("TRAVIS_OS_NAME", System.getenv("TRAVIS_OS_NAME"))
inputs.dir("../gradle/wrapper").withPathSensitivity(PathSensitivity.RELATIVE)
Copy link

Choose a reason for hiding this comment

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

Why are you using the wrapper as an input? Use TestKit to test plugins instead.

Copy link
Member

Choose a reason for hiding this comment

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

We are using it in this project


// The integration tests require local installations of some of the runtimes.
if (System.getenv("TRAVIS_OS_NAME") == "linux") {
dependsOn(
Expand Down