Skip to content

Commit

Permalink
back to input prop
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Jan 19, 2025
1 parent 291616d commit 047b490
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/kotlin/app/opendocument/ConanInstallTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ abstract class ConanInstallTask : Exec() {
@get:Input
abstract val deployer: Property<String?>

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

init {
profile.convention("default")
buildProfile.convention("default")
conanfile.convention(".")
conanExecutable.convention("conan")
deployer.convention(null as String?)
deployerFolder.convention(null as String?)
}

@get:OutputDirectory
Expand All @@ -63,9 +67,6 @@ abstract class ConanInstallTask : Exec() {
@get:OutputFile
val conanToolchainFile: Provider<RegularFile> = arch.map { project.layout.buildDirectory.get().file("conan/$it/conan_toolchain.cmake") }

@get:OutputDirectory
val deployerFolder: Property<Directory> = arch.map { project.layout.buildDirectory.get().dir("conan/$it/assets") }

override fun exec() {
val args = mutableListOf(
conanExecutable.get(),
Expand All @@ -79,7 +80,9 @@ abstract class ConanInstallTask : Exec() {

if (deployer.isPresent()) {
args.add("--deployer=${deployer.get()}")
args.add("--deployer-folder=${deployerFolder.get()}")
if (deployerFolder.isPresent()) {
args.add("--deployer-folder=${deployerFolder.get()}")
}
}

commandLine(args)
Expand Down

0 comments on commit 047b490

Please sign in to comment.