Skip to content

Commit 8c0c0b4

Browse files
committed
Finalising before merging
1 parent 459eb1d commit 8c0c0b4

21 files changed

Lines changed: 61 additions & 106 deletions

File tree

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library/build.gradle

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
apply plugin: 'com.android.library'
22

3-
final def versionMajor = 1
4-
final def versionMinor = 0
5-
final def versionPatch = 0
6-
final def androidVersionCode = 100
3+
final int versionMajor = 1
4+
final int versionMinor = 0
5+
final int versionPatch = 0
6+
final int androidVersionCode = 5
77

8-
final def targetSdk = rootProject.targetSdkVersion;
9-
final def minSdkRed = rootProject.minSdkVersion;
8+
final int targetSdk = rootProject.targetSdkVersion;
9+
final int minSdkRed = rootProject.minSdkVersion;
10+
final String semanticVersion = "${versionMajor}.${versionMinor}.${versionPatch}"
11+
12+
13+
dependencies {
14+
testCompile 'junit:junit:4.12'
15+
testCompile "org.mockito:mockito-core:1.9.5"
16+
compile fileTree(include: ['*.jar'], dir: 'libs')
17+
}
18+
19+
ext {
20+
PUBLISH_GROUP_ID = 'co.uk.alt236'
21+
PUBLISH_ARTIFACT_ID = 'bluetooth-le-library'
22+
PUBLISH_VERSION = "${semanticVersion}"
23+
}
1024

1125
android {
1226
compileSdkVersion rootProject.compileSdkVersion
@@ -21,7 +35,7 @@ android {
2135
minSdkVersion minSdkRed
2236
targetSdkVersion targetSdk
2337
versionCode androidVersionCode
24-
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
38+
versionName semanticVersion
2539
}
2640

2741
buildTypes {
@@ -34,8 +48,7 @@ android {
3448
}
3549
}
3650

37-
dependencies {
38-
testCompile 'junit:junit:4.12'
39-
testCompile "org.mockito:mockito-core:1.9.5"
40-
compile fileTree(include: ['*.jar'], dir: 'libs')
41-
}
51+
// Script from https://github.com/blundell/release-android-library
52+
// execute: ./gradlew clean build generateRelease
53+
apply from: 'https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-aar.gradle'
54+

library/library.iml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
6464
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
6565
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
66+
<excludeFolder url="file://$MODULE_DIR$/build/docs" />
6667
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
6768
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
6869
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
@@ -82,7 +83,12 @@
8283
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
8384
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
8485
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
86+
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
8587
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
88+
<excludeFolder url="file://$MODULE_DIR$/build/poms" />
89+
<excludeFolder url="file://$MODULE_DIR$/build/release" />
90+
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
91+
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
8692
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
8793
</content>
8894
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest
3-
package="uk.co.alt236.bluetoothlelib"
4-
xmlns:android="http://schemas.android.com/apk/res/android"
5-
android:versionCode="2"
6-
android:versionName="0.0.2">
7-
8-
<uses-sdk
9-
android:minSdkVersion="18"
10-
android:targetSdkVersion="18"/>
11-
12-
<application
13-
android:allowBackup="true"
14-
android:icon="@drawable/ic_launcher"
15-
android:label="@string/app_name"
16-
android:theme="@style/AppTheme">
17-
</application>
3+
package="uk.co.alt236.bluetoothlelib">
184

195
</manifest>

library/src/main/java/uk/co/alt236/bluetoothlelib/device/adrecord/AdRecord.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* Created by Dave Smith
1111
* Double Encore, Inc.
12-
* <p/>
12+
* <p>
1313
* Expanded by Alexandros Schillings
1414
*/
1515
public final class AdRecord implements Parcelable {
@@ -34,9 +34,9 @@ public final class AdRecord implements Parcelable {
3434

3535
/**
3636
* General FLAGS
37-
* <p/>
37+
* <p>
3838
* Description: Flags
39-
* <p/>
39+
* <p>
4040
* Information:
4141
* Bit 0: LE Limited Discoverable Mode
4242
* Bit 1: LE General Discoverable Mode

library/src/main/java/uk/co/alt236/bluetoothlelib/device/beacon/ibeacon/IBeaconManufacturerData.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010

1111
/**
1212
* Parses the Manufactured Data field of an iBeacon
13-
* <p/>
14-
* The parsing is based on the following schema:
15-
* <p/>
1613
* <p>
14+
* The parsing is based on the following schema:
15+
* <pre>
16+
* Byte|Value
17+
* -------------------------------------------------
1718
* 0 4C - Byte 1 (LSB) of Company identifier code
1819
* 1 00 - Byte 0 (MSB) of Company identifier code (0x004C == Apple)
1920
* 2 02 - Byte 0 of iBeacon advertisement indicator
@@ -25,8 +26,8 @@
2526
* 8 df |###\\
2627
* 9 fb |####\\
2728
* 10 48 |#####\\
28-
* 11 d2 |#####|| iBeacon proximity UUID
29-
* 12 b0 |#####||
29+
* 11 d2 |#####|| iBeacon
30+
* 12 b0 |#####|| Proximity UUID
3031
* 13 60 |#####//
3132
* 14 d0 |####//
3233
* 15 f5 |###//
@@ -39,9 +40,7 @@
3940
* 22 00 - minor
4041
* 23 00
4142
* 24 c5 - The 2's complement of the calibrated Tx Power
42-
* <p/>
43-
* </p>
44-
*
43+
* </pre>
4544
* @author Alexandros Schillings
4645
*/
4746

library/src/main/java/uk/co/alt236/bluetoothlelib/resolvers/GattAttributeResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/**
88
* The UUIDS have been collected from the following sources:
9-
* <p/>
9+
* <p>
1010
* - http://developer.nokia.com/community/wiki/Bluetooth_Services_for_Windows_Phone
1111
* - The Bluez project
1212
*

library/src/main/java/uk/co/alt236/bluetoothlelib/util/ByteUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ private ByteUtils(){
1515

1616
/**
1717
* Gets a pretty representation of a Byte Array as a HEX String.
18-
* <p/>
18+
* <p>
1919
* Sample output: [01, 30, FF, AA]
2020
*
2121
* @param array the array
@@ -79,7 +79,7 @@ public static int getIntFrom2ByteArray(final byte[] input) {
7979

8080
/**
8181
* Converts a byte to an int, preserving the sign.
82-
* <p/>
82+
* <p>
8383
* For example, FF will be converted to 255 and not -1.
8484
*
8585
* @param bite the byte
-4.4 KB
Binary file not shown.
-2.86 KB
Binary file not shown.

0 commit comments

Comments
 (0)