Skip to content

Commit

Permalink
Make Flutter plugin compatible with AGP 8.+
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
erdemyerebasmaz committed Jan 7, 2025
1 parent 34101c5 commit 8899192
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
14 changes: 8 additions & 6 deletions packages/flutter/android/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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 {
Expand Down
14 changes: 8 additions & 6 deletions packages/flutter/android/build.gradle.production
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions packages/flutter/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutter_breez_liquid">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

0 comments on commit 8899192

Please sign in to comment.