From 8899192b980b340303badc97bad65ac6bacd9a65 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 6 Jan 2025 17:28:00 +0300 Subject: [PATCH] Make Flutter plugin compatible with AGP 8.+ - Declare 'namespace' property on module-level build script - Change default namespace - Remove package name from AndroidManifest - Bump compileSdkVersion to latest - Update source and target compatibility warning: [options] source value 8 is obsolete and will be removed in a future release warning: [options] target value 8 is obsolete and will be removed in a future release --- packages/flutter/android/build.gradle | 14 ++++++++------ packages/flutter/android/build.gradle.production | 14 ++++++++------ .../flutter/android/src/main/AndroidManifest.xml | 3 +-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/flutter/android/build.gradle b/packages/flutter/android/build.gradle index 4b7120bdf..e8103b662 100644 --- a/packages/flutter/android/build.gradle +++ b/packages/flutter/android/build.gradle @@ -1,5 +1,5 @@ version '0.4.0-rc3' // generated; do not edit -group 'com.example.flutter_breez_liquid' +group 'technology.breez.flutter_breez_liquid' buildscript { ext.kotlin_version = '1.8.20' @@ -27,21 +27,23 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlinx-serialization' android { + namespace = "technology.breez.flutter_breez_liquid" + // Bumping the plugin compileSdkVersion requires all clients of this plugin // to bump the version in their app. - compileSdkVersion 34 + compileSdkVersion 35 // Bumping the plugin ndkVersion requires all clients of this plugin to bump // the version in their app and to download a newer version of the NDK. ndkVersion "21.1.6352462" compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } - + kotlinOptions { - jvmTarget = '1.8' + jvmTarget = "17" } sourceSets { diff --git a/packages/flutter/android/build.gradle.production b/packages/flutter/android/build.gradle.production index 48c7fbb99..d05d359bc 100644 --- a/packages/flutter/android/build.gradle.production +++ b/packages/flutter/android/build.gradle.production @@ -1,5 +1,5 @@ version '0.4.0-rc3' // generated; do not edit -group 'com.example.flutter_breez_liquid' +group 'technology.breez.flutter_breez_liquid' buildscript { ext.kotlin_version = '1.8.20' @@ -27,21 +27,23 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { + namespace = "technology.breez.flutter_breez_liquid" + // Bumping the plugin compileSdkVersion requires all clients of this plugin // to bump the version in their app. - compileSdkVersion 34 + compileSdkVersion 35 // Bumping the plugin ndkVersion requires all clients of this plugin to bump // the version in their app and to download a newer version of the NDK. ndkVersion "21.1.6352462" compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } - + kotlinOptions { - jvmTarget = '1.8' + jvmTarget = "17" } sourceSets { diff --git a/packages/flutter/android/src/main/AndroidManifest.xml b/packages/flutter/android/src/main/AndroidManifest.xml index 2da6154b6..a2f47b605 100644 --- a/packages/flutter/android/src/main/AndroidManifest.xml +++ b/packages/flutter/android/src/main/AndroidManifest.xml @@ -1,3 +1,2 @@ - +