Caleb Cushing
02/22/2024, 12:59 AMGRADLE_PUBLISH_KEY="a" GRADLE_PUBLISH_SECRET="a" ./gradlew publishPlugins --validate-only
Calculating task graph as no cached configuration is available for tasks: publishPlugins --validate-only
Maven publication 'pluginMaven' pom metadata warnings (silence with 'suppressPomMetadataWarningsFor(variant)'):
- Variant apiElements:
- contains dependencies that will produce a pom file that cannot be consumed by a Maven client.
- org.jspecify:jspecify:0.+ declared with a Maven incompatible version notation
- org.semver4j:semver4j:5.+ declared with a Maven incompatible version notation
I'd do
versionMapping {
allVariants {
fromResolutionResult()
}
}
but that's not availble in the gradle publish pluginVampire
02/22/2024, 1:52 AM[0.0,)
and [5.0,)
, while again publishing dependencies on version ranges is not really good practice.
3.
Use what you just said.
The Plugin Publishing plugin auto-applies the maven-publish
plugin since its version 1.0.0 and you just use the normal ways to interact with it like you showed.Caleb Cushing
02/22/2024, 1:53 AMCaleb Cushing
02/22/2024, 1:54 AMVampire
02/22/2024, 1:57 AMCaleb Cushing
02/22/2024, 2:03 AMVampire
02/22/2024, 2:05 AMpluginMaven
publication that the Java Gradle Plugin plugin added for you.Caleb Cushing
02/22/2024, 2:05 AMVampire
02/22/2024, 2:05 AMVampire
02/22/2024, 2:06 AMCaleb Cushing
02/22/2024, 2:09 AMVampire
02/22/2024, 2:10 AMCaleb Cushing
02/22/2024, 2:11 AMVampire
02/22/2024, 2:23 AMwithType<MavenPublication>().matching { it.name == "pluginMaven" }.configureEach {
// ...
}
instead of named
Caleb Cushing
02/22/2024, 2:25 AM