Skip to content

Commit e7a86a5

Browse files
Implement conanProfile->conanInstall->preBuild dependency chain
1 parent 5796674 commit e7a86a5

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

app/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ android {
88
ndkVersion "26.3.11579264"
99
}
1010

11-
task conanProfile {
12-
file("build").mkdirs()
13-
14-
copy {
15-
from "conanprofile.txt"
16-
into "build"
17-
}
11+
task conanProfile(type: Copy) {
12+
from "conanprofile.txt"
13+
into "build/"
1814

15+
doLast {
1916
def file = file("build/conanprofile.txt")
2017
def content = file.text
2118
content = content.replace("<NDK_PATH>", android.ndkDirectory.toString())
2219
file.write(content)
20+
}
2321
}
2422

2523
task conanInstall {
24+
dependsOn(conanProfile)
25+
doFirst {
2626
["armv7", "armv8", "x86", "x86_64"].each { String arch ->
2727
exec {
2828
commandLine(
@@ -37,7 +37,9 @@ task conanInstall {
3737
)
3838
}
3939
}
40+
}
4041
}
42+
preBuild.dependsOn conanInstall
4143

4244
android {
4345
defaultConfig {

0 commit comments

Comments
 (0)