Steps to reproduce:
$ git clone https://github.com/nsk-mironov/kotlin-kapt-bugs
$ cd kotlin-kapt-bugs
$ git checkout KT-25374
$ ./gradlew clean assembleDebug
- Build fails because there are some incorrect usages of databinding and the error message has some really helpful information like:
Cannot find the setter for attribute 'binding:fail' with parameter type boolean on android.widget.TextView.
file:///Users/vmironov/Development/kotlin-kapt-bugs/app/src/main/res/layout/activity_main.xml Line:7
- Open
gradle.properties
and changekapt.use.worker.api
value totrue
$ ./gradlew clean assembleDebug
- Now the error message is swallowed and isn't really helpful:
> Task :app:kaptDebugKotlin FAILED
/Users/vmironov/Development/kotlin-kapt-bugs/app/build/generated/source/kapt/debug/com/github/vmironov/ic/DataBinderMapperImpl.java:9: error: cannot find symbol
import com.github.vmironov.ic.databinding.ActivityMainBindingImpl;
^
symbol: class ActivityMainBindingImpl
location: package com.github.vmironov.ic.databinding
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)