Skip to content

Commit

Permalink
gradle task dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
yliuuuu committed Nov 9, 2023
1 parent b3108a9 commit 9ac15ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions partiql-lang/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ tasks.processResources {
}

tasks.processTestResources {
dependsOn(":partiql-planner:generateResourcePath")
from("${project(":partiql-planner").buildDir}/resources/testFixtures") {
this.eachFile {
println(this.sourceName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class PartiQLSchemaInferencerTests {
val map = mutableMapOf<String, MutableList<Pair<String, StaticType>>>()
inputStream.reader().readLines().forEach { path ->
if (path.startsWith("catalogs/default")) {
val schema = PartiQLSchemaInferencerTests::class.java.getResourceAsStream("/$path")!!
val schema = this::class.java.getResourceAsStream("/$path")!!
val ion = loadSingleElement(schema.reader().readText())
val staticType = ion.toStaticType()
val steps = path.split('/').drop(2) // drop the catalogs/default
Expand Down
2 changes: 1 addition & 1 deletion partiql-planner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dependencies {
}

tasks.register("generateResourcePath") {
dependsOn("processTestFixturesResources")
doLast {
val resourceDir = file("src/testFixtures/resources")
val outDir = File("$buildDir/resources/testFixtures")
Expand All @@ -47,7 +48,6 @@ tasks.register("generateResourcePath") {
println("exists")
pathFile.writeText("") // clean up existing text
}
println("if statement completed")
resourceDir.walk().forEach { file ->
println(file)
if (!file.isDirectory) {
Expand Down

0 comments on commit 9ac15ce

Please sign in to comment.