From e9ace0863a1d1e5666bae622a78d017a7d9db4b9 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Sun, 19 Jan 2025 17:25:49 +0100 Subject: [PATCH] defaults; version bump --- build.gradle.kts | 2 +- .../kotlin/app/opendocument/ConanInstallTask.kt | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index acfac19..ef63882 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,7 +32,7 @@ kotlin { } group = "app.opendocument" -version = "0.9.4" +version = "0.9.5" 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 55fa93f..2d2d25f 100644 --- a/src/main/kotlin/app/opendocument/ConanInstallTask.kt +++ b/src/main/kotlin/app/opendocument/ConanInstallTask.kt @@ -49,16 +49,12 @@ abstract class ConanInstallTask : Exec() { @get:Input abstract val deployer: Property - @get:Input - abstract val deployerFolder: Property - init { profile.convention("default") buildProfile.convention("default") conanfile.convention(".") conanExecutable.convention("conan") deployer.convention(null as String?) - deployerFolder.convention(null as String?) } @get:OutputDirectory @@ -67,6 +63,9 @@ abstract class ConanInstallTask : Exec() { @get:OutputFile val conanToolchainFile: Provider = arch.map { project.layout.buildDirectory.get().file("conan/$it/conan_toolchain.cmake") } + @get:OutputDirectory + val deployerFolder: Property = arch.map { project.layout.buildDirectory.get().dir("conan/$it/assets") } + override fun exec() { val args = mutableListOf( conanExecutable.get(), @@ -78,8 +77,10 @@ abstract class ConanInstallTask : Exec() { "--settings:host", "arch=${arch.get()}" ) - deployer.getOrNull()?.let { args.add("--deployer=$it") } - deployerFolder.getOrNull()?.let { args.add("--deployer-folder=$it") } + if (deployer.isPresent()) { + args.add("--deployer=${deployer.get()}") + args.add("--deployer-folder=${deployerFolder.get()}") + } commandLine(args)