Kapt: Strict mode. Issue an error if the converter fails to process a class (#KT-25518, #KT-24272)
This commit is contained in:
@@ -224,10 +224,17 @@ class KaptJavaLog(
|
||||
}
|
||||
}
|
||||
|
||||
fun KaptContext.kaptError(text: String): JCDiagnostic {
|
||||
private val LINE_SEPARATOR: String = System.getProperty("line.separator")
|
||||
|
||||
fun KaptContext.kaptError(vararg line: String): JCDiagnostic {
|
||||
val text = line.joinToString(LINE_SEPARATOR)
|
||||
return JCDiagnostic.Factory.instance(context).errorJava9Aware(null, null, "proc.messager", text)
|
||||
}
|
||||
|
||||
fun KaptContext.reportKaptError(vararg line: String) {
|
||||
compiler.log.report(kaptError(*line))
|
||||
}
|
||||
|
||||
private fun JCDiagnostic.Factory.errorJava9Aware(
|
||||
source: DiagnosticSource?,
|
||||
pos: JCDiagnostic.DiagnosticPosition?,
|
||||
|
||||
Reference in New Issue
Block a user