Skip to content

Commit 9c020b7

Browse files
committed
2.3.1 hotfix: allow 0.18.1 on Android
1 parent 3a95d4b commit 9c020b7

File tree

14 files changed

+30
-17
lines changed

14 files changed

+30
-17
lines changed

flutter_libs/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Superfast NoSQL Flutter / Dart database. This package contains Flut
33
# Link to actual directory in repository so file links on pub.dev work.
44
repository: https://github.com/objectbox/objectbox-dart/tree/main/flutter_libs
55
homepage: https://objectbox.io
6-
version: 2.3.0
6+
version: 2.3.1
77

88
environment:
99
sdk: '>=2.14.0 <4.0.0'
@@ -14,7 +14,7 @@ dependencies:
1414
sdk: flutter
1515
# This is here just to ensure compatibility between objectbox-dart code and the libraries used
1616
# You should still depend on objectbox directly in your Flutter application.
17-
objectbox: 2.3.0
17+
objectbox: 2.3.1
1818
path_provider: ^2.0.0
1919

2020
dev_dependencies:

generator/lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ class Version {
44
///
55
/// This string is updated by the /tool/set-version.sh script
66
/// as part of the release process.
7-
static const String current = "2.3.0";
7+
static const String current = "2.3.1";
88
}

generator/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ description: ObjectBox Flutter / Dart database binding code generator - finds an
33
# Link to actual directory in repository so file links on pub.dev work.
44
repository: https://github.com/objectbox/objectbox-dart/tree/main/generator
55
homepage: https://objectbox.io
6-
version: 2.3.0
6+
version: 2.3.1
77

88
environment:
99
sdk: '>=2.18.0 <4.0.0'
1010

1111
dependencies:
12-
objectbox: 2.3.0
12+
objectbox: 2.3.1
1313
analyzer: '>=5.2.0 <7.0.0' # 5.1.0 has a bug where DartType.element has been removed.
1414
build: ^2.0.0
1515
collection: ^1.15.0

objectbox/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
## latest
1+
## 2.3.1 (2023-10-02)
2+
3+
* Fix "Loaded ObjectBox core dynamic library has unsupported version 0.18.1" on Android
24

35
## 2.3.0 (2023-09-19)
46

objectbox/example/flutter/event_management_tutorial/event_manager/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
flutter:
1313
sdk: flutter
1414

15-
objectbox: ^2.3.0
15+
objectbox: ^2.3.1
1616
objectbox_flutter_libs: any
1717
intl: any
1818

objectbox/example/flutter/event_management_tutorial/many_to_many/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
flutter:
1313
sdk: flutter
1414

15-
objectbox: ^2.3.0
15+
objectbox: ^2.3.1
1616
objectbox_flutter_libs: any
1717
intl: any
1818

objectbox/example/flutter/objectbox_demo/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
objectbox: ^2.3.0
12+
objectbox: ^2.3.1
1313
objectbox_flutter_libs: any
1414
intl: any
1515
path_provider: ^2.0.10

objectbox/example/flutter/objectbox_demo_relations/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
objectbox: ^2.3.0
12+
objectbox: ^2.3.1
1313
objectbox_flutter_libs: any
1414
intl: any
1515
path_provider: ^2.0.10 # 2.0.11+ requires Flutter 2.8.0

objectbox/example/flutter/objectbox_demo_sync/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
objectbox: ^2.3.0
12+
objectbox: ^2.3.1
1313
objectbox_sync_flutter_libs: any # For Sync support use this instead of objectbox_flutter_libs.
1414
intl: any
1515
path_provider: ^2.0.10

objectbox/lib/src/native/bindings/bindings.dart

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,19 @@ ObjectBoxC? _tryObjectBoxLibFile() {
9292
return ObjectBoxC(_lib!);
9393
}
9494

95-
bool _isSupportedVersion(ObjectBoxC obxc) => obxc.version_is_at_least(
96-
OBX_VERSION_MAJOR, OBX_VERSION_MINOR, OBX_VERSION_PATCH);
95+
bool _isSupportedVersion(ObjectBoxC obxc) {
96+
// Default: require "current" version exactly
97+
var minMajor = OBX_VERSION_MAJOR;
98+
var minMinor = OBX_VERSION_MINOR;
99+
var minPatch = OBX_VERSION_PATCH;
100+
// Special cases (if any):
101+
if (Platform.isAndroid) {
102+
minMajor = 0;
103+
minMinor = 18;
104+
minPatch = 1;
105+
}
106+
return obxc.version_is_at_least(minMajor, minMinor, minPatch);
107+
}
97108

98109
ObjectBoxC loadObjectBoxLib() {
99110
ObjectBoxC? obxc;

objectbox/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ homepage: https://objectbox.io
44
# Link to actual directory in repository so file links on pub.dev work.
55
repository: https://github.com/objectbox/objectbox-dart/tree/main/objectbox
66
documentation: https://docs.objectbox.io
7-
version: 2.3.0
7+
version: 2.3.1
88

99
environment:
1010
# minimum Dart SDK (also see generator and flutter_libs)

sync_flutter_libs/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Fast Flutter database for persisting Dart objects. This package con
33
# Link to actual directory in repository so file links on pub.dev work.
44
repository: https://github.com/objectbox/objectbox-dart/tree/main/sync_flutter_libs
55
homepage: https://objectbox.io
6-
version: 2.3.0
6+
version: 2.3.1
77

88
environment:
99
sdk: '>=2.14.0 <4.0.0'
@@ -14,7 +14,7 @@ dependencies:
1414
sdk: flutter
1515
# This is here just to ensure compatibility between objectbox-dart code and the libraries used
1616
# You should still depend on objectbox directly in your Flutter application.
17-
objectbox: 2.3.0
17+
objectbox: 2.3.1
1818
path_provider: ^2.0.0
1919

2020
dev_dependencies:

tool/publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msys=false
77
case "$( uname )" in #(
88
MSYS* | MINGW* ) msys=true ;; #(
99
esac
10-
if [ $msys ]; then
10+
if [ "$msys" = true ]; then
1111
YQCMD="${root}/tool/yq_windows_amd64.exe"
1212
else
1313
YQCMD="${root}/tool/yq_linux_amd64"

tool/yq_linux_amd64

100644100755
File mode changed.

0 commit comments

Comments
 (0)