Closed bernatpl closed 7 years ago
Try 3.0.0-SNAPSHOT version. This version supports 4.x Gradle versions.
This seems to be unrelated to the previous issues with Gradle 4.x, since I'm also facing a similar issue when updating Gradle to either 4.2 or 4.2.1 and using the plugin's latest SNAPSHOT:
> Exception thrown while executing model rule: PublishingPlugin.Rules#publishing(ExtensionContainer)
> No such property: FOR_RUNTIME for class: org.gradle.api.attributes.Usage
(...)
Caused by: groovy.lang.MissingPropertyException: No such property: FOR_RUNTIME for class: org.gradle.api.attributes.Usage
at digital.wup.android_maven_publish.AndroidVariantLibrary$RuntimeUsage.getUsage(AndroidVariantLibrary.groovy:93)
The constants FOR_COMPILE
and FOR_RUNTIME
have been removed in Gradle 4.2 (compare the Javadocs for 4.1 and 4.2). This commit is responsible for the change, and gives more insight into the reasoning behind the removal.
It seems to be working in version 3.1.0-SNAPSHOT using Gradle 4.2 and 4.2.1 Thank you for the fix.
Thanks for your response. I will make a release at weekend.
Using the latest SNAPSHOT works for me as well. Thank you for the quick response! Looking forward to the release.
Not working with Gradle 4.2.
FAILURE:
No such property: FOR_COMPILE for class: org.gradle.api.attributes.Usage
(Using android-maven-publish version 2.0.0)