From bf4f0e20f19dd41f023adf49a8ca4a6b7d417fec Mon Sep 17 00:00:00 2001 From: yosemiteyss Date: Wed, 1 Nov 2023 14:15:17 +0800 Subject: [PATCH] android: fix gradle namespace issue with AGP 8. --- CHANGELOG.md | 1 + android/build.gradle | 3 +++ example/android/build.gradle | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4088a19..31cdb83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 1.3.1 * Update minimum dart sdk version to 2.19.0. * Android: update `flutter_plugin_android_lifecycle` to 2.0.17. +* Android: fix gradle namespace issue with AGP 8. ## 1.3.0 * iOS: fix volume slider not shown when pressing physical buttons after `showSystemUI` is reset. diff --git a/android/build.gradle b/android/build.gradle index 76bac71..efc7da1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,6 +25,9 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { + if (project.android.hasProperty("namespace")) { + namespace 'com.yosemiteyss.flutter_volume_controller' + } compileSdkVersion 31 compileOptions { diff --git a/example/android/build.gradle b/example/android/build.gradle index 83ae220..3cdaac9 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir }