From 5da5b67116890b1bbe798aaccdd520c1c1e953a5 Mon Sep 17 00:00:00 2001 From: inikhaledhassan Date: Tue, 17 Dec 2024 13:38:31 +0600 Subject: [PATCH] compatible with flutter SDK 3.24.5 --- android/build.gradle | 22 ++++++++++++++++++---- example/android/build.gradle | 6 +++++- pubspec.yaml | 11 ++++------- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 17a89c3d..d557a532 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,14 +2,14 @@ group 'co.paystack.flutterpaystack' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.7.20' + ext.kotlin_version = '1.8.22' repositories { mavenCentral() google() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.0-rc02' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -25,7 +25,19 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 32 + namespace "co.paystack.flutterpaystack" + compileSdkVersion 34 + ndkVersion "27.0.12077973" + + compileOptions { + coreLibraryDesugaringEnabled true + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = "17" + } sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -35,6 +47,7 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" versionCode 21 versionName "3.0.10" + multiDexEnabled true } lintOptions { disable 'InvalidPackage' @@ -43,4 +56,5 @@ android { dependencies { implementation 'com.google.android.material:material:1.7.0' -} + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2' +} \ No newline at end of file diff --git a/example/android/build.gradle b/example/android/build.gradle index bef5f7b2..e966094d 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -16,6 +16,10 @@ allprojects { google() jcenter() } + + tasks.withType(JavaCompile) { + options.compilerArgs << '-Xlint:-options' + } } rootProject.buildDir = '../build' @@ -28,4 +32,4 @@ subprojects { task clean(type: Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index f76392a8..a6d22bd3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,21 +17,18 @@ dev_dependencies: matcher: ^0.12.12 mockito: ^5.3.1 - flutter: plugin: platforms: android: package: co.paystack.flutterpaystack - pluginClass: FlutterPaystackPlugin + pluginClass: FlutterPaystackPlugin ios: - pluginClass: FlutterPaystackPlugin + pluginClass: FlutterPaystackPlugin assets: - - assets/images/ - - + - assets/images/ environment: - sdk: '>=2.12.0 <3.0.0' + sdk: ">=3.5.4 <4.0.0" flutter: ">=2.0.0" \ No newline at end of file