Skip to content

Commit 1e3f5d2

Browse files
Merge branch 'c-lib-0.16.0'
2 parents 37f8089 + 77ccb09 commit 1e3f5d2

File tree

11 files changed

+46
-10
lines changed

11 files changed

+46
-10
lines changed

dev-doc/updating-c-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Dart won't error on C function signature mismatch, leading to obscure memory bug
99
Update `flutter_libs` and `sync_flutter_libs` with **compatible library versions**:
1010

1111
- Linux and Windows
12-
- Shortcut: search and replace e.g. `set(OBJECTBOX_VERSION 0.15.2)` in `CMakeLists.txt`.
12+
- Shortcut: search and replace e.g. `set(OBJECTBOX_VERSION 0.16.0)` in `CMakeLists.txt`.
1313
- [flutter_libs Linux](../flutter_libs/linux/CMakeLists.txt)
1414
- [flutter_libs Windows](../flutter_libs/windows/CMakeLists.txt)
1515
- [sync_flutter_libs Linux](../sync_flutter_libs/linux/CMakeLists.txt)
1616
- [sync_flutter_libs Windows](../sync_flutter_libs/windows/CMakeLists.txt)
1717
- Android ([view releases](https://github.com/objectbox/objectbox-java/releases))
18-
- Shortcut: search and replace `-android:3.1.2` in `build.gradle` files.
18+
- Shortcut: search and replace `-android:3.1.3` in `build.gradle` files.
1919
- In [flutter_libs](../flutter_libs/android/build.gradle)
2020
- In [sync_flutter_libs](../sync_flutter_libs/android/build.gradle)
2121
- Swift (iOS/macOS) ([view releases](https://github.com/objectbox/objectbox-swift/releases))

flutter_libs/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ repositories {
1616

1717
dependencies {
1818
// https://search.maven.org/search?q=g:io.objectbox%20objectbox-android
19-
implementation "io.objectbox:objectbox-android:3.1.2"
19+
implementation "io.objectbox:objectbox-android:3.1.3"
2020
}

flutter_libs/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ set(objectbox_flutter_libs_bundled_libraries
2626

2727
# ----------------------------------------------------------------------
2828

29-
set(OBJECTBOX_VERSION 0.15.2)
29+
set(OBJECTBOX_VERSION 0.16.0)
3030

3131
set(OBJECTBOX_ARCH ${CMAKE_SYSTEM_PROCESSOR})
3232
if (${OBJECTBOX_ARCH} MATCHES "x86_64")

flutter_libs/windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ set(objectbox_flutter_libs_bundled_libraries
2525

2626
# ----------------------------------------------------------------------
2727

28-
set(OBJECTBOX_VERSION 0.15.2)
28+
set(OBJECTBOX_VERSION 0.16.0)
2929

3030
set(OBJECTBOX_ARCH ${CMAKE_SYSTEM_PROCESSOR})
3131
if (${OBJECTBOX_ARCH} MATCHES "AMD64")

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eu
55
# It's important that the generated dart bindings and the c-api library version match. Dart won't error on C function
66
# signature mismatch, leading to obscure memory bugs.
77
# For how to upgrade the version see dev-doc/updating-c-library.md
8-
cLibVersion=0.15.2
8+
cLibVersion=0.16.0
99
os=$(uname)
1010
cLibArgs="$*"
1111

objectbox/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
(requires Flutter 2.8.0/Dart 2.15.0 or newer).
44
* Rename `Store.runIsolated` to `runAsync`, drop unused `mode` parameter, propagate errors and
55
handle premature isolate exit.
6-
76
* The native ObjectBox library is also searched for in the `lib` subfolder on desktop OS (macOS,
87
Linux, Windows). This is where the [`install.sh`](/install.sh) script downloads it by default.
98
E.g. it is no longer necessary to install the library globally to run `dart test` or `flutter test`.
9+
* Windows: Support database directory paths that contain unicode (UTF-8) characters. #406
10+
* Update: [objectbox-c 0.16.0](https://github.com/objectbox/objectbox-c/releases/tag/v0.16.0).
11+
* Update: [objectbox-android 3.1.3](https://github.com/objectbox/objectbox-java/releases/tag/V3.1.3).
1012

1113
## 1.4.1 (2022-03-01)
1214

objectbox/test/admin_test.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,14 @@ void main() {
3939
skip: Admin.isAvailable()
4040
? null
4141
: 'Admin is not available in the loaded library');
42+
43+
test('admin not available', () {
44+
expect(
45+
() => Admin(env.store),
46+
throwsA(predicate((UnsupportedError e) => e.toString().contains(
47+
'Admin is not available in the loaded ObjectBox runtime library.'))));
48+
},
49+
skip: Admin.isAvailable()
50+
? 'Admin is available in the loaded library'
51+
: false);
4252
}

objectbox/test/store_test.dart

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,30 @@ void main() {
230230
Directory('store').deleteSync(recursive: true);
231231
});
232232

233+
test('store open in unicode symbol path', () async {
234+
final parentDir = Directory('unicode-test');
235+
await parentDir.create();
236+
final unicodeDir = Directory(
237+
parentDir.path + Platform.pathSeparator + 'Îñţérñåţîöñåļîžåţîờñ');
238+
final store = Store(getObjectBoxModel(), directory: unicodeDir.path);
239+
store.close();
240+
241+
// Check only expected files and directories exist.
242+
final paths = await parentDir
243+
.list(recursive: true)
244+
.map((event) => event.path)
245+
.toList();
246+
expect(paths.length, 3);
247+
final expectedPaths = [
248+
unicodeDir.path,
249+
File(unicodeDir.path + Platform.pathSeparator + 'data.mdb').path,
250+
File(unicodeDir.path + Platform.pathSeparator + 'lock.mdb').path
251+
];
252+
expect(paths, containsAll(expectedPaths));
253+
254+
parentDir.deleteSync(recursive: true);
255+
});
256+
233257
test('store run in isolate', () async {
234258
final env = TestEnv('store');
235259
final id = env.box.put(TestEntity(tString: 'foo'));

sync_flutter_libs/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ repositories {
1616

1717
dependencies {
1818
// https://search.maven.org/search?q=g:io.objectbox%20objectbox-sync-android
19-
implementation "io.objectbox:objectbox-sync-android:3.1.2"
19+
implementation "io.objectbox:objectbox-sync-android:3.1.3"
2020
}

sync_flutter_libs/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ set(objectbox_sync_flutter_libs_bundled_libraries
2626

2727
# ----------------------------------------------------------------------
2828

29-
set(OBJECTBOX_VERSION 0.15.2)
29+
set(OBJECTBOX_VERSION 0.16.0)
3030

3131
set(OBJECTBOX_ARCH ${CMAKE_SYSTEM_PROCESSOR})
3232
if (${OBJECTBOX_ARCH} MATCHES "x86_64")

0 commit comments

Comments
 (0)