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 relativepath for file inputs so that task inputs are relocatable #315

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -293,19 +293,19 @@ class PitestTask extends JavaExec {

@Input
String getAdditionalClasspathFilePath() {
return additionalClasspathFile.asFile.get().absolutePath
return additionalClasspathFile.asFile.get().relativePath(project.rootProject.rootDir)
}

@Input
@Optional
String getHistoryInputLocationPath() {
//?. operator doesn't work with Gradle Providers
return historyInputLocation.isPresent() ? historyInputLocation.asFile.get().absolutePath : null
return historyInputLocation.isPresent() ? historyInputLocation.asFile.get().relativePath(project.rootProject.rootDir) : null
}

@Input
String getDefaultFileForHistoryDataPath() {
return defaultFileForHistoryData.asFile.get().absolutePath
return defaultFileForHistoryData.asFile.get().relativePath(project.rootProject.rootDir)
}

@Input
Expand Down