Skip to content

Incompatiable with AGP 9 #852

@FooIbar

Description

@FooIbar

AGP version: 9.0.0-alpha13
To reproduce, first add

android.builtInKotlin=false
android.newDsl=false

to gradle.properties because of #820

Error : You cannot add Provider instances to the Android SourceSet API.
It is not possible for Android Studio to determine if the Provider points
to a directory that contains generated (read-only) or static (read-write) files. 

Instead you should use the Sources interface in the Variant API, in particular
SourceDirectories.addGeneratedDirectory and SourceDirectories.addStaticDirectories.

You can re-enable the behavior by setting the `android.sourceset.disallowProvider=false` to gradle.properties.
However, be aware that any Gradle Task dependency will not be automatically carried.
	at com.android.build.gradle.internal.api.DefaultAndroidSourceDirectorySet.srcDir(DefaultAndroidSourceDirectorySet.kt:84)
	at com.android.build.gradle.internal.api.DefaultAndroidSourceDirectorySet.srcDir(DefaultAndroidSourceDirectorySet.kt:48)
	at dev.icerock.gradle.MultiplatformResourcesPlugin.setupSourceSets(MultiplatformResourcesPlugin.kt:196)
	at dev.icerock.gradle.MultiplatformResourcesPlugin.access$setupSourceSets(MultiplatformResourcesPlugin.kt:41)
	at dev.icerock.gradle.MultiplatformResourcesPlugin$configureKotlinTargetGenerator$2$1$1.invoke(MultiplatformResourcesPlugin.kt:107)
	at dev.icerock.gradle.MultiplatformResourcesPlugin$configureKotlinTargetGenerator$2$1$1.invoke(MultiplatformResourcesPlugin.kt:94)
	at org.jetbrains.kotlin.gradle.utils.MutableObservableSetImpl.forAll(ObservableSet.kt:96)

It seems reverting 9cdab6c and a846e91 would be enough, but I'm not sure if the original issue has been fixed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions