Skip to content

Commit

Permalink
Add testDataNewTargets sourceSet
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Apr 30, 2024
1 parent 7201084 commit 815e90d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import org.incendo.cloudbuildlogic.jmp
import kotlin.io.path.exists
import kotlin.io.path.invariantSeparatorsPathString

plugins {
val indraVer = "3.1.3"
Expand Down Expand Up @@ -74,7 +76,17 @@ allprojects {
}

val testDataSet = sourceSets.create("testData")
val testDataNewTargets = sourceSets.create("testDataNewTargets")

dependencies {
testImplementation(testDataSet.output)
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
}
})
testImplementation(testDataNewTargets.output)
}

0 comments on commit 815e90d

Please sign in to comment.