-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish aar correctly #696
Comments
Hey @Sloy! Thanks for the info. I'm trying to assess the path forward, so I want to gather some more details.
Reading this, makes me think that you are not currently blocked. Is that right? Additionally, any reason why you think including the Proguard config in your own project is not an ideal solution? |
That's correct, we are not currently blocked by this. I don't think manually maintaining the Proguard config from third-party libraries in our projects is an ideal solution, is a solution. If we didn't have a mechanism for importing Proguard configurations from libraries, as it happened some years ago, that would be the only solution for sure. We would copy the Proguard configuration from the library readme, and make sure to check for any changes every time a new version is released, so we can manually update the configuration. Or have people excluding everything in their app (as I've seen many times) because they don't have the time to deal with Proguard errors. Now that we have an automated mechanism, I think it's on the best interest of everyone that the libraries takes care of the Proguard config, so consumers don't need to deal with the issues above. Just like we have transitive dependencies with maven/gradle so consumers don't need to maintain the dependencies from each library. I remember Android development before Gradle, and it wasn't pretty 😂. If the Sorry, I got a bit philosophical there! I hope that was the answer you were looking for. |
Yup thats exactly what i was looking for. TYSM for the detailed explanation :). I don't want to make any promises about the timeline, since we are currently busy with other features/priorities and will have to punt this issue to sometime later. I have created an internal JIRA ticket so that it gets prioritized accordingly. |
Thank you @prayansh |
@Sloy i recently did some rework on our publication process, fixing the pom property issue. The newest version |
Hello @prayansh! Thank you a lot for getting back to me. The file list in Maven Repository looks promising :) |
I couldn't break the Again, thanks for taking care of this! ❤️ |
We updated our Segment dependency to the 4.8.0 version, which includes the fix for #668. However, it's not working. We just realized that the Segment dependency imports the
jar
file (java only) instead of theaar
file (java + android) which includes the Proguard configuration.Apparently there's some issue with the maven publication, and it's not generating the
pom.xml
file correctly. It's missing the<packaging>aar</packaging>
declaration.For comparison, here is the Segment SDK pom.xml, and here is another one with the proper configuration.
We believe this could be fixed by updating the publishing Gradle configuration. Right now Segment is using the old deprecated
maven
plugin. (See https://github.com/segmentio/analytics-android/blob/master/gradle/gradle-mvn-push.gradle#L17). The Android Gradle Plugin now officially supports the newmaven-publish
plugin. More info in https://developer.android.com/studio/build/maven-publish-pluginAs a workaround, we tried to import the SDK dependency as
implementation("com.segment.analytics.android:analytics:4.8.2@aar")
, but this causes errors with other transitive dependencies, as Gradle thinks it's a completely different dependency. So right now we're back to adding the Proguard configuration in our own project.The text was updated successfully, but these errors were encountered: