Invalid MavenPublish Configuration. Unable to find variant to publish named release. Try setting the 'androidVariantToPublish' property in the mavenPublish extension object to something that matches the variant that ought to be published.
See original GitHub issueGradle 7.0 Plugin 0.15.1 AGP 4.1.3
- What went wrong: Invalid MavenPublish Configuration. Unable to find variant to publish named release. Try setting the ‘androidVariantToPublish’ property in the mavenPublish extension object to something that matches the variant that ought to be published.
This error is gotten when using the base plugin:
mavenPublishing {
configure(com.vanniktech.maven.publish.AndroidLibrary(com.vanniktech.maven.publish.JavadocJar.Javadoc()))
}
the default variant is already release
so I’d say it’d not be necessary nothing else other than the basic configuration in the base plugin right, pom
, signAllPublications
and configure
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Is MavenPublishPlugin running too early? #131 - GitHub
The error is caused by this line. It looks like it is trying to configure the publish plugin before the variants / components...
Read more >How to publish all flavor variants to maven with Android ...
I am facing a similar problem. Although I don't use productFlavors , I am expecting mavenDeployer to publish three configurations ...
Read more >MavenPublication - Gradle DSL Version 7.6
A MavenPublication is the representation/configuration of how Gradle should publish something in Maven format. You directly add a named Maven Publication ...
Read more >Support maven-publish plugin [37055147] - Visible to Public
Publishing only a release variant causes gradle sync to fail on the consumer without even showing why (they have to execute a gradle...
Read more >Configure publication variants | Android Developers
If you use a POM file, you can publish additional artifacts using classifiers, but the additional artifacts can't have their own dependencies.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marandaneto I had the same issue, using
aferevaluate
fixes this issue.Hi @gabrielittner
Same issue for me 😦 Can u tell me when the next release will be publish?
Regards,