File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
plugins/kapt3/src/org/jetbrains/kotlin/kapt3 Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -126,11 +126,6 @@ abstract class AbstractKapt3Extension(
126
126
127
127
fun doNotGenerateCode () = AnalysisResult .Companion .success(BindingContext .EMPTY , module, shouldGenerateCode = false )
128
128
129
- if (files.isEmpty()) {
130
- logger.info(" No Kotlin source files, aborting" )
131
- return if (aptOnly) doNotGenerateCode() else null
132
- }
133
-
134
129
logger.info { " Initial analysis took ${System .currentTimeMillis() - pluginInitializedTime} ms" }
135
130
logger.info { " Kotlin files to compile: " + files.map { it.virtualFile?.name ? : " <in memory ${it.hashCode()} >" } }
136
131
@@ -154,6 +149,12 @@ abstract class AbstractKapt3Extension(
154
149
if (thr !is KaptError || thr.kind != KaptError .Kind .ERROR_RAISED ) {
155
150
logger.exception(thr)
156
151
}
152
+
153
+ // We don't have any Kotlin files, so there isn't anything we can report diagnostic on
154
+ if (files.isEmpty()) {
155
+ throw thr
156
+ }
157
+
157
158
bindingTrace.report(ErrorsKapt3 .KAPT3_PROCESSING_ERROR .on(files.first()))
158
159
return null // Compilation will be aborted anyway because of the error above
159
160
} finally {
You can’t perform that action at this time.
0 commit comments