Skip to content

Commit

Permalink
fix(build): jOOQ task dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
darksaid98 committed Feb 6, 2024
1 parent 9514777 commit 1b613ed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,19 @@ tasks {
dependsOn(shadowJar)
}

jooqCodegen {
dependsOn(flywayMigrate)
}

compileJava {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything

// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
// See https://openjdk.java.net/jeps/247 for more information.
options.release.set(17)
options.compilerArgs.addAll(arrayListOf("-Xlint:all", "-Xlint:-processing", "-Xdiags:verbose"))

dependsOn(jooqCodegen) // Generate jOOQ sources before compilation
}

javadoc {
Expand Down Expand Up @@ -213,10 +219,6 @@ jooq {
}
}

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

// Apply custom version arg
val versionArg = if (hasProperty("customVersion"))
(properties["customVersion"] as String).uppercase() // Uppercase version string
Expand Down

0 comments on commit 1b613ed

Please sign in to comment.