Skip to content

Improved logic for Gradle plugin dependency including and advance enable detection #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 5, 2025

Conversation

ForteScarlet
Copy link
Owner

@ForteScarlet ForteScarlet commented Mar 5, 2025

Previously, the handling of compilations in the Gradle plugin appeared to be such that only one compilation was allowed in a sourceSet, otherwise an exception would be thrown.

But in android it seems that there may be more than one compilation in a source set, e.g., there are two compilations [debug, release] in source set androidMain.

Under the old logic, this would have thrown an exception, which is what led to #85.

Now, in Kotlin multiplatform projects, SourceSet.dependencies are set based on all compilations, rather than Project.dependencies being configured after the first compilation.
And enable is detected much earlier.

Fix #85

@ForteScarlet ForteScarlet self-assigned this Mar 5, 2025
@ForteScarlet ForteScarlet added the bug Something isn't working label Mar 5, 2025
@ForteScarlet ForteScarlet merged commit e673366 into dev Mar 5, 2025
1 check passed
@ForteScarlet ForteScarlet deleted the improve-android-target branch March 5, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Including the compiler plugin breaks Android build
1 participant