kapt: Warn on using android-apt with kapt
This commit is contained in:
+6
@@ -42,6 +42,8 @@ public class AnnotationProcessingManager(
|
|||||||
val JAVA_FQNAME_PATTERN = "^([\\p{L}_$][\\p{L}\\p{N}_$]*\\.)*[\\p{L}_$][\\p{L}\\p{N}_$]*$".toRegex()
|
val JAVA_FQNAME_PATTERN = "^([\\p{L}_$][\\p{L}\\p{N}_$]*\\.)*[\\p{L}_$][\\p{L}\\p{N}_$]*$".toRegex()
|
||||||
val WRAPPERS_DIRECTORY = "wrappers"
|
val WRAPPERS_DIRECTORY = "wrappers"
|
||||||
val GEN_ANNOTATION = "__gen/annotation"
|
val GEN_ANNOTATION = "__gen/annotation"
|
||||||
|
|
||||||
|
private val ANDROID_APT_PLUGIN_ID = "com.neenbedankt.android-apt"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getAnnotationFile(): File {
|
fun getAnnotationFile(): File {
|
||||||
@@ -52,6 +54,10 @@ public class AnnotationProcessingManager(
|
|||||||
fun setupKapt() {
|
fun setupKapt() {
|
||||||
if (aptFiles.isEmpty()) return
|
if (aptFiles.isEmpty()) return
|
||||||
|
|
||||||
|
if (project.getPlugins().findPlugin("com.neenbedankt.android-apt") != null) {
|
||||||
|
project.getLogger().warn("Please do not use `$ANDROID_APT_PLUGIN_ID` with kapt.")
|
||||||
|
}
|
||||||
|
|
||||||
generateJavaHackFile(aptWorkingDir, javaTask)
|
generateJavaHackFile(aptWorkingDir, javaTask)
|
||||||
|
|
||||||
val annotationProcessorFqNames = lookupAnnotationProcessors(aptFiles)
|
val annotationProcessorFqNames = lookupAnnotationProcessors(aptFiles)
|
||||||
|
|||||||
Reference in New Issue
Block a user