Skip to content

Commit 719fde0

Browse files
committed
Fix sqlcipher on Android with Flutter 3.24
Squashed commit of the following: commit dfaff6a Author: The one with the braid <info@braid.business> Date: Thu Aug 8 13:53:05 2024 +0200 chore: update Gradle configuration - match minimum SDK version to Flutter's minimum - migrate compileSdkVersion to compileSdk - update compileSdk to Flutter's target Signed-off-by: The one with the braid <info@braid.business>
1 parent 07ef17b commit 719fde0

File tree

6 files changed

+22
-9
lines changed

6 files changed

+22
-9
lines changed

integration_tests/sqlcipher_flutter/android/app/build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,17 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 31
29+
compileSdkVersion 34
30+
namespace "com.example.sqlcipher_flutter"
31+
32+
compileOptions {
33+
sourceCompatibility = 1.8
34+
targetCompatibility = 1.8
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = "1.8"
39+
}
3040

3141
sourceSets {
3242
main.java.srcDirs += 'src/main/kotlin'

integration_tests/sqlcipher_flutter/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.6.10'
2+
ext.kotlin_version = '2.0.10'
33
repositories {
44
google()
55
jcenter()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.0.0'
9+
classpath 'com.android.tools.build:gradle:8.5.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

integration_tests/sqlcipher_flutter/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip

sqlcipher_flutter_libs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.4
2+
3+
- Fix compilation on Android by upgrading `compileSdk` version.
4+
15
## 0.6.3
26

37
- Enable extension loading on Windows and Linux to match the compile options

sqlcipher_flutter_libs/android/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:8.0.1'
11+
classpath 'com.android.tools.build:gradle:8.5.1'
1212
}
1313
}
1414

@@ -22,15 +22,14 @@ rootProject.allprojects {
2222
apply plugin: 'com.android.library'
2323

2424
android {
25-
compileSdkVersion 28
26-
2725
// Conditional for compatibility with AGP <4.2.
2826
if (project.android.hasProperty("namespace")) {
2927
namespace 'eu.simonbinder.sqlite3_flutter_libs'
3028
}
3129

3230
defaultConfig {
33-
minSdkVersion 16
31+
minSdkVersion 21
32+
compileSdk 34
3433
}
3534
lintOptions {
3635
disable 'InvalidPackage'

sqlcipher_flutter_libs/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sqlcipher_flutter_libs
22
description: Flutter plugin to include native SQLCipher libraries in your app
3-
version: 0.6.3
3+
version: 0.6.4
44
homepage: https://github.com/simolus3/sqlite3.dart/tree/main/sqlcipher_flutter_libs
55
issue_tracker: https://github.com/simolus3/sqlite3.dart/issues
66

0 commit comments

Comments
 (0)