Slide 14
Slide 14 text
if (isKotlin) {
val kaptGeneratedDirPath = processingEnv.options[KAPT_KOTLIN_GENERATED_OPTION_NAME]?.replace("kaptKotlin", "kap
processingEnv.messager.printMessage(Diagnostic.Kind.ERROR, "Can't find the target directory for generated Kot
return false
}
val kaptGeneratedDir = File(kaptGeneratedDirPath)
if (!kaptGeneratedDir.parentFile.exists()) {
kaptGeneratedDir.parentFile.mkdirs()
}
val processorUnits = listOf(ActivityKtProcessorUnit(), SupportFragmentKtProcessorUnit(), NativeFragmentKtProces
val processorUnit = findAndValidateKtProcessorUnit(processorUnits, it)
val kotlinFile = processorUnit.createKotlinFile(rpe, requestCodeProvider)
kotlinFile.writeTo(kaptGeneratedDir)
} else {
val processorUnits = listOf(ActivityProcessorUnit(), SupportFragmentProcessorUnit(), NativeFragmentProcessorUni
val processorUnit = findAndValidateProcessorUnit(processorUnits, it)
val javaFile = processorUnit.createJavaFile(rpe, requestCodeProvider)
javaFile.writeTo(filer)
}