Skip to content

Commit 4fe3604

Browse files
authored
Allow passing deployer (#9)
1 parent 2533c4e commit 4fe3604

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ kotlin {
3232
}
3333

3434
group = "app.opendocument"
35-
version = "0.9.3"
35+
version = "0.9.4"
3636

3737
gradlePlugin {
3838
website = "https://github.com/opendocument-app/ConanAndroidGradlePlugin"

src/main/kotlin/app/opendocument/ConanInstallTask.kt

+17-5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ abstract class ConanInstallTask : Exec() {
4646
@get:Input
4747
abstract val conanExecutable: Property<String>
4848

49+
@get:Input
50+
abstract val deployer: Property<String?>
51+
52+
@get:Input
53+
abstract val deployerFolder: Property<String?>
54+
4955
init {
5056
profile.convention("default")
5157
buildProfile.convention("default")
@@ -60,15 +66,21 @@ abstract class ConanInstallTask : Exec() {
6066
val conanToolchainFile: Provider<RegularFile> = arch.map { project.layout.buildDirectory.get().file("conan/$it/conan_toolchain.cmake") }
6167

6268
override fun exec() {
63-
commandLine(
69+
val args = mutableListOf(
6470
conanExecutable.get(),
6571
"install", conanfile.get(),
66-
"--output-folder=" + outputDirectory.get(),
72+
"--output-folder=${outputDirectory.get()}",
6773
"--build=missing",
68-
"--profile:host=" + profile.get(),
69-
"--profile:build=" + buildProfile.get(),
70-
"--settings:host", "arch=" + arch.get(),
74+
"--profile:host=${profile.get()}",
75+
"--profile:build=${buildProfile.get()}",
76+
"--settings:host", "arch=${arch.get()}"
7177
)
78+
79+
deployer.getOrNull()?.let { args.add("--deployer=$it") }
80+
deployerFolder.getOrNull()?.let { args.add("--deployer-folder=$it") }
81+
82+
commandLine(args)
83+
7284
super.exec()
7385

7486
// conan install creates toolchain in one of two places:

0 commit comments

Comments
 (0)