Skip to content

Commit 852651e

Browse files
committed
Merge remote-tracking branch 'upstream/main' into chore/update-sqlite3-v2.5.0
2 parents 5a7fec5 + 79770f3 commit 852651e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1720
-280
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,13 @@ jobs:
173173
dart-dependencies-${{ matrix.dart }}-
174174
dart-dependencies-
175175
176-
- name: Test
176+
- name: Test sqlite3 package
177+
run: |
178+
dart pub get
179+
dart test -P ci
180+
working-directory: sqlite3/
181+
182+
- name: Test sqlite3_test package
177183
run: |
178184
dart pub get
179185
dart test -P ci
@@ -249,8 +255,8 @@ jobs:
249255

250256
- name: Start simulator
251257
run: |
252-
IPHONE12=$(xcrun xctrace list devices 2>&1 | grep -m 1 "iPhone 14 Pro" | awk -F'[()]' '{print $4}')
253-
xcrun simctl boot $IPHONE12
258+
IPHONE=$(xcrun xctrace list devices 2>&1 | grep -m 1 "iPhone" | awk -F'[()]' '{print $4}')
259+
xcrun simctl boot $IPHONE
254260
255261
- uses: actions/checkout@v4
256262
- uses: subosito/[email protected]

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
This project contains Dart packages to use SQLite from Dart via `dart:ffi`.
44

55
The main package in this repository is [`sqlite3`](sqlite3), which contains all the Dart apis and their implementation.
6-
`package:sqlite3` is a pure-Dart package without a dependency on Flutter.
6+
`package:sqlite3` is a pure-Dart package without a dependency on Flutter.
77
It can be used both in Flutter apps or in standalone Dart applications.
88

99
The `sqlite3_flutter_libs` and `sqlcipher_flutter_libs` packages contain no Dart code at all. Flutter users can depend
1010
on one of them to include native libraries in their apps.
1111

12+
`package:sqlite3_test` contains utilities that make integrating SQLite databases into Dart tests easier.
13+
In particular, they patch `CURRENT_TIMESTAMP` and related constructs to return the (potentially faked) time
14+
returned by `package:clock`.
15+
1216
## Example Usage
1317

1418
A file with basic usage examples for pure Dart can be found [here](sqlite3/example/main.dart).

integration_tests/flutter_libs/.metadata

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "2524052335ec76bb03e04ede244b071f1b86d190"
7+
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
88
channel: "stable"
99

1010
project_type: app
@@ -13,26 +13,26 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
17-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
16+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
17+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
1818
- platform: android
19-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
20-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
19+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
20+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
2121
- platform: ios
22-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
23-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
22+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
23+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
2424
- platform: linux
25-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
26-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
25+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
26+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
2727
- platform: macos
28-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
29-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
28+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
29+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
3030
- platform: web
31-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
32-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
31+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
32+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
3333
- platform: windows
34-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
35-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
34+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
35+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
3636

3737
# User provided section
3838

integration_tests/flutter_libs/android/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ gradle-wrapper.jar
77
GeneratedPluginRegistrant.java
88

99
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
10+
# See https://flutter.dev/to/reference-keystore
1111
key.properties
12+
**/*.keystore
13+
**/*.jks
Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,43 @@
1-
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
3-
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
5-
localProperties.load(reader)
6-
}
7-
}
8-
9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15-
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
176
}
187

19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
22-
}
23-
24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
288
android {
29-
compileSdkVersion 34
9+
namespace = "com.example.flutter_libs"
10+
compileSdk = flutter.compileSdkVersion
3011

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
12+
compileOptions {
13+
sourceCompatibility = JavaVersion.VERSION_1_8
14+
targetCompatibility = JavaVersion.VERSION_1_8
3315
}
3416

35-
lintOptions {
36-
disable 'InvalidPackage'
17+
kotlinOptions {
18+
jvmTarget = JavaVersion.VERSION_1_8
3719
}
3820

3921
defaultConfig {
4022
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41-
applicationId "com.example.flutter_libs"
42-
minSdkVersion 21
43-
targetSdkVersion 28
44-
versionCode flutterVersionCode.toInteger()
45-
versionName flutterVersionName
23+
applicationId = "com.example.flutter_libs"
24+
// You can update the following values to match your application needs.
25+
// For more information, see: https://flutter.dev/to/review-gradle-config.
26+
minSdk = flutter.minSdkVersion
27+
targetSdk = flutter.targetSdkVersion
28+
versionCode = flutter.versionCode
29+
versionName = flutter.versionName
4630
}
4731

4832
buildTypes {
4933
release {
5034
// TODO: Add your own signing config for the release build.
5135
// Signing with the debug keys for now, so `flutter run --release` works.
52-
signingConfig signingConfigs.debug
36+
signingConfig = signingConfigs.debug
5337
}
5438
}
5539
}
5640

5741
flutter {
58-
source '../..'
59-
}
60-
61-
dependencies {
62-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
42+
source = "../.."
6343
}

integration_tests/flutter_libs/android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.flutter_libs">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>
Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.flutter_libs">
3-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
4-
calls FlutterMain.startInitialization(this); in its onCreate method.
5-
In most cases you can leave this as-is, but you if you want to provide
6-
additional functionality it is fine to subclass or reimplement
7-
FlutterApplication and put your custom class here. -->
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
82
<application
9-
android:name="${applicationName}"
103
android:label="flutter_libs"
4+
android:name="${applicationName}"
115
android:icon="@mipmap/ic_launcher">
126
<activity
137
android:name=".MainActivity"
8+
android:exported="true"
149
android:launchMode="singleTop"
10+
android:taskAffinity=""
1511
android:theme="@style/LaunchTheme"
1612
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1713
android:hardwareAccelerated="true"
@@ -24,15 +20,6 @@
2420
android:name="io.flutter.embedding.android.NormalTheme"
2521
android:resource="@style/NormalTheme"
2622
/>
27-
<!-- Displays an Android View that continues showing the launch screen
28-
Drawable until Flutter paints its first frame, then this splash
29-
screen fades out. A splash screen is useful to avoid any visual
30-
gap between the end of Android's launch screen and the painting of
31-
Flutter's first frame. -->
32-
<meta-data
33-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
34-
android:resource="@drawable/launch_background"
35-
/>
3623
<intent-filter>
3724
<action android:name="android.intent.action.MAIN"/>
3825
<category android:name="android.intent.category.LAUNCHER"/>
@@ -44,4 +31,15 @@
4431
android:name="flutterEmbedding"
4532
android:value="2" />
4633
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
4745
</manifest>

integration_tests/flutter_libs/android/app/src/main/kotlin/com/example/flutter_libs/MainActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package com.example.flutter_libs
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity() {
6-
}
5+
class MainActivity: FlutterActivity()
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<!-- Theme applied to the Android Window while the process is starting -->
4-
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15-
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16-
<item name="android:windowBackground">@android:color/white</item>
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
1717
</style>
1818
</resources>

integration_tests/flutter_libs/android/app/src/profile/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.flutter_libs">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>

integration_tests/flutter_libs/android/build.gradle

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
1-
buildscript {
2-
ext.kotlin_version = '1.6.10'
3-
repositories {
4-
google()
5-
jcenter()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.0.0'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
17-
jcenter()
4+
mavenCentral()
185
}
196
}
207

21-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
229
subprojects {
2310
project.buildDir = "${rootProject.buildDir}/${project.name}"
2411
}
2512
subprojects {
26-
project.evaluationDependsOn(':app')
13+
project.evaluationDependsOn(":app")
2714
}
2815

2916
tasks.register("clean", Delete) {
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
2-
android.enableR8=true
1+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
32
android.useAndroidX=true
43
android.enableJetifier=true
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
// Copyright 2014 The Flutter Authors. All rights reserved.
2-
// Use of this source code is governed by a BSD-style license that can be
3-
// found in the LICENSE file.
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
49

5-
include ':app'
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
611

7-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
8-
def properties = new Properties()
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
918

10-
assert localPropertiesFile.exists()
11-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version "8.7.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
23+
}
1224

13-
def flutterSdkPath = properties.getProperty("flutter.sdk")
14-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
15-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
25+
include ":app"

integration_tests/flutter_libs/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ publish_to: 'none'
55
version: 1.0.0+1
66

77
environment:
8-
sdk: ">=2.12.0-0 <3.0.0"
8+
sdk: ^3.5.0
99

1010
dependencies:
1111
sqlite3_flutter_libs:

0 commit comments

Comments
 (0)