CodeMinion / another_brother

Another Brother Flutter SDK
BSD 3-Clause "New" or "Revised" License
21 stars 22 forks source link

Update Kotlin Gradle Version [Android] #54

Closed anchals333 closed 1 year ago

anchals333 commented 1 year ago

I'm using another_brother : 0.0.34 version & faced a kotlin gradle version issue.

`FAILURE: Build failed with an exception.

CodeMinion commented 1 year ago

Hi @anchals333 ,

Thanks for reaching out about this. Could you share a bit more details about your project?

From the error it sounds like you are building using a newer version of Kotlin than currently available in another_brother.

Thanks in advance,

anchals333 commented 1 year ago

@CodeMinion Here is project build.gradle :

buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.1'
        // START: FlutterFire Configuration
        classpath 'com.google.gms:google-services:4.3.15'
        // END: FlutterFire Configuration
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

Let me know if any other details are required.

CodeMinion commented 1 year ago

Thanks for the details @anchals333 !

It seems your Kotlin version is higher than the one supported in another_brother currently. One short term solution would be to lower your project's Kotlin version to match the one in another_brother.

Longer term there is a MR from the community to update to a more recent version of Kotlin but I will not have time to review it until later this month. Using that version in the meantime might also help.

Thanks again for the report,

tomaspodmanicky commented 1 year ago

How does it look with this issue? I cant lower my Kotlin version.

CodeMinion commented 1 year ago

Hi @anchals333 , @tomaspodmanicky ,

Version 2.0.0 of another_brother is now out on Pub.dev and it upgrades AGP to 7.3.0

Thanks again for the report,