Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongcang committed Nov 15, 2017
2 parents 703f192 + d0c85e6 commit 93eceb2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions atlas-gradle-plugin/atlas-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ tasks.findByName("test").enabled=false
dependencies {
compile localGroovy()
compile gradleApi()
compile "com.taobao.android:dex_patch:1.4.4.6-SNAPSHOT"
compile "com.taobao.android:dex_patch:1.4.4.8"
compile "com.android.tools.build:gradle:2.3.3"
compile "org.apache.commons:commons-lang3:3.4"
compile "commons-lang:commons-lang:2.6"
Expand All @@ -246,4 +246,4 @@ dependencies {
}


version = '2.3.3.rc34-SNAPSHOT'
version = '2.3.3.rc35-SNAPSHOT'
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public Boolean call() throws Exception {
outDex.getParentFile().mkdirs();
}
DexDiffInfo dexDiffInfo = tPatchDexTool.createPatchDex(outDex);
for (String className:dexDiffInfo.getClassDiffInfoMap().keySet()){
System.out.println("modify class:"+className);
}

} catch (IOException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ private BaseInput createInput(ApkBO apkBO, ApkBO newApkBO, boolean retainMainBun
if (tpatchInput instanceof HotPatchInput){
((HotPatchInput) tpatchInput).hotClassListFile = patchContext.hotClassListFile;
((HotPatchInput) tpatchInput).patchType = PatchType.HOTFIX;
((HotPatchInput)tpatchInput).excludeClasses = patchContext.excludeClasses;

}else {
tpatchInput.patchType = PatchType.DEXPATCH;
((DexPatchInput)tpatchInput).excludeClasses = patchContext.excludeClasses;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,20 +238,20 @@ public boolean addDex(Dex dex) {
int ms = dex.getTableOfContents().methodIds.size;
int fs = dex.getTableOfContents().fieldIds.size;

Set<String> newstrings = new HashSet<>(strings);
newstrings.addAll(dex.strings());
// Set<String> newstrings = new HashSet<>(strings);
// newstrings.addAll(dex.strings());

if (fs >= MAX_FIELD_IDS) {
throw new DexIndexOverflowException("field ID not in [0, 0xffff]: " + fs);
}
if (methods + ms >= (firstDex ? MAX_METHOD_IDS_FIRSTDEX : MAX_METHOD_IDS) || fields + fs >= MAX_FIELD_IDS || newstrings.size() >= MAX_FIELD_IDS) {
if (methods + ms >= (firstDex ? MAX_METHOD_IDS_FIRSTDEX : MAX_METHOD_IDS) || fields + fs >= MAX_FIELD_IDS /*|| newstrings.size() >= MAX_FIELD_IDS*/) {
return false;
}

dexs.add(dex);
methods += ms;
fields += fs;
strings = newstrings;
// strings = newstrings;

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion atlas-gradle-plugin/dexpatch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ dependencies {

group 'com.taobao.android'

version "1.4.4.6-SNAPSHOT"
version "1.4.4.8"

Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public File createBundleDexPatch(File newApkUnzipFolder,
DEFAULT_API_LEVEL,
null,
mainDex);
dexTool.setExculdeClasses(((HotPatchInput)input).excludeClasses);
dexTool.setPatchClassList(hotClassList);
DexDiffInfo dexDiffInfo = dexTool.createPatchDex(dexDiffFile);
if (dexDiffFile.exists()) {
Expand Down
4 changes: 2 additions & 2 deletions atlas-gradle-plugin/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//include 'atlas-plugin'
include 'dexpatch'
include 'atlas-plugin'
//include 'dexpatch'

//include 'aapt'
//include 'dexpatch'
Expand Down

0 comments on commit 93eceb2

Please sign in to comment.