Skip to content

Commit d832435

Browse files
authored
Update plugin.gradle
1 parent 649de24 commit d832435

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

FairyPlugin/agp7_2_0/plugin.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ gradle.startParameter.taskNames.each { startTaskName ->
4747
hostDependencies = hostBarRootDir + "debug" + "/" + hostDependencyFile
4848
currentSelectedBar = hostBarRootDir + "debug" + "/" + hostBar
4949
} else if (startTaskName.contains("Release")) {
50-
hostDependencies = hostBarRootDir + "debug" + "/" + hostDependencyFile
50+
hostDependencies = hostBarRootDir + "release" + "/" + hostDependencyFile
5151
currentSelectedBar = hostBarRootDir + "release" + "/" + hostBar
5252
}
5353
}
@@ -57,7 +57,10 @@ println ">>>" + hostBarRootDir
5757
println ">>>" + currentSelectedBar
5858
println ">>>" + hostDependencies
5959

60-
apply from: hostDependencies
60+
if (file(hostDependencies).exists()) {
61+
println ">>>apply from: " + hostDependencies
62+
apply from: hostDependencies
63+
}
6164

6265
android.androidResources.additionalParameters(
6366
'-I', currentSelectedBar,
@@ -182,7 +185,7 @@ afterEvaluate {
182185
}
183186
}
184187
File dependenciesTxt = new File("${project.buildDir}/outputs/plugin_dependencies.txt")
185-
dependenciesTxt.getParentFile().mkdir()
188+
dependenciesTxt.getParentFile().mkdirs()
186189
dependenciesTxt.write("// This file is automatically generated by Plugin Script\n")
187190
dependenciesTxt.append("// variant is ${varName}\n")
188191
String hostTxt = new File(hostDependencies).text

0 commit comments

Comments
 (0)