Use the GRADLE_PLUGIN_API_VERSION_ATTRIBUTE to set the required minim…#498
Use the GRADLE_PLUGIN_API_VERSION_ATTRIBUTE to set the required minim…#498JakeWharton merged 1 commit intocashapp:trunkfrom
Conversation
…um version of Gradle. It available since 7.0, but Gradle 8.7 improved the error message: gradle/gradle#24609
|
Just FYI this doesn't actually validate/show the message when using an unsupported Gradle version as Gradle selects the |
|
Gradle consumes both resolvable configurations and validates both of them. Let me add a test. We also use api to fail compilation of consumers of the licensee plugin as a regular library (when creating a new plugin on top of it). |
|
I can use Licensee 1.14.1 with Gradle 8.9 and get no errors, even though it declares a minimum version of 8.12. |
|
@DennisTsar Sorry, you are right: https://docs.gradle.org/current/userguide/java_library_plugin.html#consumable_configurations The apiElements only contains the I added a test and also fixed it: #542 |
|
I'm not sure if it's a Gradle bug, but even setting the attribute on both |
|
I do get the correct (and minified) error message using I only added A java library only has 4 variants by default: apiElements, runtimeElements, sources and javadoc. The latter two do not require the gradle version attributes. |
|
I believe that's the old error message? The new one is
|
|
Yeah, true... IMHO this is a bug at Gradle, there is no need to validate the sources or javadoc variants. |
…um version of Gradle.
It available since 7.0, but Gradle 8.7 improved the error message: gradle/gradle#24609
CHANGELOG.md's "Unreleased" section has been updated, if applicable.