-
Notifications
You must be signed in to change notification settings - Fork 594
Open
Description
Problem
When built-in Kotlin is disabled, the kotlin-android plugin creates one KotlinSourceSet for each AndroidSourceSet.
When built-in Kotlin is enabled, starting with AGP 9.0.0-beta05, KotlinSourceSets are no longer supported (https://issuetracker.google.com/386221070).
Currently, Wire is using these Kotlin source sets, so with AGP 9.0.0-beta05+ and built-in Kotlin, the build will fail with an error similar to the following:
A problem occurred configuring project ':<project>'.
> KotlinSourceSet with name 'androidTest' not found.
* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':<project>'.
Caused by: org.gradle.api.UnknownDomainObjectException: KotlinSourceSet with name 'androidTest' not found.
at com.squareup.wire.gradle.kotlin.SourceRootsKt.sourceRoots(SourceRoots.kt:128)...
pointing to this code in the Wire plugin.
Fix
Please migrate KotlinSourceSet to AndroidSourceSet.kotlin. See this guide for more details.
Workaround for users
Set android.disallowKotlinSourceSets=false in gradle.properties to temporarily bypass this error.
consp1racy
Metadata
Metadata
Assignees
Labels
No labels