Skip to content

Commit

Permalink
Add header file to cinterop inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
ASalavei committed Oct 29, 2024
1 parent 2d091cf commit 4907266
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions compose/ui/ui-uikit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ private def configure(target, isDevice, architecture, testTarget) {
}

target.compilations.main {
def taskName = "${compileTaskProvider.name}ObjCLib"
project.tasks.register(taskName, Exec) {
def libTaskName = "${compileTaskProvider.name}ObjCLib"
project.tasks.register(libTaskName, Exec) {
inputs.dir(frameworkSourcesDir)
.withPropertyName("${frameworkName}-${sdkName}")
.withPathSensitivity(PathSensitivity.RELATIVE)
Expand All @@ -140,13 +140,16 @@ private def configure(target, isDevice, architecture, testTarget) {
)
}

tasks[compileTaskProvider.name].dependsOn(taskName)
tasks[compileTaskProvider.name].dependsOn(libTaskName)

cinterops {
utils {
def cinteropTask = tasks[interopProcessingTaskName]

headersPath.eachFileRecurse {
if (it.name.endsWith('.h')) {
extraOpts("-header", it.name)
cinteropTask.inputs.file(it)
}
}
compilerOpts("-I${headersPath}")
Expand Down

0 comments on commit 4907266

Please sign in to comment.