Skip to content

Commit

Permalink
Fix the explodedAar getter
Browse files Browse the repository at this point in the history
  • Loading branch information
galenlin committed Mar 19, 2017
1 parent 7db5460 commit 1f0daeb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
6 changes: 6 additions & 0 deletions Android/DevSample/buildSrc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.1.0 (2017-03-19)

Features:

- 兼容 Android Plugin 2.3.0 (@xufun)

## 1.1.0-alpha2 (2017-02-25)

Features:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,13 @@ package net.wequick.gradle.util

import com.android.build.gradle.internal.tasks.PrepareLibraryTask

import java.lang.reflect.Field

public class TaskUtils {

public static File getAarExplodedDir(PrepareLibraryTask task) {
if (task.hasProperty('explodedDir')) {
return task.explodedDir
}

File version = task.bundle.parentFile
File name = version.parentFile
File module = name.parentFile
String dir = "$module.name/$version.name/$name.name"
while (module.parentFile != null && module.parentFile.name != 'm2repository') {
module = module.parentFile
dir = module.name + "." + dir
}

return new File(task.project.buildDir, "intermediates/exploded-aar/$dir")
return task.outputs.getFiles().files[0]
}
}

0 comments on commit 1f0daeb

Please sign in to comment.