isAndroidKotlinModule function

bool isAndroidKotlinModule(
  1. File specFile
)

Returns true when the module has a Kotlin implementation on Android and so needs a JniBridge.registerFactory() call in Plugin.kt. Not the inverse of isAndroidCppModule: a module that does not target Android (macOS-only, desktop-only) is neither, and has no JniBridge to register. A spec that is not found, or declares nothing, keeps the Kotlin default.

Implementation

bool isAndroidKotlinModule(File specFile) {
  final a = PlatformTargetAnalyzer.fromSpec(specFile);
  return a.declaresNothing || a.kotlinOnAndroid;
}