Skip to content

Commit

Permalink
Prepare for release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisCAD committed May 5, 2019
1 parent a247b52 commit a311b9d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 22 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Change log for BleGattCoroutines

## Version 0.4.0 (2019-05-05)
Compiled with Kotlin 1.3.31 (and kotlinx.coroutines 1.2.1).

This is an important release for BleGattCoroutines that includes fixes, improvements & new features.

### Fixes
- Fix rare hard to track uncaught exceptions caused by `offer` called on closed channels. (744e862f)
- Automatically request disconnect on close by default. Avoids issue where connection is not stopped by close on Android's side and prevents subsequent connections.

### New features
- Add a public `bluetoothDevice` property to the `GattConnection` interface, thanks to [Brian Parma](https://github.com/bj0) contribution.
- Add `requestMtu` function on `GattConnection`, thanks to [Bill Cauchois](https://github.com/wcauchois) contribution.
- Add first-class notifications enabling on remote device with `setCharacteristicNotificationsEnabledOnRemoteDevice`. This was the most requested feature.
- Add `openNotificationSubscription` function to receive notifications only for a specific characteristic. This can replace usage of the `notifyChannel` property.

### Changes
- The `notifyChannel` property now returns a new subscription each time, so it is possible to have multiple consumers.
- Exceptions to catch are now mentioned in `GattConnection` KDoc. (b85c9bea)
- Add workaround for `Dispatchers.Main` initialization doing blocking I/O (8783db98).
- Drop main thread usage requirement. You can now use the dispatcher you want.
- Samples and `@RequiresApi` annotations migrated to AndroidX.
- Samples now properly request runtime permissions, with a single suspending function call thanks to [Splitties permissions](https://github.com/LouisCAD/Splitties/tree/master/modules/permissions).
- Minor doc improvements.

## Version 0.3.0 (2018-11-27)

### Kotlin 1.3
Expand All @@ -14,6 +38,7 @@ https://github.com/LouisCAD/Splitties/blob/e77c909585f1b6d457af0fe18655e4794434c
- All the package names changed, dropping `experimental` from the hierarchy.
- The API is still experimental, and is annotated accordingly.


## Version 0.2.0 (2018-11-27)
This release is compiled with Kotlin 1.2.71 and relies on the version 0.30.2
of kotlinx.coroutines.
Expand All @@ -33,7 +58,8 @@ properly, especially if you want to retry or recover._
- You can pass `ConnectionSettings` when creating a `GattConnection` instance. With this, you can
change transport, physical layer (aka. PHY) and enable auto connect.
- `requireXxx` extension functions for `GattConnection`, `BluetoothGattService` and
`BluetoothGattCharacteristic` thanks to @Miha-x64 contribution.
`BluetoothGattCharacteristic` thanks to [Mike (@Miha-x64)](https://github.com/Miha-x64) contribution.


## Version 0.1.0 (2018-03-19)
This is the first release of BleGattCoroutines.
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ feedback while you're using this library.**

_Please, open an issue if something can be improved. If you just want to
tell the author what you're doing with this library, feel free to reach out
via [Twitter](https://twitter.com/Louis_CAD) DM, or public tweet._
via [Twitter](https://twitter.com/Louis_CAD) DM, public tweet._

You can also join the discussion on Kotlin's Slack in the
[#beepiz-libraries](https://kotlinlang.slack.com/messages/beepiz-libraries) channel (you can get
an invitation [here](http://slack.kotlinlang.org/)).

## Usage

Expand Down Expand Up @@ -171,44 +175,40 @@ into your root project `build.gradle` file:
```groovy
allProjects {
ext {
blegattcoroutines_version = '0.3.0'
blegattcoroutines_version = '0.4.0'
}
}
```
Here are all the artifacts of this library. Just use the ones you need:
```groovy
implementation "com.beepiz.blegattcoroutines:blegattcoroutines-core:$blegattcoroutines_version"
implementation "com.beepiz.blegattcoroutines:blegattcoroutines-genericaccess:$blegattcoroutines_version"
```kotlin
implementation("com.beepiz.blegattcoroutines:blegattcoroutines-core:$blegattcoroutines_version")
implementation("com.beepiz.blegattcoroutines:blegattcoroutines-genericaccess:$blegattcoroutines_version")
```
#### Snapshots
Let's say you need a new feature or a fix that did
not make it to a release yet:

You can grab it in the latest snapshot by adding the
snapshots repository and changing the library version to the -SNAPSHOT
version in your root project `build.gradle` file:
#### Dev versions
Let's say you need a new feature or a fix that did not make it to a release yet:

You can grab it in the latest dev version by adding the corresponding repository and
changing the library version to the dev version you need in your root project `build.gradle` file:

```groovy
allProjects {
repositories {
google()
jcenter() // Add snapshots repo below
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
jcenter() // Add dev versions repo below
maven { url 'https://dl.bintray.com/louiscad/splitties-dev' }
}
ext {
blegattcoroutines_version = '0.3.0-SNAPSHOT' // Change this line
splitties_version = '0.4.0-dev-001' // Change this line
}
}
```

If you need to, you can browse the deployed snapshots [here on artifactory](
https://oss.jfrog.org/webapp/#/artifacts/browse/tree/General/oss-snapshot-local/com/beepiz/blegattcoroutines
).

### Other build systems
For maven and alternative build-systems, check the [Bintray page](
https://bintray.com/beepiz/maven/blegattcoroutines).

## New versions notifications
To get notified for new versions, be sure to click on "Watch" on the
[BleGattCoroutines Bintray page](https://bintray.com/beepiz/maven/blegattcoroutines).
Releases are announced on GitHub, you can subscribe by[clicking on "Watch", then "Releases only"](
https://help.github.com/en/articles/watching-and-unwatching-releases-for-a-repository
).
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/ProjectVersions.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object ProjectVersions {
const val androidBuildTools = "28.0.3"
const val androidSdk = 28
const val thisLibrary = "0.4.0-dev-001"
const val thisLibrary = "0.4.0"
}

val isDevVersion = ProjectVersions.thisLibrary.contains("-dev-")

0 comments on commit a311b9d

Please sign in to comment.