From 4fe36040cc1c1f8162df518a051337546d7af23e Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Sun, 19 Jan 2025 13:29:55 +0100 Subject: [PATCH] Allow passing deployer (#9) --- build.gradle.kts | 2 +- .../app/opendocument/ConanInstallTask.kt | 22 ++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c900d2c..acfac19 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,7 +32,7 @@ kotlin { } group = "app.opendocument" -version = "0.9.3" +version = "0.9.4" gradlePlugin { website = "https://github.com/opendocument-app/ConanAndroidGradlePlugin" diff --git a/src/main/kotlin/app/opendocument/ConanInstallTask.kt b/src/main/kotlin/app/opendocument/ConanInstallTask.kt index 519637b..762093f 100644 --- a/src/main/kotlin/app/opendocument/ConanInstallTask.kt +++ b/src/main/kotlin/app/opendocument/ConanInstallTask.kt @@ -46,6 +46,12 @@ abstract class ConanInstallTask : Exec() { @get:Input abstract val conanExecutable: Property + @get:Input + abstract val deployer: Property + + @get:Input + abstract val deployerFolder: Property + init { profile.convention("default") buildProfile.convention("default") @@ -60,15 +66,21 @@ abstract class ConanInstallTask : Exec() { val conanToolchainFile: Provider = 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: