diff --git a/CHANGELOG.md b/CHANGELOG.md index e926317f..aea9ad12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +0.6.1 (2020-01-23) +------------------ +* Fix Flutter Android/iOS release build failures +* Updated to objectbox-c 0.8.2 + 0.6.0 (2019-12-19) ------------------ * Flutter iOS support diff --git a/README.md b/README.md index 63c80141..55f75419 100644 --- a/README.md +++ b/README.md @@ -16,17 +16,16 @@ Installation Add the following dependencies to your `pubspec.yaml`: ```yaml dependencies: - objectbox: ^0.6.0 + objectbox: ^0.6.1 dev_dependencies: build_runner: ^1.0.0 - objectbox_generator: ^0.6.0 + objectbox_generator: ^0.6.1 ``` Proceed based on whether you're developing a Flutter app or a standalone dart program: 1. **Flutter** only steps: * Install the packages `flutter pub get` - * Note: only debug versions (e.g. `flutter run`) work at the moment, `flutter build` currently fails for release builds 1. **Dart standalone programs**: * Install the packages `pub get` * Install [objectbox-c](https://github.com/objectbox/objectbox-c) system-wide: diff --git a/android/build.gradle b/android/build.gradle index 20fcab36..aee2704b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,5 +4,6 @@ android { } dependencies { + // https://github.com/objectbox/objectbox-java/releases implementation "io.objectbox:objectbox-android:2.5.0" } diff --git a/example/flutter/objectbox_demo/pubspec.yaml b/example/flutter/objectbox_demo/pubspec.yaml index 87d833ef..d62079d0 100644 --- a/example/flutter/objectbox_demo/pubspec.yaml +++ b/example/flutter/objectbox_demo/pubspec.yaml @@ -11,18 +11,18 @@ dependencies: cupertino_icons: ^0.1.2 path_provider: any intl: any - objectbox: ^0.6.0 + objectbox: ^0.6.1 dev_dependencies: flutter_test: sdk: flutter build_runner: ^1.0.0 - objectbox_generator: ^0.6.0 + objectbox_generator: ^0.6.1 flutter: uses-material-design: true -# --------------------------------- +# Note: these overrides are only for ObjectBox internal development, don't use them in your app. dependency_overrides: objectbox: path: ../../.. diff --git a/example/flutter/objectbox_demo_desktop/pubspec.yaml b/example/flutter/objectbox_demo_desktop/pubspec.yaml index 069bcbe7..393958a0 100644 --- a/example/flutter/objectbox_demo_desktop/pubspec.yaml +++ b/example/flutter/objectbox_demo_desktop/pubspec.yaml @@ -11,13 +11,13 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^0.1.0 - objectbox: ^0.6.0 + objectbox: ^0.6.1 dev_dependencies: flutter_test: sdk: flutter build_runner: ^1.0.0 - objectbox_generator: ^0.6.0 + objectbox_generator: ^0.6.1 flutter: uses-material-design: true @@ -40,7 +40,7 @@ flutter: weight: 900 -# --------------------------------- +# Note: these overrides are only for ObjectBox internal development, don't use them in your app. dependency_overrides: objectbox: path: ../../.. diff --git a/generator/pubspec.yaml b/generator/pubspec.yaml index a194f618..b45dfbef 100644 --- a/generator/pubspec.yaml +++ b/generator/pubspec.yaml @@ -1,5 +1,5 @@ name: objectbox_generator -version: 0.6.0 +version: 0.6.1 repository: https://github.com/objectbox/objectbox-dart homepage: https://objectbox.io description: ObjectBox binding code generator - finds annotated entities and adds them to the ObjectBox DB model. @@ -8,7 +8,7 @@ environment: sdk: ">=2.5.0 <3.0.0" dependencies: - objectbox: 0.6.0 + objectbox: 0.6.1 build: ^1.0.0 source_gen: ^0.9.0 analyzer: ">=0.35.0 <0.100.0" diff --git a/install.sh b/install.sh index b01a63bd..41e3c1ae 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash set -eu -cLibVersion=0.8.1 +# https://github.com/objectbox/objectbox-c/releases +cLibVersion=0.8.2 os=$(uname) # if there's no tty this is probably part of a docker build - therefore we install the c-api explicitly diff --git a/ios/download-framework.sh b/ios/download-framework.sh index 6ef8aa15..b1fe2878 100755 --- a/ios/download-framework.sh +++ b/ios/download-framework.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -# NOTE: run before publishing +# NOTE: run this script before publishing +# https://github.com/objectbox/objectbox-swift/releases/ obxSwiftVersion="1.2.0" dir=$(dirname "$0") diff --git a/lib/src/bindings/structs.dart b/lib/src/bindings/structs.dart index e0196513..a4bdd75e 100644 --- a/lib/src/bindings/structs.dart +++ b/lib/src/bindings/structs.dart @@ -32,7 +32,7 @@ class OBX_id_array extends Struct { array.length = items.length; array._itemsPtr = allocate(count: array.length); for (int i = 0; i < items.length; ++i) { - array._itemsPtr.elementAt(i).value = items[i]; + array._itemsPtr[i] = items[i]; } // call the function with the structure and free afterwards @@ -83,7 +83,7 @@ class OBX_bytes extends Struct { // create a copy of the data bytes._dataPtr = allocate(count: bytes.length); for (int i = 0; i < data.length; ++i) { - bytes._dataPtr.elementAt(i).value = data[i]; + bytes._dataPtr[i] = data[i]; } return ptr; diff --git a/lib/src/box.dart b/lib/src/box.dart index 59af4538..53594b0e 100644 --- a/lib/src/box.dart +++ b/lib/src/box.dart @@ -109,7 +109,7 @@ class Box { Pointer allIdsMemory = allocate(count: objects.length); try { for (int i = 0; i < allPropVals.length; ++i) { - allIdsMemory.elementAt(i).value = (allPropVals[i][_modelEntity.idProperty.name] as int); + allIdsMemory[i] = (allPropVals[i][_modelEntity.idProperty.name] as int); } // marshal all objects to be put into the box diff --git a/lib/src/query/query.dart b/lib/src/query/query.dart index 634b7bdd..1518c8e5 100644 --- a/lib/src/query/query.dart +++ b/lib/src/query/query.dart @@ -307,7 +307,7 @@ class StringCondition extends PropertyCondition { final arrayOfCStrings = allocate>(count: listLength); try { for (int i = 0; i < _list.length; i++) { - arrayOfCStrings.elementAt(i).value = Utf8.toUtf8(_list[i]); + arrayOfCStrings[i] = Utf8.toUtf8(_list[i]); } return func(builder._cBuilder, _property._propertyId, arrayOfCStrings, listLength, _caseSensitive ? 1 : 0); } finally { @@ -373,7 +373,7 @@ class IntegerCondition extends PropertyCondition { final listPtr = allocate

(count: length); try { for (int i=0; i { final listPtr = allocate(count: length); try { for (int i = 0; i < length; i++) { - listPtr.elementAt(i).value = _list[i]; + listPtr[i] = _list[i]; } return func(builder._cBuilder, _property._propertyId, listPtr, length); } finally { @@ -402,7 +402,7 @@ class IntegerCondition extends PropertyCondition { final listPtr = allocate(count: length); try { for (int i = 0; i < length; i++) { - listPtr.elementAt(i).value = _list[i]; + listPtr[i] = _list[i]; } return func(builder._cBuilder, _property._propertyId, listPtr, length); } finally { @@ -506,7 +506,7 @@ class ConditionGroup extends Condition { throw Exception("Failed to create condition " + _conditions[i].toString()); } - intArrayPtr.elementAt(i).value = cid; + intArrayPtr[i] = cid; } // root All (AND) is implicit so no need to actually combine the conditions diff --git a/pubspec.yaml b/pubspec.yaml index c08fdcaa..f76ac789 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: objectbox -version: 0.6.0 +version: 0.6.1 repository: https://github.com/objectbox/objectbox-dart homepage: https://objectbox.io description: ObjectBox is a super-fast NoSQL ACID compliant object database.