From b4e2ccb93ff664b932a179e42a708c46f3d30109 Mon Sep 17 00:00:00 2001 From: Etienne Studer Date: Tue, 26 Dec 2023 17:11:36 +0100 Subject: [PATCH] Polish readme text --- README.md | 22 ++++++++++--------- .../build.gradle | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 66e81643..d7e546c2 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ For each named jOOQ configuration declared in the build, the plugin adds a task generated Java sources in the matching source set, if existing. The code generation tasks participate in [task configuration avoidance](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html), in [build configuration caching](https://docs.gradle.org/nightly/userguide/configuration_cache.html), -in [incremental builds](https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:up_to_date_checks), +in [incremental builds](https://docs.gradle.org/current/userguide/incremental_build.html), in [task output caching](https://docs.gradle.org/current/userguide/build_cache.html), and in [toolchains](https://docs.gradle.org/current/userguide/toolchains.html). The plugin can be applied on both Java projects and Android projects. @@ -39,9 +39,8 @@ The following functionality is provided by the jOOQ plugin: The following Gradle configuration changes are contributed by the jOOQ plugin: - * Add the `org.jooq:jooq-codegen` dependency needed to execute the jOOQ code generation tool to the new `jooqGenerate` configuration - * Add the `org.jooq:jooq` dependency to the name-matching `implementation` configuration to successfully compile the Java sources generated from the database schema - * Use the customizable jOOQ version across all resolved `org.jooq*:jooq*` dependencies + * Add the `:jooq-codegen:` dependency needed to execute the jOOQ code generation tool to the new `jooqGenerate` configuration + * Add the `:jooq:` dependency to the name-matching `implementation` configuration to successfully compile the Java sources generated from the database schema The following Gradle features are supported by the jOOQ plugin: @@ -109,9 +108,11 @@ dependencies { ## Specifying the jOOQ version and edition -Specify the version and [edition](https://github.com/etiennestuder/gradle-jooq-plugin/blob/master/src/main/groovy/nu/studer/gradle/jooq/JooqEdition.java) that should be applied to all jOOQ dependencies that are declared in your project either explicitly or pulled in transitively. +Specify the version and [edition](https://github.com/etiennestuder/gradle-jooq-plugin/blob/master/src/main/groovy/nu/studer/gradle/jooq/JooqEdition.java) of the jOOQ dependencies automatically added by the plugin. -Note that the `org.jooq:jooq` dependency of the specified version and edition is automatically added to the `implementation` configuration of the source set that matches the name of the declared jOOQ configuration. +The `:jooq-codegen:` dependency of the specified version and edition is automatically added to the `jooqGenerator` configuration. + +The `:jooq:` dependency of the specified version and edition is automatically added to the `implementation` configuration of the source set that matches the name of the declared jOOQ configuration, if any. ### Gradle Groovy DSL @@ -133,15 +134,16 @@ jooq { ## Enforcing the jOOQ configuration XML schema version -Enforce a certain version of the jOOQ configuration XML schema by declaring what version of the jOOQ code generation tool to -make available to the jOOQ plugin at configuration time, i.e. in the DSL of the jOOQ plugin. +Enforce a certain version of the jOOQ configuration XML schema that is different to the default version and edition +configured by the jOOQ plugin by declaring what version of the jOOQ code generation tool to make available to the +jOOQ plugin at configuration time, i.e. in the DSL of the jOOQ plugin. ### Gradle Groovy DSL ```groovy buildscript { configurations['classpath'].resolutionStrategy.eachDependency { - if (requested.group == 'org.jooq') { + if (requested.group.startsWith('org.jooq') && requested.name.startsWith('jooq')) { useVersion '3.17.3' } } @@ -153,7 +155,7 @@ buildscript { ```kotlin buildscript { configurations["classpath"].resolutionStrategy.eachDependency { - if (requested.group == "org.jooq") { + if (requested.group.startsWith("org.jooq") && requested.name.startsWith("jooq")) { useVersion("3.17.3") } } diff --git a/example/specify_jooq_config_xml_schema_version/build.gradle b/example/specify_jooq_config_xml_schema_version/build.gradle index a6baf880..adb085ce 100644 --- a/example/specify_jooq_config_xml_schema_version/build.gradle +++ b/example/specify_jooq_config_xml_schema_version/build.gradle @@ -1,6 +1,6 @@ buildscript { configurations['classpath'].resolutionStrategy.eachDependency { - if (requested.group == 'org.jooq') { + if (requested.group.startsWith('org.jooq') && requested.name.startsWith('jooq')) { // set jOOQ version used at configuration time to enforce a specific jOOQ config XML schema version useVersion '3.16.1' }