Skip to content

Commit

Permalink
Prepare for release 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisCAD committed Nov 27, 2018
1 parent dd562dc commit b84b306
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Change log for BleGattCoroutines

## Version 0.3.0 (2018-11-27)

### Kotlin 1.3
This release is compiled with Kotlin 1.3.10 (and kotlinx.coroutines 1.0.1), which
means it is now using stable coroutines. The [Splitties](https://github.com/LouisCAD/Splitties)
artifacts have also been updated to [version 2.0.0](
https://github.com/LouisCAD/Splitties/blob/e77c909585f1b6d457af0fe18655e4794434ce50/CHANGELOG.md#version-200-2018-11-13
).

### Changes
- Now uses stable coroutines.
- 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 Down
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,15 @@ to have a steep learning curve, steeper than learning another programming
language like Kotlin from Java experience, and steeper than learning Kotlin
coroutines plus [understanding the kotlinx.coroutines library guide](
https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md
). Also, RxJava is a big library, even bigger if you have to use both
[version 1](http://www.methodscount.com/?lib=io.reactivex%3Arxjava%3A%2B)
and [version 2](
http://www.methodscount.com/?lib=io.reactivex.rxjava2%3Arxjava%3A%2B) in the
same project. In fact, RxJava2 methods count is higher than the sum of
[Kotlin's stdlib and kotlinx.coroutines](
http://www.methodscount.com/?lib=org.jetbrains.kotlinx%3Akotlinx-coroutines-android%3A0.20
).
). Also, RxJava is a big library, even bigger if you have to use both version 1
and version 2 in the same project. RxJava2 methods count is higher than the sum of
Kotlin's stdlib and kotlinx.coroutines.

## Experimental status
## Experimental API

_This library is based on the coroutines feature of Kotlin, as well as the
`kotlinx.coroutines` library, which are both under the experimental status.
Consequently, this library inherits this experimental status. Also, we are
expecting to make a few API changes based on your feedback and real world
usages to improve this library._
_We are expecting to make a few API changes based on your feedback and real world usages to
improve this library. You can help by sharing your experience or feedback in the issues having
a green "help wanted" tag._

**Since the API design it not final at the moment, we're very open to
feedback while you're using this library.**
Expand Down Expand Up @@ -103,10 +96,10 @@ again later.

Here's a basic example that just logs the characteristics (using
[the `print()` method defined here](
https://github.com/Beepiz/BleGattCoroutines/blob/e033fdeb82738bc490fa85968ad1ebc8482d2219/app/src/main/java/com/beepiz/blegattcoroutines/sample/extensions/GattPrint.kt#L12)
https://github.com/Beepiz/BleGattCoroutines/blob/dd562dc49e5623bfc874dd9ff37d62db63c04932/sample-common/src/main/java/com/beepiz/blegattcoroutines/sample/common/extensions/GattPrint.kt#L15)
):
```kotlin
fun BluetoothDevice.logGattServices(tag: String = "BleGattCoroutines") = launch(UI) {
fun BluetoothDevice.logGattServices(tag: String = "BleGattCoroutines") = launch {
val deviceConnection = GattConnection(bluetoothDevice = this@logGattServices)
deviceConnection.connect() // Suspends until connection is established
val gattServices = deviceConnection.discoverServices() // Suspends until completed
Expand Down Expand Up @@ -136,7 +129,7 @@ you want.
private val myEddystoneUrlBeaconMacAddress = "F2:D6:43:93:70:7A"
private val defaultDeviceMacAddress = myEddystoneUrlBeaconMacAddress

fun logNameAndAppearance(deviceMacAddress: String = defaultDeviceMacAddress) = launch(UI) {
fun logNameAndAppearance(deviceMacAddress: String = defaultDeviceMacAddress) = launch {
deviceFor(deviceMacAddress).useBasic { device, services ->
services.forEach { Timber.d("Service found with UUID: ${it.uuid}") }
with(GenericAccess) {
Expand Down Expand Up @@ -176,7 +169,7 @@ into your root project `build.gradle` file:
```groovy
allProjects {
ext {
blegattcoroutines_version = '0.2.0'
blegattcoroutines_version = '0.3.0'
}
}
```
Expand All @@ -201,7 +194,7 @@ allProjects {
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
ext {
blegattcoroutines_version = '0.2.0-SNAPSHOT' // Change this line
blegattcoroutines_version = '0.3.0-SNAPSHOT' // Change this line
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ allprojects {

// Libraries
groupId = "com.beepiz.blegattcoroutines"
library_version = "0.3.0-SNAPSHOT"
library_version = "0.3.0"
isSnapshot = library_version.endsWith("-SNAPSHOT")
isRelease = !isSnapshot

Expand Down

0 comments on commit b84b306

Please sign in to comment.