-
Notifications
You must be signed in to change notification settings - Fork 211
Error with Gradle 3.4-rc-2: o.g.internal.component.Usage was renamed to UsageContext #112
Comments
thanks for the heads up! |
What's the reason for creating an implementation for |
TL;DR: the problem we’re facing with the plugin is not easy to solve. The solution pointed out above is just not applicable (more below). The only feasible approach we found so far is to:
Long story:The plugin we produced does 2 things:
Point 2) is where the pain starts: we need to create a pom file listing all the dependencies of the library, but given there is no support out of the box in the maven plugin then we had to implement this ourselves. The public API we can use for this is called Unfortunately we can’t use the So basically we HAVE to implement the internal API if we want to publish something via the maven plugin and there is no workaround for that because the Android plugin is not exposing any Am I missing something obvious @bmuschko? PS: Sorry for the late reply, I looked into this few weeks ago but then forgot to follow-up. |
@mr-archano In a nutshell this is what I was thinking in terms of using a public API while fulfilling your requirements:
Keep in mind that the code I provided would have to be adapted a bit in your binary plugin.
|
Thanks @bmuschko, I will take a look at this and let you know how it goes. |
I already got it working this way but it felt wrong. I'm basically manually adding nodes to the pom XML and have to duplicate a lot of code which is already there (but internal).
I think it's harder to maintain than to adjust the internal based implementation from time to time. Offtopic: My new favourite class is |
@passsy I created an issue to address the problem. The appropriate solution should expose a public API for declaring a publishable software component without the need of using an internal API.
Keep in mind that you'll be breaking backward compatibility for your plugin. Users will have to use 3.4 in order to consume it. That might or might not be acceptable for your user base. |
This should have been fixed in 0.5.0. |
Using
bintry-release
in acom.android.library
project with Gradle 3.4-rc-2 fails with the following exception:The cause for this is that
Usage
was renamed toUsageContext
.To avoid such problems in the future, I created an issue to discuss public API for publishing in Gradle, as we seem to miss something in this area. Please add your thoughts on the topic here: gradle/gradle#1361
The text was updated successfully, but these errors were encountered: