This message was deleted.
# android
s
This message was deleted.
s
This is AGP 4.2.2 so unfortunately not the latest 😕
n
Here is a 4.2 sample on how to get the apks: https://github.com/android/gradle-recipes/tree/agp-4.2/BuildSrc/getApksTest Does that help?
s
found it..I can depend on
variant.getPackageLibraryProvider()
oh , did not consider checking out this repo..checking for the link.
also while I can see the above api in 4.2.2 , it’s not present in the documentation at https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/LibraryVariant
I see an example using
androidComponents
at https://github.com/android/gradle-recipes/blob/agp-4.2/Kotlin/getAarTest/lib/build.gradle.kts#L34. However I’m not sure if this requires the library to also declare publications using this extension.
x
I would recommend to move to 7.1 and use the new DSL for publication. See this whole section on our doc.
s
Yes , that’s the plan 🙂 . We have begun the process of migrating to the newer versions , but have multiple apps and sdks internally so I’d have to support both plugin variants for a while till that happens.
Just setup publishing with AGP 7.2. Spent a lot more time undoing a lot of custom code that was required for publishing in previous versions. Using GMM instead of the maven POM also helped in setting up transitive dependency versions for different libraries. This makes publishing and consuming way more easier than before 🙂