Skip to content

Commit 69973b5

Browse files
committed
Do not change the support multidex version, fix wequick#456
1 parent 26a3529 commit 69973b5

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Android/DevSample/buildSrc/src/main/groovy/net/wequick/gradle/RootPlugin.groovy

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ class RootPlugin extends BasePlugin {
170170
def cfg = p.configurations.compile
171171
def supportDependencies = []
172172
cfg.dependencies.each { d ->
173-
if (d.group == 'com.android.support' && d.version != sv) {
174-
supportDependencies.add(d)
175-
}
173+
if (d.group != 'com.android.support') return
174+
if (d.name == 'multidex') return
175+
if (d.version == sv) return
176+
177+
supportDependencies.add(d)
176178
}
177179
cfg.dependencies.removeAll(supportDependencies)
178180
supportDependencies.each { d ->
@@ -338,7 +340,7 @@ class RootPlugin extends BasePlugin {
338340
}
339341
def cfg = p.configurations.compile
340342
def supportLib = cfg.dependencies.find { d ->
341-
d.group == 'com.android.support'
343+
d.group == 'com.android.support' && d.name != 'multidex'
342344
}
343345
def supportVer = supportLib != null ? supportLib.version : ''
344346
return [sdk: sdk,

0 commit comments

Comments
 (0)