admin管理员组文章数量:1388760
I am using an AAR library in my Android project, and I need to extract the version of this library dynamically inside build.gradle.kts and inject it into BuildConfig.
Approaches tried
Accessing BuildConfig of the AAR Library I tried accessing the BuildConfig file inside the AAR library.
Issue: BuildConfig is generated per module and isn’t available at Gradle build time.
I attempted to extract the library version from configurations.implementation.
Issue: implementation dependencies are marked as canBeResolved=false, meaning they cannot be directly queried.
Running gradle app:dependencies prints all installed dependencies along with their versions.
Issue: While the version is displayed in the console, I couldn't find a way to access it programmatically inside build.gradle.kts.
Any help would be appreciated
本文标签: androidHow to Access the Version of an Installed AAR Library in buildgradlektsStack Overflow
版权声明:本文标题:android - How to Access the Version of an Installed AAR Library in build.gradle.kts? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744565867a2613042.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论