Skip to content

Commit

Permalink
feat(gradle): enable typesafe project accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
zero88 committed May 13, 2024
1 parent 3936d8d commit 272f503
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
3 changes: 1 addition & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {

testImplementation(libs.sqlClientVertx)

testFixturesApi(project(":spi"))
testFixturesApi(projects.spi)
testFixturesApi(libs.bundles.junit5)
testFixturesApi(libs.junit5Vertx)
testFixturesApi(libs.junit5Container)
Expand All @@ -42,7 +42,6 @@ dependencies {
testFixturesCompileOnly(libs.jetbrainsAnnotations)
testFixturesCompileOnly(libs.agroalApi)
testFixturesCompileOnly(libs.hikariCP)
testFixturesCompileOnly(libs.h2Jdbc)
testFixturesCompileOnly(libs.jdbcVertx)
testFixturesCompileOnly(libs.bundles.postgres)
testFixturesCompileOnly(libs.bundles.mysql)
Expand Down
4 changes: 2 additions & 2 deletions docs/asciidoc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ plugins {
}

dependencies {
compileOnly(project(":spi"))
compileOnly(project(":integtest:postgres"))
compileOnly(projects.spi)
compileOnly(projects.integtest.postgres)
compileOnly(libs.jooqMeta)
compileOnly(libs.jdbcVertx)
compileOnly(libs.postgresVertx)
Expand Down
8 changes: 4 additions & 4 deletions docs/testing-asciidoc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ plugins {
}

dependencies {
compileOnly(project(":spi"))
compileOnly(testFixtures(project(":jooqx")))
// compileOnly(project(":rsql:jooq"))
compileOnly(project(":integtest:postgres"))
compileOnly(projects.spi)
compileOnly(testFixtures(projects.jooqx))
// compileOnly(projects.rsql.jooq)
compileOnly(projects.integtest.postgres)
compileOnly(libs.jdbcVertx)
compileOnly(libs.postgresVertx)
compileOnly(libs.mysqlVertx)
Expand Down
2 changes: 1 addition & 1 deletion integtest/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ subprojects {

dependencies {
implementation(rootProject.libs.jooqMetaExt) // For generate model
testImplementation(testFixtures(project(":jooqx")))
testImplementation(testFixtures(rootProject.projects.jooqx))
testImplementation(rootProject.libs.jooqMeta)
testImplementation(rootProject.libs.hikariCP)
testImplementation(rootProject.libs.bundles.agroal)
Expand Down
2 changes: 1 addition & 1 deletion integtest/mysql/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies {
jooqGenerator(libs.mysqlJdbc)
jooqGenerator(libs.mysqlContainer)
jooqGenerator(libs.bundles.slf4jImpl)
jooqGenerator(testFixtures(project(":jooqx")))
jooqGenerator(testFixtures(projects.jooqx))

testImplementation(libs.bundles.mysql)
}
Expand Down
2 changes: 1 addition & 1 deletion integtest/postgres/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.jooq.meta.jaxb.ForcedType
import org.jooq.meta.jaxb.Logging

dependencies {
compileOnly(project(":spi")) // for customize generate
compileOnly(projects.spi) // for customize generate
compileOnly(libs.postgresVertx) // for customize generate
jooqGenerator(libs.jooqMetaExt)
jooqGenerator(libs.bundles.slf4jImpl)
Expand Down
4 changes: 2 additions & 2 deletions rsql/asciidoc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ plugins {
}

dependencies {
compileOnly(project(":rsql:jooq"))
compileOnly(project(":integtest:postgres"))
compileOnly(projects.rsql.jooq)
compileOnly(projects.integtest.postgres)
compileOnly(libs.jdbcVertx)
compileOnly(libs.postgresVertx)
compileOnly(libs.mysqlVertx)
Expand Down
2 changes: 1 addition & 1 deletion rsql/jooq/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
api(project(":rsql:core"))
api(projects.rsql.core)
api(libs.jooq)

testImplementation(libs.h2Jdbc)
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pluginManagement {
gradlePluginPortal()
}
}
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

rootProject.name = "jooqx-parent"
val profile: String by settings
Expand Down
4 changes: 2 additions & 2 deletions spi/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
api(project(":jooqx"))
api(projects.jooqx)
// api(ZeroLibs.rql_jooq)
compileOnly(libs.jdbcVertx)
compileOnly(libs.postgresVertx)
Expand All @@ -11,7 +11,7 @@ dependencies {
compileOnly(libs.hsqlJdbc)
compileOnly(libs.sqliteJdbc)

testImplementation(testFixtures(project(":jooqx")))
testImplementation(testFixtures(projects.jooqx))
testImplementation(libs.jdbcVertx)
testImplementation(libs.postgresVertx)
testImplementation(libs.mysqlVertx)
Expand Down

0 comments on commit 272f503

Please sign in to comment.