From 932fb94838d7ad9c5d8550e84ac73f2e4f85eae4 Mon Sep 17 00:00:00 2001 From: hunghd Date: Fri, 1 Nov 2024 11:30:42 +0700 Subject: [PATCH] upgrade gradle and fix bug on android --- android/build.gradle | 4 ++-- .../src/main/kotlin/vn/hunghd/flutterdownloader/TaskDao.kt | 2 +- example/android/app/build.gradle | 4 ++-- 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 78f9b70b..982b318e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -26,7 +26,7 @@ apply plugin: "org.jlleitschuh.gradle.ktlint" android { namespace = "vn.hunghd.flutterdownloader" - compileSdk = 34 + compileSdk = 35 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -45,7 +45,7 @@ android { defaultConfig { minSdk = 21 - targetSdk = 34 + targetSdk = 35 } } diff --git a/android/src/main/kotlin/vn/hunghd/flutterdownloader/TaskDao.kt b/android/src/main/kotlin/vn/hunghd/flutterdownloader/TaskDao.kt index a3f7b3da..4f17f9ec 100644 --- a/android/src/main/kotlin/vn/hunghd/flutterdownloader/TaskDao.kt +++ b/android/src/main/kotlin/vn/hunghd/flutterdownloader/TaskDao.kt @@ -93,7 +93,7 @@ class TaskDao(private val dbHelper: TaskDbHelper) { fun loadTasksWithRawQuery(query: String?): List { val db = dbHelper.readableDatabase - val cursor = db.rawQuery(query, null) + val cursor = db.rawQuery(query!!, null) val result: MutableList = ArrayList() while (cursor.moveToNext()) { result.add(parseCursor(cursor)) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index a4d5275e..863d78e1 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -24,13 +24,13 @@ if (flutterVersionName == null) { android { namespace = "vn.hunghd.example" - compileSdk = 34 + compileSdk = 35 ndkVersion = flutter.ndkVersion defaultConfig { applicationId "vn.hunghd.example" minSdk = 21 - targetSdk = 34 + targetSdk = 35 versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index d951fac2..2fa91c5f 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 3c239623..1d686087 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") - id("com.android.application") version ("8.3.1") apply false + id("com.android.application") version ('8.7.2') apply false id("org.jetbrains.kotlin.android") version ("1.9.23") apply false }