Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ kotlin {
}

group = "app.opendocument"
version = "0.9.3"
version = "0.9.4"

gradlePlugin {
website = "https://github.com/opendocument-app/ConanAndroidGradlePlugin"
Expand Down
22 changes: 17 additions & 5 deletions src/main/kotlin/app/opendocument/ConanInstallTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ abstract class ConanInstallTask : Exec() {
@get:Input
abstract val conanExecutable: Property<String>

@get:Input
abstract val deployer: Property<String?>

@get:Input
abstract val deployerFolder: Property<String?>

init {
profile.convention("default")
buildProfile.convention("default")
Expand All @@ -60,15 +66,21 @@ abstract class ConanInstallTask : Exec() {
val conanToolchainFile: Provider<RegularFile> = arch.map { project.layout.buildDirectory.get().file("conan/$it/conan_toolchain.cmake") }

override fun exec() {
commandLine(
val args = mutableListOf(
conanExecutable.get(),
"install", conanfile.get(),
"--output-folder=" + outputDirectory.get(),
"--output-folder=${outputDirectory.get()}",
"--build=missing",
"--profile:host=" + profile.get(),
"--profile:build=" + buildProfile.get(),
"--settings:host", "arch=" + arch.get(),
"--profile:host=${profile.get()}",
"--profile:build=${buildProfile.get()}",
"--settings:host", "arch=${arch.get()}"
)

deployer.getOrNull()?.let { args.add("--deployer=$it") }
deployerFolder.getOrNull()?.let { args.add("--deployer-folder=$it") }

commandLine(args)

super.exec()

// conan install creates toolchain in one of two places:
Expand Down