hemanthrajv / flutter_compass

MIT License
102 stars 188 forks source link

[FIX] Support newer Android version and AGP >=8.0.0 compatibility #113

Closed PikPakPik closed 6 days ago

PikPakPik commented 3 months ago

AGP >= 8 need to specify a namespace (https://github.com/hemanthrajv/flutter_compass/issues/104) We need to update the compileSdk version due to this error "resource android:attr/lStar not found" since Android 12 so update to support 14 and lower (https://github.com/hemanthrajv/flutter_compass/issues/112)

zigapovhe commented 2 months ago

@hemanthrajv Can this be merged please? @PikPakPik Thanks for your contribution!

Lah123 commented 2 months ago

Can somewone please merge this and make the new version available? I cannot build my project without this change. I have to reference the git project of @PikPakPik to make it work.

LGro commented 2 months ago

It seems like transistorsoft/flutter_background_fetch/issues/376 also works here, at least after adding the following to android/build.gradle I got my project with the official flutter_compass dependency to build again:

subprojects {
    afterEvaluate { project ->
        if (project.plugins.hasPlugin("com.android.application") || project.plugins.hasPlugin("com.android.library")) {
            project.android {
                compileSdkVersion 34
                buildToolsVersion "34.0.0"
            }
        }
    }
}
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(":app")
}

I'm not confident I understand what is happening here exactly, does this adapt the toolchain version to be different for dependencies?

mrsrmn commented 2 months ago

when will this be merged? this is extremely important, i cant build my project