Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error apkOrDex can't be serialized. #32

Merged
merged 1 commit into from
Nov 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DexMethodCountPlugin implements Plugin<Project> {
def ext = project.extensions['dexcount']

DexMethodCountTask task = project.tasks.create("count${slug}DexMethods", DexMethodCountTask)
task.apkOrDex = output
task.apkOrDexFile = output.outputFile
task.mappingFile = variant.mappingFile
task.outputFile = project.file(path + '.txt')
task.summaryFile = project.file(path + '.csv')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DexMethodCountTask extends DefaultTask {
def PackageTree tree;

@Input
def BaseVariantOutput apkOrDex
def File apkOrDexFile

@Nullable
def File mappingFile
Expand All @@ -60,7 +60,7 @@ class DexMethodCountTask extends DefaultTask {
* @return
*/
def printSummary() {
def filename = apkOrDex.outputFile.name
def filename = apkOrDexFile.name
withStyledOutput(StyledTextOutput.Style.Info) { out ->
out.println("Total methods in ${filename}: ${tree.methodCount}")
out.println("Total fields in ${filename}: ${tree.fieldCount}")
Expand Down Expand Up @@ -139,7 +139,7 @@ class DexMethodCountTask extends DefaultTask {
// If none is given, we'll get a default mapping.
def deobs = getDeobfuscator()

def dataList = DexFile.extractDexData(apkOrDex.outputFile)
def dataList = DexFile.extractDexData(apkOrDexFile)
try {
tree = new PackageTree()

Expand Down