Skip to content

Commit

Permalink
immutable dex (Tencent#251)
Browse files Browse the repository at this point in the history
[enhancement]  add immutable dex feature
  • Loading branch information
farmerjohngit authored and shwenzhang committed Dec 14, 2016
1 parent e7b826d commit 9dc9a30
Show file tree
Hide file tree
Showing 7 changed files with 653 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ class TinkerPatchPlugin implements Plugin<Project> {
}
}

if (project.tinkerPatch.dex.immutable) {
com.tencent.tinker.build.gradle.transform.ImmutableDexTransform.inject(project, variant)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public class TinkerDexExtension {
* such as [com.tencent.tinker.loader.*, com.tinker.sample.MyApplication]
*/
Iterable<String> loader;

/**
* if immutable is true,class in which dex refer to the old apk.
* open this can reduce the dex diff file size.
*/
boolean immutable = true


private Project project;

public TinkerDexExtension(Project project) {
Expand Down
Loading

0 comments on commit 9dc9a30

Please sign in to comment.