From 4ad092b33fca937f72b0d54c672c4fc12aa47dab Mon Sep 17 00:00:00 2001 From: Mostafa Monir Date: Sat, 18 Oct 2025 12:11:54 +0300 Subject: [PATCH 1/2] Change Android Compile SDK, Update Android Build Config --- android/build.gradle | 6 +++--- android/gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/build.gradle | 2 +- example/android/gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 1195d18..47ad8ad 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,7 +9,7 @@ buildscript { dependencies { // Use a compatible version of Gradle Plugin - classpath 'com.android.tools.build:gradle:8.1.0' // Updated to 8.1.0 + classpath 'com.android.tools.build:gradle:8.12.1' } } @@ -23,13 +23,13 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { + namespace "id.oddbit.flutter.facebook_app_events" // Safely handle 'namespace' property for new Android Gradle plugin versions if (project.hasProperty("android") && project.android.hasProperty("namespace")) { namespace = "com.mixpanel.mixpanel_flutter" } - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion flutter.compileSdkVersion defaultConfig { minSdkVersion 21 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 8bc9958..02767eb 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip diff --git a/example/android/build.gradle b/example/android/build.gradle index e83fb5d..59ff410 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.7.10' + ext.kotlin_version = '2.2.0' repositories { google() mavenCentral() diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index df97d72..ed4c299 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/example/android/settings.gradle b/example/android/settings.gradle index d6f8819..020d352 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -23,7 +23,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version '8.8.1' apply false + id "com.android.application" version '8.12.1' apply false } include ":app" From 35757b756f40079927426b1c5989a8eb0df39d87 Mon Sep 17 00:00:00 2001 From: Mostafa Monir Date: Sat, 18 Oct 2025 12:18:00 +0300 Subject: [PATCH 2/2] update android namespace --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 47ad8ad..ea59b5f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -23,7 +23,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - namespace "id.oddbit.flutter.facebook_app_events" + namespace "com.mixpanel.mixpanel_flutter" // Safely handle 'namespace' property for new Android Gradle plugin versions if (project.hasProperty("android") && project.android.hasProperty("namespace")) { namespace = "com.mixpanel.mixpanel_flutter"