Also real compile avoidance doesn't work with Kotlin, it's Java only Gradle API (at least for now), there is an issue on Kotlin issues tracker about compile avoidance for Kotlin. 1.3.20 will have some facilities that open road to implementation of this feature on Kotlin plugin side without direct support from.Gradle