Sameerkash / flutter_statusbarcolor

A package can help you to change your flutter app's statusbar's color or navigationbar's color programmatically.
https://pub.dev/packages/flutter_statusbarcolor
MIT License
8 stars 21 forks source link

AGP8 upgrade #8

Open adrianvintu opened 6 months ago

adrianvintu commented 6 months ago

The following configuration worked for me when migrating to AGP8:

build.gradle

buildscript {
    ext.kotlin_version = '1.9.0'
    repositories {
        google()
        jcenter()
        maven { url 'https://developer.huawei.com/repo/' }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.1.1'
        classpath 'com.google.gms:google-services:4.3.15'
        classpath 'com.google.firebase:perf-plugin:1.4.2'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.6'
        classpath 'com.huawei.agconnect:agcp:1.5.2.300'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
...

app\build.gradle

...
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
//apply plugin: 'com.huawei.agconnect'

android {
    // Conditional for compatibility with AGP <4.2.
    if (project.android.hasProperty("namespace")) {
      namespace 'my_namespace'
    }

    compileSdkVersion 34
...       

gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#https://developer.android.com/studio/releases/gradle-plugin
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip

Forks (if required): https://github.com/adrianvintu/file_saver https://github.com/adrianvintu/flutter_statusbarcolor https://github.com/adrianvintu/hms-flutter-plugin

Sameerkash commented 6 months ago

Hey @adrianvintu Thank you, i will take a look into this soon