Skip to content

Commit

Permalink
Preparing for release 1.1.0
Browse files Browse the repository at this point in the history
Reviewers: michal.zielinski, dariusz.seweryn

Reviewed By: dariusz.seweryn

Differential Revision: https://phabricator.polidea.com/D1951
  • Loading branch information
uKL committed Nov 14, 2016
1 parent 710f1e4 commit 9e356f2
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 57 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ Complete usage examples are located in `/sample` [GitHub repo](https://github.co
### Gradle

```java
compile "com.polidea.rxandroidble:rxandroidble:1.0.2"
compile "com.polidea.rxandroidble:rxandroidble:1.1.0"
```
### Maven

```xml
<dependency>
<groupId>com.polidea.rxandroidble</groupId>
<artifactId>rxandroidble</artifactId>
<version>1.0.2</version>
<version>1.1.0</version>
<type>aar</type>
</dependency>
```
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'
classpath 'me.tatarka:gradle-retrolambda:3.3.1'
classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:1.1.0'
}
Expand Down
10 changes: 5 additions & 5 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
supportVersion = '23.1.1'
supportVersion = '25.0.0'
buildToolsVersionVariable = "25.0.0"
sourceCompatibilityVersion = JavaVersion.VERSION_1_8
targetCompatibilityVersion = JavaVersion.VERSION_1_8
Expand All @@ -8,13 +8,13 @@ ext {
retrolambda : 'net.orfjackal.retrolambda:retrolambda:2.3.0',
support : "com.android.support:support-v4:$supportVersion",
support_annotations: "com.android.support:support-annotations:$supportVersion",
rxjava : 'io.reactivex:rxjava:1.1.7',
rxjava : 'io.reactivex:rxjava:1.2.2',
rxandroid : 'io.reactivex:rxandroid:1.2.1',
junit : 'junit:junit:4.12',
groovy : 'org.codehaus.groovy:groovy:2.4.6:grooid',
groovy : 'org.codehaus.groovy:groovy:2.4.7:grooid',
spock : ['org.spockframework:spock-core:1.0-groovy-2.4',
'cglib:cglib-nodep:3.2.1',
'org.objenesis:objenesis:2.2'],
'cglib:cglib-nodep:3.2.4',
'org.objenesis:objenesis:2.4'],
robospock : 'org.robospock:robospock:1.0.1'

]
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.polidea.rxandroidble
VERSION_NAME=1.1.0-SNAPSHOT
VERSION_NAME=1.1.0

POM_DESCRIPTION=RxJava backed support for Bluetooth Low Energy in Android

Expand Down
4 changes: 2 additions & 2 deletions mockrxandroidble/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ Get MockRxAndroidBle via Maven:
<dependency>
<groupId>com.polidea.rxandroidble</groupId>
<artifactId>mockclient</artifactId>
<version>1.0.2</version>
<version>1.1.0</version>
<type>aar</type>
</dependency>
```

or via Gradle

```groovy
compile "com.polidea.rxandroidble:mockclient:1.0.2"'
compile "com.polidea.rxandroidble:mockclient:1.1.0"'
```
### License
Expand Down
15 changes: 8 additions & 7 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}

dependencies {
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
classpath 'me.tatarka:gradle-retrolambda:3.3.1'
}
}

Expand Down Expand Up @@ -43,12 +43,13 @@ configurations.all {
}

dependencies {
compile 'com.android.support:appcompat-v7:23.2.1'
compile group: 'com.polidea.rxandroidble', name: 'rxandroidble', version: '1.0.1', changing: false
compile 'com.android.support:design:23.2.1'
compile 'com.jakewharton:butterknife:7.0.1'
// compile group: 'com.polidea.rxandroidble', name: 'rxandroidble', version: '1.1.0', changing: false
compile project(path: ':rxandroidble')
compile "com.android.support:appcompat-v7:$rootProject.ext.buildToolsVersionVariable"
compile "com.android.support:design:$rootProject.ext.buildToolsVersionVariable"
compile 'com.jakewharton:butterknife:8.4.0'
compile rootProject.ext.libs.rxjava
compile rootProject.ext.libs.rxandroid
compile 'com.trello:rxlifecycle:0.5.0'
compile 'com.trello:rxlifecycle-components:0.5.0'
compile 'com.trello:rxlifecycle:1.0'
compile 'com.trello:rxlifecycle-components:1.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
import com.polidea.rxandroidble.sample.R;
import com.polidea.rxandroidble.sample.SampleApplication;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;

public class ScanActivity extends AppCompatActivity {

@Bind(R.id.scan_toggle_btn)
@BindView(R.id.scan_toggle_btn)
Button scanToggleButton;
@Bind(R.id.scan_results)
@BindView(R.id.scan_results)
RecyclerView recyclerView;
private RxBleClient rxBleClient;
private Subscription scanSubscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
import java.util.Comparator;
import java.util.List;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

class ScanResultsAdapter extends RecyclerView.Adapter<ScanResultsAdapter.ViewHolder> {

static class ViewHolder extends RecyclerView.ViewHolder {

@Bind(android.R.id.text1)
@BindView(android.R.id.text1)
public TextView line1;
@Bind(android.R.id.text2)
@BindView(android.R.id.text2)
public TextView line2;

public ViewHolder(View itemView) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
import com.polidea.rxandroidble.sample.SampleApplication;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;

import static com.trello.rxlifecycle.ActivityEvent.DESTROY;
import static com.trello.rxlifecycle.ActivityEvent.PAUSE;
import static com.trello.rxlifecycle.android.ActivityEvent.DESTROY;
import static com.trello.rxlifecycle.android.ActivityEvent.PAUSE;

public class ConnectionExampleActivity extends RxAppCompatActivity {

@Bind(R.id.connection_state)
@BindView(R.id.connection_state)
TextView connectionStateView;
@Bind(R.id.connect_toggle)
@BindView(R.id.connect_toggle)
Button connectButton;
@Bind(R.id.autoconnect)
@BindView(R.id.autoconnect)
SwitchCompat autoConnectToggleSwitch;
private RxBleDevice bleDevice;
private Subscription connectionSubscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.List;
import java.util.UUID;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

class DiscoveryResultsAdapter extends RecyclerView.Adapter<DiscoveryResultsAdapter.ViewHolder> {
Expand All @@ -39,9 +39,9 @@ static class AdapterItem {

static class ViewHolder extends RecyclerView.ViewHolder {

@Bind(android.R.id.text1)
@BindView(android.R.id.text1)
public TextView line1;
@Bind(android.R.id.text2)
@BindView(android.R.id.text2)
public TextView line2;

public ViewHolder(View itemView) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
import com.polidea.rxandroidble.sample.example4_characteristic.CharacteristicOperationExampleActivity;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import rx.android.schedulers.AndroidSchedulers;

import static com.trello.rxlifecycle.ActivityEvent.PAUSE;
import static com.trello.rxlifecycle.android.ActivityEvent.PAUSE;

public class ServiceDiscoveryExampleActivity extends RxAppCompatActivity {

@Bind(R.id.connect)
@BindView(R.id.connect)
Button connectButton;
@Bind(R.id.scan_results)
@BindView(R.id.scan_results)
RecyclerView recyclerView;
private DiscoveryResultsAdapter adapter;
private RxBleDevice bleDevice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@

import java.util.UUID;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.subjects.PublishSubject;

import static com.trello.rxlifecycle.ActivityEvent.PAUSE;
import static com.trello.rxlifecycle.android.ActivityEvent.PAUSE;

public class CharacteristicOperationExampleActivity extends RxAppCompatActivity {

public static final String EXTRA_CHARACTERISTIC_UUID = "extra_uuid";
@Bind(R.id.connect)
@BindView(R.id.connect)
Button connectButton;
@Bind(R.id.read_output)
@BindView(R.id.read_output)
TextView readOutputView;
@Bind(R.id.read_hex_output)
@BindView(R.id.read_hex_output)
TextView readHexOutputView;
@Bind(R.id.write_input)
@BindView(R.id.write_input)
TextView writeInput;
@Bind(R.id.read)
@BindView(R.id.read)
Button readButton;
@Bind(R.id.write)
@BindView(R.id.write)
Button writeButton;
@Bind(R.id.notify)
@BindView(R.id.notify)
Button notifyButton;
private UUID characteristicUuid;
private PublishSubject<Void> disconnectTriggerSubject = PublishSubject.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
import com.polidea.rxandroidble.sample.SampleApplication;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import rx.Observable;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;

import static com.trello.rxlifecycle.ActivityEvent.DESTROY;
import static com.trello.rxlifecycle.ActivityEvent.PAUSE;
import static com.trello.rxlifecycle.android.ActivityEvent.DESTROY;
import static com.trello.rxlifecycle.android.ActivityEvent.PAUSE;
import static java.util.concurrent.TimeUnit.SECONDS;

public class RssiPeriodicExampleActivity extends RxAppCompatActivity {

@Bind(R.id.connection_state)
@BindView(R.id.connection_state)
TextView connectionStateView;
@Bind(R.id.rssi)
@BindView(R.id.rssi)
TextView rssiView;
@Bind(R.id.connect_toggle)
@BindView(R.id.connect_toggle)
Button connectButton;
private RxBleDevice bleDevice;
private Subscription connectionSubscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

public class HexString {

final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();
private HexString() {
// Utility class.
}

private final static char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray();

public static String bytesToHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];

for (int j = 0; j < bytes.length; j++) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = hexArray[v >>> 4];
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
hexChars[j * 2] = HEX_ARRAY[v >>> 4];
hexChars[j * 2 + 1] = HEX_ARRAY[v & 0x0F];
}

return new String(hexChars);
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include ':rxandroidble', ':mockrxandroidble'
include ':rxandroidble', ':mockrxandroidble', ':sample'

rootProject.name = 'rxandroidble-parent'

0 comments on commit 9e356f2

Please sign in to comment.