Skip to content

refactor(share_plus): change android gradle from groovy to kotlin#3860

Open
mdmahendri wants to merge 1 commit into
fluttercommunity:mainfrom
mdmahendri:refactor/share-plus-kotlin-dsl
Open

refactor(share_plus): change android gradle from groovy to kotlin#3860
mdmahendri wants to merge 1 commit into
fluttercommunity:mainfrom
mdmahendri:refactor/share-plus-kotlin-dsl

Conversation

@mdmahendri
Copy link
Copy Markdown

@mdmahendri mdmahendri commented May 30, 2026

Description

Change the share_plus build configuration from Groovy to Kotlin DSL, aligning with the standard detailed in #3858.

  • this PR adds a subproject check to only redirect build directories for local subprojects:

    subprojects {
        val isLocalProject = project.projectDir.canonicalPath.startsWith(rootProject.projectDir.canonicalPath)
        if (isLocalProject) {
            val newSubProjectBuildDir: Directory = newBuildDir.dir(project.name)
            project.layout.buildDirectory.value(newSubProjectBuildDir)
        }
    }

    This is needed to resolve bug described in Android build fails with certain plugins if project is in a different drive (from sdk) flutter/flutter#105395 and safely prevents Windows "different roots" Gradle build errors thrown by plugins like file_selector_android when the host project and the Flutter Pub cache reside on different logical drives (e.g., D: vs C:). This way, contributors using Windows won't encounter the same problem again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant