Ryan Simon
02/13/2020, 8:07 PMtasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xobjc-generics")
}
}
kotlin {
ios {
binaries.framework {
freeCompilerArgs = freeCompilerArgs + "-Xobjc-generics"
}
}
}
And that was complaining about the name being the sameKris Wong
02/13/2020, 8:15 PMfreeCompilerArgs.add("-Xobjc-generics")
Ryan Simon
02/13/2020, 8:16 PMKris Wong
02/13/2020, 8:16 PMRyan Simon
02/13/2020, 8:19 PMKris Wong
02/13/2020, 8:19 PMRyan Simon
02/13/2020, 8:27 PMfreeCompilerArgs.add("-Xobjc-generics")
^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public inline fun DependencyHandler.add(configuration: String, dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit)
freeCompilerArgs
at that point is a non-mutable List
ios {
binaries.framework {
freeCompilerArgs.add("-Xobjc-generics")
}
}
Kris Wong
02/13/2020, 8:31 PMRyan Simon
02/13/2020, 8:36 PMios {
binaries.framework("Generics") {
freeCompilerArgs = freeCompilerArgs + "-Xobjc-generics"
}
}
Kris Wong
02/13/2020, 8:41 PMRyan Simon
02/13/2020, 8:46 PMcocoapods {
summary = "Common library for the KaMP starter kit"
homepage = "<https://github.com/touchlab/KaMPStarter>"
}
Kris Wong
02/13/2020, 8:47 PMRyan Simon
02/13/2020, 8:48 PMKris Wong
02/13/2020, 8:51 PMRyan Simon
02/13/2020, 8:55 PMKris Wong
02/13/2020, 8:57 PMRyan Simon
02/13/2020, 8:58 PMtasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink>().configureEach {
this.binary.freeCompilerArgs += "-Xobjc-generics"
}
Kris Wong
02/13/2020, 10:50 PMRyan Simon
02/13/2020, 10:53 PM