Skip to content

Commit

Permalink
Allow passing deployer (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand authored Jan 19, 2025
1 parent 2533c4e commit 4fe3604
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
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

0 comments on commit 4fe3604

Please sign in to comment.