File tree 1 file changed +9
-3
lines changed
plugin/src/main/groovy/top/niunaijun/blackobfuscator
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ public class ObfPlugin implements Plugin<Project> {
51
51
addTask(" minifyDebugWithR8" , tasks)
52
52
53
53
List<String > buildTypes = new ArrayList<> ()
54
+ List<String > productFlavors = new ArrayList<> ()
54
55
if (android != null ) {
55
56
android. applicationVariants. all(new Action<ApplicationVariant > () {
56
57
@Override
@@ -63,13 +64,18 @@ public class ObfPlugin implements Plugin<Project> {
63
64
@Override
64
65
void execute (ProductFlavor productFlavor ) {
65
66
def name = upperCaseFirst(productFlavor. name)
66
- for (String buildType : buildTypes) {
67
- addOtherTask(tasks, name, buildType)
68
- }
67
+ productFlavors. add(name)
69
68
}
70
69
})
71
70
}
72
71
72
+ for (String buildType : buildTypes) {
73
+ for (String product : productFlavors) {
74
+ addOtherTask(tasks, product, buildType)
75
+ }
76
+ addOtherTask(tasks, " " , buildType)
77
+ }
78
+
73
79
for (Task task : tasks) {
74
80
task. doLast(action)
75
81
}
You can’t perform that action at this time.
0 commit comments