diff --git a/android/build.gradle b/android/build.gradle
index 4640937..f05420f 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -2,14 +2,14 @@ group 'com.simform.flutter_credit_card'
version '1.0-SNAPSHOT'
buildscript {
- ext.kotlin_version = '1.7.10'
+ ext.kotlin_version = '1.9.20'
repositories {
google()
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.3.1'
+ classpath 'com.android.tools.build:gradle:8.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -25,13 +25,26 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
- compileSdk 31
+ // Conditional for compatibility with AGP <4.2.
+ if (project.android.hasProperty("namespace")) {
+ namespace 'io.flutter.plugins.firebase.crashlytics'
+ }
+
+ compileSdk 34
+
+ defaultConfig {
+ minSdkVersion 16
+ }
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+ buildFeatures {
+ buildConfig = true
+ }
+
kotlinOptions {
jvmTarget = '1.8'
}
@@ -41,7 +54,7 @@ android {
test.java.srcDirs += 'src/test/kotlin'
}
- defaultConfig {
- minSdkVersion 16
+ lintOptions {
+ disable 'InvalidPackage'
}
}
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..8bd86f6
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1 @@
+org.gradle.jvmargs=-Xmx1536M
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index 03ef62c..cc947c5 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,3 +1 @@
-
-
+
diff --git a/android/src/main/kotlin/com/simform/flutter_credit_card/gyroscope/GyroscopeStreamHandler.kt b/android/src/main/kotlin/com/simform/flutter_credit_card/gyroscope/GyroscopeStreamHandler.kt
index 42bcce4..3e31a32 100644
--- a/android/src/main/kotlin/com/simform/flutter_credit_card/gyroscope/GyroscopeStreamHandler.kt
+++ b/android/src/main/kotlin/com/simform/flutter_credit_card/gyroscope/GyroscopeStreamHandler.kt
@@ -16,7 +16,7 @@ internal class GyroscopeStreamHandler(
private var sensorEventListener: SensorEventListener? = null
private val sensor: Sensor by lazy {
- sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE)
+ sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE)!!
}
override fun onListen(arguments: Any?, events: EventSink) {
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index c448863..904a1b7 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -26,24 +26,25 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 31
+ namespace = "com.simform.example"
+ compileSdk = 34
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
- lintOptions {
- disable 'InvalidPackage'
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.simform.example"
- minSdkVersion 16
- targetSdkVersion 31
+ minSdk = flutter.minSdkVersion
+ targetSdk = flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -53,6 +54,14 @@ android {
signingConfig signingConfigs.debug
}
}
+
+ buildFeatures {
+ buildConfig = true
+ }
+
+ lint {
+ disable 'InvalidPackage'
+ }
}
flutter {
@@ -61,7 +70,7 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- testImplementation 'junit:junit:4.12'
+ testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml
index 5f768db..892d4b3 100644
--- a/example/android/app/src/debug/AndroidManifest.xml
+++ b/example/android/app/src/debug/AndroidManifest.xml
@@ -1,5 +1,4 @@
-
+
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
index aba51bf..3cce6f9 100644
--- a/example/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,4 @@
-
+
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 9065050..30930b1 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -1,12 +1,12 @@
buildscript {
- ext.kotlin_version = '1.7.10'
+ ext.kotlin_version = '1.9.20'
repositories {
google()
- jcenter()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.2.2'
+ classpath 'com.android.tools.build:gradle:8.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -14,7 +14,7 @@ buildscript {
allprojects {
repositories {
google()
- jcenter()
+ mavenCentral()
}
}
diff --git a/example/android/gradle.properties b/example/android/gradle.properties
index a5965ab..2799ecb 100644
--- a/example/android/gradle.properties
+++ b/example/android/gradle.properties
@@ -1,4 +1,5 @@
org.gradle.jvmargs=-Xmx1536M
-android.enableR8=true
android.useAndroidX=true
-android.enableJetifier=true
\ No newline at end of file
+android.enableJetifier=true
+android.nonTransitiveRClass=false
+android.nonFinalResIds=false
\ No newline at end of file
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
index cc5527d..628d33c 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip