【发布时间】:2023-03-09 08:19:01
【问题描述】:
我目前已经在 maven Central 上发布了库。该库是android库.aar项目。
问题是当前库需要拆分为多个库,同时维护当前发布的库 artifactId 以实现向后兼容性。这是我所拥有的以及我正在努力实现的示例。
当前工件 ID
compile 'com.example:my-library:1.0.0'
新的 artifactId
compile 'com.example:my-library-core:1.0.0'
compile 'com.example:my-library-deps-1:1.0.0'
compile 'com.example:my-library-deps-2:1.0.0'
compile 'com.example:my-library:1.0.0' (with deps)
--> compile 'com.example:my-library-core:1.0.0'
--> compile 'com.example:my-library-deps-1:1.0.0'
--> compile 'com.example:my-library-deps-2:1.0.0'
所以基本上这个想法是保留原始的com.example:my-library maven artifactId,它只依赖于 3 个新创建的库,以支持老客户的向后兼容性。
现在我尝试在本地创建一个没有工件且仅具有依赖项的 pom 文件,但由于某种原因,gradle 不会从依赖项中提取工件。
【问题讨论】:
标签: android maven gradle android-library aar