File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import groovy.json.JsonSlurper
20
20
import java.nio.file.Paths
21
+ import java.util.regex.Matcher
22
+ import java.util.regex.Pattern
21
23
22
24
apply plugin : " com.android.application"
23
25
@@ -403,12 +405,20 @@ task extractAllJars {
403
405
outputs. dir extractedDependenciesDir
404
406
405
407
doLast {
406
- def iter;
407
- if (project. selectedBuildType == " release" ) {
408
- iter = configurations. releaseCompileClasspath. resolve()
409
- } else {
410
- iter = configurations. debugCompileClasspath. resolve()
408
+ def buildType = project. selectedBuildType == " release" ? " Release" : " Debug"
409
+ def iter = []
410
+ Pattern pattern = Pattern . compile(" ^(.+)${ buildType} CompileClasspath\$ " )
411
+ configurations. all{ config ->
412
+ Matcher matcher = pattern. matcher(config. name)
413
+ if (matcher. find() || config. name == " ${ buildType.toLowerCase()} CompileClasspath" ) {
414
+ config. resolve(). each {
415
+ if (! iter. contains(it)) {
416
+ iter. push(it)
417
+ }
418
+ }
419
+ }
411
420
}
421
+
412
422
def dependencyCounter = 0
413
423
iter. each {
414
424
def nextDependency = it
You can’t perform that action at this time.
0 commit comments