The gradle docs don't take the time to explain the entities they are dealing with. That's why I want to ask such a basic question.
I've got a to understand in detail, what the terms group, module and artifact really mean to alter this code:
compile('com.thoughtworks.xstream:xstream:1.4.7') {
exclude group: 'xmlpull', module: 'xmlpull'
}
About a year ago I used that exclude statement I took from Android dalvik conversion for xmlpullparser to fix a Multiple dex files failure.
However, after upgrading to Android Studio 3.0 that error occurrs again! Now it says: Multiple dex files define Lorg/xmlpull/mxp1/MXParser
and sometimes ...XmlPullParserException.java
So, id like to understand how the parameters I give exclude
must be shaped.
Reading the documentation one could think a group is the package name and the artifact is the class:
//excluding a particular transitive dependency:
exclude module: 'cglib' //by artifact name
exclude group: 'org.jmock' //by group
exclude group: 'org.unwanted', module: 'iAmBuggy' //by both name and group
Another chinese page (translated) used those excludes
compile ( 'com.thoughtworks.xstream: xstream: 1.4.7' ) {
exclude group : 'xmlpull'
exclude group : 'XmlPullParser'
}
Built on that findings wonder
- how
xmlpull
worked when the package name begins withorg.xmlpull
? - what projects those terms refer to in my scenario. Where was the group name defined?
- What kinda group is
XmlPullParser
? - Must I clean, rebuild or just build the project after altering those parameters? Because sometimes it complains about different files.