File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
plugin/src/main/groovy/top/niunaijun/blackobfuscator Expand file tree Collapse file tree 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> {
5151 addTask(" minifyDebugWithR8" , tasks)
5252
5353 List<String > buildTypes = new ArrayList<> ()
54+ List<String > productFlavors = new ArrayList<> ()
5455 if (android != null ) {
5556 android. applicationVariants. all(new Action<ApplicationVariant > () {
5657 @Override
@@ -63,13 +64,18 @@ public class ObfPlugin implements Plugin<Project> {
6364 @Override
6465 void execute (ProductFlavor productFlavor ) {
6566 def name = upperCaseFirst(productFlavor. name)
66- for (String buildType : buildTypes) {
67- addOtherTask(tasks, name, buildType)
68- }
67+ productFlavors. add(name)
6968 }
7069 })
7170 }
7271
72+ for (String buildType : buildTypes) {
73+ for (String product : productFlavors) {
74+ addOtherTask(tasks, product, buildType)
75+ }
76+ addOtherTask(tasks, " " , buildType)
77+ }
78+
7379 for (Task task : tasks) {
7480 task. doLast(action)
7581 }
You can’t perform that action at this time.
0 commit comments