Comments (13)
插件中有个过滤包的任务createExclueAarTask 啥的你可以再gradle task列表中找到, 你用指定的任务dependsOn 它就行了
from excludeaar.
有的,只是我在重构用kotlin写的插件中隐藏掉了,为了方便接入使用变成了自动调用了,但是你还是可以在groovy代码中找到它。
from excludeaar.
from excludeaar.
from excludeaar.
这里还是有些疑问:“用指定的任务dependsOn 它就行了”。这个是说需要在主module的build.gradle那里创建个Task,然后先 dependsOn 它,然后再替换掉
excludePluginExt { autoDependencies = true //是否自动依赖即是否依赖过滤之后的架包 aars { GDTSDK_unionNormal { //过滤架包的名称 path "/libs/exclude/XXX_sdk_v3.1.8.aar" //架包的路径 excludePackages 'com.qq.e' //过滤的包名 } } }
这里面的 'com.qq.e' //过滤的包名 ?
from excludeaar.
你可以创建一个Task 检查出哪些是需要过滤的文件,然后修改过滤配置再执行过滤任务
from excludeaar.
是的,我现在就卡在这里了。。 /手动狗头 我目前的想法是:创建一个Task 检查出哪些是需要过滤的文件,然后用 那些包名去替换掉
excludePluginExt { autoDependencies = true //是否自动依赖即是否依赖过滤之后的架包 aars { GDTSDK_unionNormal { //过滤架包的名称 path "/libs/exclude/XXX_sdk_v3.1.8.aar" //架包的路径 excludePackages **'com.qq.e'** //过滤的包名 } } }
这里面的 'com.qq.e',从而达到想要的结果。只是目前 对 groovy不熟,不知道怎么下手。。
from excludeaar.
我再研究下 怎么在Task中实现过滤文件的逻辑。。
from excludeaar.
你可以看下https://github.com/Siy-Wu/ExcludeAar/blob/master/libraries/library-exclude-aar/excludeAar.gradle 地方应该可以给你一下啊思路,实在不了解可以用Java写的,groovy文件中可以写Java代码
from excludeaar.
嗯,我先试试,谢谢了哈。
from excludeaar.
还有就是:资源冲突的话,有好的解决方案吗?主module跟引入的aar或者aar跟aar之间的资源冲突
from excludeaar.
可以扫面aar文件的R文件找出冲突的资源,但是我也没有好办法做修改,因为可能aar程序中可能会有引用到
from excludeaar.
大佬,可以帮忙实现下或者提供关键代码吗?检查出哪些是需要过滤的文件这块我搞了一天了还是没搞出来。。。我参考了这篇博客的去搞的。
from excludeaar.
Related Issues (20)
- aar的使用方式是否需要修改 HOT 1
- 构建时合并AndroidManifest.xml出现org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容 HOT 4
- 运行demo必须是studio版本3.5以上吗 HOT 33
- 不支持mac吗? HOT 2
- demo看不懂?怎么才能运行 HOT 1
- 编译不过
- 可以编译一个低版本gradle的包吗,你的gradle版本有点高 HOT 1
- 执行任务后,aar里面要过滤的包名是没看到了,但是点击as “运行”按钮,出现:Duplicate class cn.sirius.nga.BuildConfig found in modules jetified-exclude_GDTSDK_unionNormal-runtime.jar (exclude_GDTSDK_unionNormal.aar) and jetified-XXX_sdk_v3.1.0-runtime.jar (:XXX_sdk_v3.1.0:) HOT 9
- 需要导出为aar的library中需要导入另外的aar,应该如何配置? HOT 3
- platform update
- 请问一下大佬,java.lang.NoClassDefFoundError 该怎么办 HOT 3
- 内部类好像去不掉 HOT 1
- 支持过滤aar里面res里面的文件吗? HOT 1
- 路径文件不存在
- jcenter不是要关闭服务了嘛?您可以换个仓库吗?
- 执行任务报错
- 请问下如果不想使用NamedDomainObjectContainer HOT 1
- 报错 Cannot add task 'unZip_jar_libchips' as a task with that name already exists.
- Task 'excludeAar_BaiduLBS_Android_debug' not found in root project 'ExcludeAar'.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from excludeaar.