Skip to content

Commit

Permalink
fix(build): remove broken build caching
Browse files Browse the repository at this point in the history
  • Loading branch information
darksaid98 committed Feb 6, 2024
1 parent eadfb66 commit 9514777
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -213,35 +213,8 @@ jooq {
}
}

tasks.withType<FlywayMigrateTask>().configureEach { // Declare Flyway migration scripts as inputs
inputs.files(
fileTree("src/main/resources/db/migration"),
fileTree("src/main/java/${mainPackage}/db/flyway/migration")
).withPropertyName("flyway-migration-files").withPathSensitivity(PathSensitivity.RELATIVE)

outputs.files(
fileTree("${project.layout.buildDirectory.get()}/generated/flyway"),
).withPropertyName("flyway-files")
}

tasks.withType<CodegenTask>().configureEach {
dependsOn.add(tasks.flywayMigrate) // Ensure database schema has been prepared by Flyway before generating the jOOQ sources

// Declare Flyway migration scripts as inputs on the jOOQ task
inputs.files(
fileTree("src/main/resources/db/migration"),
fileTree("src/main/java/${mainPackage}/db/flyway/migration")
).withPropertyName("flyway-migration-files").withPathSensitivity(PathSensitivity.RELATIVE)

// Declare outputs
val dir = layout.buildDirectory.dir("generated-src/jooq").get()
outputs.dir(dir).withPropertyName("jooq-generated-sources")
sourceSets {
get("main").java.srcDir(dir)
}

// Enable build caching
outputs.cacheIf { true }
}

// Apply custom version arg
Expand Down

0 comments on commit 9514777

Please sign in to comment.