Skip to content

Commit

Permalink
Implement conanProfile->conanInstall->preBuild dependency chain
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Jul 11, 2024
1 parent 5796674 commit e7a86a5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ android {
ndkVersion "26.3.11579264"
}

task conanProfile {
file("build").mkdirs()

copy {
from "conanprofile.txt"
into "build"
}
task conanProfile(type: Copy) {
from "conanprofile.txt"
into "build/"

doLast {
def file = file("build/conanprofile.txt")
def content = file.text
content = content.replace("<NDK_PATH>", android.ndkDirectory.toString())
file.write(content)
}
}

task conanInstall {
dependsOn(conanProfile)
doFirst {
["armv7", "armv8", "x86", "x86_64"].each { String arch ->
exec {
commandLine(
Expand All @@ -37,7 +37,9 @@ task conanInstall {
)
}
}
}
}
preBuild.dependsOn conanInstall

android {
defaultConfig {
Expand Down

0 comments on commit e7a86a5

Please sign in to comment.