Skip to content

Commit fc24cc4

Browse files
SteinerOknpurushe
andauthored
Update SQLite to v3.49.0 (#193)
* Update SQLite to v3.46.0 * Update Gradle * Bump tools * Try to update CI * Try to update CI * Try to update CI * Try to update CI * Try to update CI * Try to update CI * Try to update CI * Rollback CI * Add missed SQLiteUpdateHook * Update to v3.47.0 * Fix method name in SQLiteUpdateHook * Bump SQLite to 3.47.2 * Bump SQLite to 3.48.0 * Update Gradle * Bump SQLite to v3.49.0 --------- Co-authored-by: Nikhil Purushe <npurushe@gmail.com>
1 parent fd6801a commit fc24cc4

File tree

12 files changed

+50
-58
lines changed

12 files changed

+50
-58
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ jobs:
1313
matrix:
1414
api-level: [29]
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 1
1919

2020
- name: Set up JDK 17
21-
uses: actions/setup-java@v2
21+
uses: actions/setup-java@v4
2222
with:
2323
java-version: "17"
2424
distribution: "adopt"
2525

2626
- name: Run Android tests
27-
uses: reactivecircus/android-emulator-runner@e790971012b979513b4e2fe70d4079bc0ca8a1ae
27+
uses: reactivecircus/android-emulator-runner@v2
2828
with:
2929
api-level: ${{ matrix.api-level }}
3030
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Upload results
3636
if: ${{ always() }}
37-
uses: actions/upload-artifact@v2
37+
uses: actions/upload-artifact@v4
3838
with:
3939
name: instrumentation-test-results ${{ matrix.api-level }}
4040
path: ./**/build/reports/androidTests/connected/**

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
Change Log
22
==========
33

4+
## 3.48.0
5+
- [SQLite 3.49.0](https://www.sqlite.org/releaselog/3_49_0.html)
6+
- [SQLite 3.48.0](https://www.sqlite.org/releaselog/3_48_0.html)
7+
- [SQLite 3.47.2](https://www.sqlite.org/releaselog/3_47_2.html)
8+
- [SQLite 3.47.1](https://www.sqlite.org/releaselog/3_47_2.html)
9+
- [SQLite 3.47.0](https://www.sqlite.org/releaselog/3_47_0.html)
10+
- [SQLite 3.46.1](https://www.sqlite.org/releaselog/3_46_1.html)
11+
- [SQLite 3.46.0](https://www.sqlite.org/releaselog/3_46_0.html)
12+
- [SQLite 3.45.3](https://www.sqlite.org/releaselog/3_45_3.html)
13+
- [SQLite 3.45.2](https://www.sqlite.org/releaselog/3_45_2.html)
14+
- [SQLite 3.45.1](https://www.sqlite.org/releaselog/3_45_2.html)
15+
416
## 3.45.0
517
- [SQLite 3.45.0](https://www.sqlite.org/releaselog/3_45_0.html)
618
- [SQLite 3.44.2](https://www.sqlite.org/releaselog/3_44_2.html)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Then add the sqlite-android artifact from this repository as a dependency:
5151

5252
```gradle
5353
dependencies {
54-
implementation 'com.github.requery:sqlite-android:3.45.0'
54+
implementation 'com.github.requery:sqlite-android:3.49.0'
5555
}
5656
```
5757
Then change usages of `android.database.sqlite.SQLiteDatabase` to
@@ -109,13 +109,13 @@ Note that starting August 1, 2019, your apps published on Google Play will [need
109109
Requirements
110110
------------
111111

112-
The min SDK level is API level 19 (KitKat).
112+
The min SDK level is API level 21 (Lollipop).
113113

114114
Versioning
115115
----------
116116

117117
The library is versioned after the version of SQLite it contains. For changes specific to just the
118-
wrapper API, a revision number is added e.g., 3.45.0-X, where X is the revision number.
118+
wrapper API, a revision number is added, e.g., 3.49.0-X, where X is the revision number.
119119

120120
Acknowledgements
121121
----------------
@@ -153,7 +153,7 @@ Changes
153153
License
154154
-------
155155

156-
Copyright (C) 2017-2024 requery.io
156+
Copyright (C) 2017-2025 requery.io
157157
Copyright (C) 2005-2012 The Android Open Source Project
158158

159159
Licensed under the Apache License, Version 2.0 (the "License");

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
plugins {
2-
id "com.android.library" version "8.2.1" apply false
3-
id "de.undercouch.download" version "5.5.0" apply false
2+
id "com.android.library" version "8.8.0" apply false
3+
id "de.undercouch.download" version "5.6.0" apply false
44
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
1616
android.useAndroidX=true
1717
#
1818
GROUP=io.requery
19-
VERSION_NAME=3.45.0-SNAPSHOT
19+
VERSION_NAME=3.49.0-SNAPSHOT
2020
#
2121
POM_DEVELOPER_ID=TODO
2222
POM_DEVELOPER_NAME=TODO
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

sqlite-android/build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import com.vanniktech.maven.publish.SonatypeHost
33
plugins {
44
id "de.undercouch.download"
55
id "com.android.library"
6-
id "com.vanniktech.maven.publish" version "0.27.0"
6+
id "com.vanniktech.maven.publish" version "0.30.0"
77
}
88

99
android {
10-
buildToolsVersion = "34.0.0"
10+
buildToolsVersion = "35.0.1"
1111
ndkVersion "28.0.13004108"
1212

13-
compileSdk 34
13+
compileSdk 35
1414

1515
namespace "io.requery.android.sqlite"
1616

1717
defaultConfig {
18-
minSdkVersion 19
18+
minSdkVersion 21
1919
versionName VERSION_NAME
2020

2121
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -48,17 +48,17 @@ android {
4848
}
4949

5050
dependencies {
51-
api("androidx.core:core:1.12.0")
51+
api("androidx.core:core:1.15.0")
5252
api("androidx.sqlite:sqlite:2.4.0")
5353
testImplementation("junit:junit:4.13.2")
54-
androidTestImplementation("androidx.test:core:1.5.0")
55-
androidTestImplementation("androidx.test:runner:1.5.2")
56-
androidTestImplementation("androidx.test:rules:1.5.0")
57-
androidTestImplementation("androidx.test.ext:junit:1.1.5")
54+
androidTestImplementation("androidx.test:core:1.6.1")
55+
androidTestImplementation("androidx.test:runner:1.6.2")
56+
androidTestImplementation("androidx.test:rules:1.6.1")
57+
androidTestImplementation("androidx.test.ext:junit:1.2.1")
5858
}
5959

6060
ext {
61-
sqliteDistributionUrl = "https://www.sqlite.org/2024/sqlite-amalgamation-3450000.zip"
61+
sqliteDistributionUrl = "https://www.sqlite.org/2025/sqlite-amalgamation-3490000.zip"
6262
}
6363

6464
tasks.register("downloadSqlite", Download) {

sqlite-android/src/androidTest/java/io/requery/android/database/DatabaseCursorTest.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package io.requery.android.database;
1919

20-
import android.annotation.TargetApi;
2120
import android.content.ContentValues;
2221
import android.content.Context;
2322
import android.database.Cursor;
@@ -93,7 +92,6 @@ private void populateDefaultTable() {
9392
mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');");
9493
}
9594

96-
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
9795
@MediumTest
9896
@Test
9997
public void testBlob() {
@@ -102,23 +100,23 @@ public void testBlob() {
102100
"CREATE TABLE test (_id INTEGER PRIMARY KEY, s TEXT, d REAL, l INTEGER, b BLOB);");
103101
// insert blob
104102
Object[] args = new Object[4];
105-
103+
106104
byte[] blob = new byte[1000];
107105
byte value = 99;
108-
Arrays.fill(blob, value);
106+
Arrays.fill(blob, value);
109107
args[3] = blob;
110-
108+
111109
String s = "text";
112110
args[0] = s;
113111
Double d = 99.9;
114112
args[1] = d;
115113
Long l = (long)1000;
116114
args[2] = l;
117-
115+
118116
String sql = "INSERT INTO test (s, d, l, b) VALUES (?,?,?,?)";
119117
mDatabase.execSQL(sql, args);
120118
// use cursor to access blob
121-
Cursor c = mDatabase.query("test", null, null, null, null, null, null);
119+
Cursor c = mDatabase.query("test", null, null, null, null, null, null);
122120
c.moveToNext();
123121
ContentValues cv = new ContentValues();
124122
//DatabaseUtils.cursorRowToContentValues(c, cv);
@@ -131,7 +129,7 @@ public void testBlob() {
131129
cv.put(columns[i], c.getString(i));
132130
}
133131
}
134-
132+
135133
int bCol = c.getColumnIndexOrThrow("b");
136134
int sCol = c.getColumnIndexOrThrow("s");
137135
int dCol = c.getColumnIndexOrThrow("d");
@@ -143,7 +141,7 @@ public void testBlob() {
143141
assertEquals((long)l, c.getLong(lCol));
144142
c.close();
145143
}
146-
144+
147145
@MediumTest
148146
@Test
149147
public void testRealColumns() {
@@ -286,8 +284,8 @@ public void testLargeField() {
286284
@Test
287285
public void testManyRowsLong() {
288286
mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);");
289-
290-
final int count = 36799;
287+
288+
final int count = 36799;
291289
mDatabase.execSQL("BEGIN Transaction;");
292290
for (int i = 0; i < count; i++) {
293291
mDatabase.execSQL("INSERT INTO test (data) VALUES (" + i + ");");
@@ -343,12 +341,12 @@ public void testManyRowsTxt() {
343341
assertEquals(count, c.getCount());
344342
c.close();
345343
}
346-
344+
347345
@LargeTest
348346
@Test
349347
public void testManyRowsTxtLong() {
350348
mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, txt TEXT, data INT);");
351-
349+
352350
Random random = new Random(System.currentTimeMillis());
353351
StringBuilder randomString = new StringBuilder(1979);
354352
for (int i = 0; i < 1979; i++) {
@@ -382,7 +380,7 @@ public void testManyRowsTxtLong() {
382380
assertEquals(count, c.getCount());
383381
c.close();
384382
}
385-
383+
386384
@MediumTest
387385
@Test
388386
public void testRequery() {

sqlite-android/src/androidTest/java/io/requery/android/database/NewDatabasePerformanceTestSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import androidx.test.ext.junit.runners.AndroidJUnit4;
2525

26-
@Ignore
26+
@Ignore("No reason to ignore")
2727
@RunWith(AndroidJUnit4.class)
2828
public class NewDatabasePerformanceTestSuite extends TestSuite {
2929

sqlite-android/src/main/java/io/requery/android/database/AbstractCursor.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import android.database.DataSetObservable;
2727
import android.database.DataSetObserver;
2828
import android.net.Uri;
29-
import android.os.Build;
3029
import android.os.Bundle;
3130
import android.util.Log;
3231

@@ -311,11 +310,7 @@ public void unregisterDataSetObserver(DataSetObserver observer) {
311310
@SuppressWarnings("deprecation")
312311
protected void onChange(boolean selfChange) {
313312
synchronized (mSelfObserverLock) {
314-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
315-
mContentObservable.dispatchChange(selfChange, null);
316-
} else {
317-
mContentObservable.dispatchChange(selfChange);
318-
}
313+
mContentObservable.dispatchChange(selfChange, null);
319314
if (mNotifyUri != null && selfChange) {
320315
mContentResolver.notifyChange(mNotifyUri, mSelfObserver);
321316
}

0 commit comments

Comments
 (0)