File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
plugin/src/main/kotlin/io/github/ttypic/swiftklib/gradle Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,14 @@ class SwiftKlibPlugin : Plugin<Project> {
28
28
getTaskName(name, it)
29
29
}
30
30
31
+ val buildDir = project.layout.buildDirectory.asFile.get().absolutePath
31
32
targetToTaskName.entries.forEach { (target, taskName) ->
32
33
tasks.register(
33
34
taskName,
34
35
CompileSwiftTask ::class .java,
35
36
name,
36
37
target,
38
+ buildDir,
37
39
entry.pathProperty,
38
40
entry.packageNameProperty,
39
41
entry.minIosProperty,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import javax.inject.Inject
22
22
open class CompileSwiftTask @Inject constructor(
23
23
@Input val cinteropName : String ,
24
24
@Input val compileTarget : CompileTarget ,
25
+ @Input val buildDirectory : String ,
25
26
@InputDirectory val pathProperty : Property <File >,
26
27
@Input val packageNameProperty : Property <String >,
27
28
@Optional @Input val minIosProperty : Property <Int >,
@@ -33,7 +34,7 @@ open class CompileSwiftTask @Inject constructor(
33
34
@get:Internal
34
35
internal val targetDir: File
35
36
get() {
36
- return project.layout.buildDirectory.file( " ${EXTENSION_NAME } /$cinteropName /$compileTarget " ).get().asFile
37
+ return File (buildDirectory, " ${EXTENSION_NAME } /$cinteropName /$compileTarget " )
37
38
}
38
39
39
40
@get:OutputDirectory
You can’t perform that action at this time.
0 commit comments