Skip to content

Commit

Permalink
fix new target set
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Apr 30, 2024
1 parent 815e90d commit eae0c94
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,23 @@ val testDataSet = sourceSets.create("testData")
val testDataNewTargets = sourceSets.create("testDataNewTargets")

dependencies {
val oldRoot = layout.buildDirectory.dir("java/testData").get().asFile.toPath()
val newRoot = layout.buildDirectory.dir("java/testDataNewTargets").get().asFile.toPath()
testImplementation(testDataSet.output.filter {
if (it.toPath().startsWith(oldRoot)) {
!newRoot.resolve(oldRoot.relativize(it.toPath()).invariantSeparatorsPathString).exists()
} else {
true
val oldRoot = layout.buildDirectory.dir("classes/java/testData").get().asFile.toPath()
val newRoot = layout.buildDirectory.dir("classes/java/testDataNewTargets").get().asFile.toPath()
testDataSet.output.asFileTree.elements.zip(testDataNewTargets.output.asFileTree.elements) { old, _ ->
old.filter {
if (it.asFile.toPath().startsWith(oldRoot)) {
!newRoot.resolve(oldRoot.relativize(it.asFile.toPath()).invariantSeparatorsPathString).exists()
} else {
true
}
}
})
}
//testImplementation(testDataSet.output.filter {
// if (it.toPath().startsWith(oldRoot)) {
// !newRoot.resolve(oldRoot.relativize(it.toPath()).invariantSeparatorsPathString).exists()
// } else {
// true
// }
//})
testImplementation(testDataNewTargets.output)
}

0 comments on commit eae0c94

Please sign in to comment.