在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):adwiv/android-fat-aar开源软件地址(OpenSource Url):https://github.com/adwiv/android-fat-aar开源编程语言(OpenSource Language):开源软件介绍(OpenSource Introduction):Current StatusI am no longer involved in development, so am not able to maintain or provide bug fixes or even test the pull requests. It would be great if someone who actually is using this project in their library and can actively maintain the repo, become part of/take it over. Meanwhile, you can also check fat-aar-plugin which is trying to solve the same problem using a plugin. android-fat-aarGradle script that allows you to merge and embed dependencies in generated aar file. In this Fork you can find a fixed version who will also work with embedded .aar files ! Credits jksiezni suggested an alternate way to embed R files which fixes ugly internal proguard hack. jonbryantnz suggested method to embed java projects. Why do I need is a fat AAR? There may be multiple reasons for wanting this. My reason was that I wanted to publish a single library while maintaining a modular structure within the project. The benefit of a fat aar file is that we can proguard the combined code instead of proguarding each and every subproject which is not that effective. What doesn't work?
Step 1: Apply the gradle file To use this simply copy the gradle file 'fat-aar.gradle' to your project directory and then
or apply directly from the url
Step 2: Define the embedded dependencies Then you can modify the dependencies section and change the word
The dependencies with keyword Step 3: Remove embedded dependencies from exported dependency list Now that you have embedded your sub projects into the main library, you need to ensure that anyone using your library does not resolve the embedded projects as transitive dependencies. Otherwise he will get duplicate class errors. If you are using the fat library within the same project (maybe within a test app?), then you can simply define your fat-library dependency as non transitive.
For external clients or use in another project; this can be achieved by removing these dependencies from the
generated pom.xml file. How to automate that will depend on how you are generating the pom file. I use
The complete Hope this helps. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论