Skip to content

Commit

Permalink
Merge pull request #89 from objectbox/dev
Browse files Browse the repository at this point in the history
v0.6.1 release
  • Loading branch information
vaind committed Jan 23, 2020
2 parents b733f30 + d0faa22 commit 17fc5e1
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 22 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ android {
}

dependencies {
// https://github.com/objectbox/objectbox-java/releases
implementation "io.objectbox:objectbox-android:2.5.0"
}
6 changes: 3 additions & 3 deletions example/flutter/objectbox_demo/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ../../..
Expand Down
6 changes: 3 additions & 3 deletions example/flutter/objectbox_demo_desktop/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: ../../..
Expand Down
4 changes: 2 additions & 2 deletions generator/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion ios/download-framework.sh
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
4 changes: 2 additions & 2 deletions lib/src/bindings/structs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class OBX_id_array extends Struct {
array.length = items.length;
array._itemsPtr = allocate<Uint64>(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
Expand Down Expand Up @@ -83,7 +83,7 @@ class OBX_bytes extends Struct {
// create a copy of the data
bytes._dataPtr = allocate<Uint8>(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;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Box<T> {
Pointer<Uint64> allIdsMemory = allocate<Uint64>(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
Expand Down
10 changes: 5 additions & 5 deletions lib/src/query/query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class StringCondition extends PropertyCondition<String> {
final arrayOfCStrings = allocate<Pointer<Utf8>>(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 {
Expand Down Expand Up @@ -373,7 +373,7 @@ class IntegerCondition extends PropertyCondition<int> {
final listPtr = allocate<P>(count: length);
try {
for (int i=0; i<length; i++) {
listPtr.elementAt(i).value = _list[i] as int; // Error: Expected type 'P' to be a valid and instantiated subtype of 'NativeType'. // wtf? Compiler bug?
listPtr[i] = _list[i] as int; // Error: Expected type 'P' to be a valid and instantiated subtype of 'NativeType'. // wtf? Compiler bug?
}
return func(builder._cBuilder, _property.propertyId, listPtr, length);
}finally {
Expand All @@ -388,7 +388,7 @@ class IntegerCondition extends PropertyCondition<int> {
final listPtr = allocate<Int32>(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 {
Expand All @@ -402,7 +402,7 @@ class IntegerCondition extends PropertyCondition<int> {
final listPtr = allocate<Int64>(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 {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 17fc5e1

Please sign in to comment.