Skip to content

Commit 1775b31

Browse files
author
tangxiaolv
committed
更新插件
1 parent b3e8eac commit 1775b31

File tree

7 files changed

+5
-50
lines changed

7 files changed

+5
-50
lines changed

DexKnifePlugin/app/build.gradle

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,6 @@ android {
2626
}
2727
}
2828

29-
// productFlavors {
30-
// flavor1 {
31-
// versionCode 20
32-
// }
33-
//
34-
// flavor2 {
35-
// minSdkVersion 14
36-
// multiDexEnabled false
37-
// }
38-
// }
39-
4029
packagingOptions {
4130
exclude ".readme"
4231
}
@@ -51,39 +40,4 @@ dependencies {
5140
}
5241

5342
// 要放到第二个dex中的包名前缀 second_dex_package_list.txt
54-
// Set the prefix of package's path in second_dex_package_list.txt
55-
/*project.afterEvaluate {
56-
File file = project.file(DexSplitTools.DEX_KNIFE_CFG_TXT)
57-
if (file != null) {
58-
def justActivitys = [];
59-
file.eachLine { line ->
60-
//printf "read line ${line}\n";
61-
if (line.startsWith('-just activity')) {
62-
line = line.replaceAll('-just activity', '').trim();
63-
justActivitys.add(line)
64-
}
65-
}
66-
printf "-just activity size = ${justActivitys.size()}\n";
67-
if (justActivitys.size() != 0) {
68-
project.tasks.each { task ->
69-
if (task.name.startsWith('collect') && task.name.endsWith('MultiDexComponents')) {
70-
println "main-dex-filter: found task $task.name"
71-
task.filter { name, attrs ->
72-
String componentName = attrs.get('android:name')
73-
if ('activity'.equals(name)) {
74-
def result = justActivitys.find {
75-
componentName.endsWith("${it}")
76-
}
77-
def bool = result != null;
78-
if (!bool) {
79-
printf "main-dex-filter: skipping ${componentName}\n"
80-
}
81-
return bool
82-
}
83-
return true
84-
}
85-
}
86-
}
87-
}
88-
}
89-
}*/
43+
// Set the prefix of package's path in second_dex_package_list.txt

DexKnifePlugin/app/dexknife.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#-----------附加类-----------
88
# 如果你想要某个包路径在maindex中,则使用 -keep 选项,即使他已经在分包的路径中.若为空,默认保留所有
9+
#-keep com.ceabie.demo.**
910

1011
# 保留单个类.
1112
#-keep android.support.v7.app.AppCompatDialogFragment.class

DexKnifePlugin/app/maindexlist.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
rx/annotations/Beta.class
2-
rx/annotations/Experimental.class
31
rx/android/concurrency/AndroidSchedulers.class
42
rx/android/concurrency/HandlerThreadScheduler.class
3+
rx/annotations/Beta.class
4+
rx/annotations/Experimental.class
55
android/support/annotation/StyleableRes.class
66
android/support/annotation/IntDef.class
77
android/support/annotation/AnyRes.class
@@ -134,6 +134,7 @@ android/support/v4/app/ActivityCompatHoneycomb.class
134134
android/support/v7/appcompat/R$styleable.class
135135
android/support/v7/appcompat/R.class
136136
com/ceabie/demo/AppApplication.class
137+
com/ceabie/demo/FirstActivity.class
137138
com/ceabie/demo/MainActivity$1.class
138139
com/ceabie/demo/MainActivity.class
139140
demo/ceabie/com/demo/R$id.class

DexKnifePlugin/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ buildscript {
77

88
dependencies {
99
classpath 'com.android.tools.build:gradle:2.1.2'
10-
// classpath 'com.ceabie.dextools:gradle-dexknife-plugin:1.5.2'
1110
classpath 'com.ceabie.dextools:gradle-dexknife-plugin:2.0.0'
1211
}
1312
}

DexKnifePlugin/repo/com/分包插件.txt

Whitespace-only changes.

DexKnifePlugin/repo/本地仓库.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)