Finalising before merging

This commit is contained in:
Alexandros Schillings
2015-07-14 15:04:31 +01:00
parent 459eb1d2d4
commit 8c0c0b4ebe
21 changed files with 61 additions and 106 deletions
+1
View File
@@ -7,6 +7,7 @@
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
<inspection_tool class="MissingDeprecatedAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="MissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreObjectMethods" value="true" />
<option name="ignoreAnonymousClassMethods" value="false" />
+25 -12
View File
@@ -1,12 +1,26 @@
apply plugin: 'com.android.library'
final def versionMajor = 1
final def versionMinor = 0
final def versionPatch = 0
final def androidVersionCode = 100
final int versionMajor = 1
final int versionMinor = 0
final int versionPatch = 0
final int androidVersionCode = 5
final def targetSdk = rootProject.targetSdkVersion;
final def minSdkRed = rootProject.minSdkVersion;
final int targetSdk = rootProject.targetSdkVersion;
final int minSdkRed = rootProject.minSdkVersion;
final String semanticVersion = "${versionMajor}.${versionMinor}.${versionPatch}"
dependencies {
testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-core:1.9.5"
compile fileTree(include: ['*.jar'], dir: 'libs')
}
ext {
PUBLISH_GROUP_ID = 'co.uk.alt236'
PUBLISH_ARTIFACT_ID = 'bluetooth-le-library'
PUBLISH_VERSION = "${semanticVersion}"
}
android {
compileSdkVersion rootProject.compileSdkVersion
@@ -21,7 +35,7 @@ android {
minSdkVersion minSdkRed
targetSdkVersion targetSdk
versionCode androidVersionCode
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionName semanticVersion
}
buildTypes {
@@ -34,8 +48,7 @@ android {
}
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-core:1.9.5"
compile fileTree(include: ['*.jar'], dir: 'libs')
}
// Script from https://github.com/blundell/release-android-library
// execute: ./gradlew clean build generateRelease
apply from: 'https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-aar.gradle'
+6
View File
@@ -63,6 +63,7 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/docs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
@@ -82,7 +83,12 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/poms" />
<excludeFolder url="file://$MODULE_DIR$/build/release" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
+1 -15
View File
@@ -1,19 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="uk.co.alt236.bluetoothlelib"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="2"
android:versionName="0.0.2">
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="18"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
</application>
package="uk.co.alt236.bluetoothlelib">
</manifest>
@@ -9,7 +9,7 @@ import java.util.Arrays;
/**
* Created by Dave Smith
* Double Encore, Inc.
* <p/>
* <p>
* Expanded by Alexandros Schillings
*/
public final class AdRecord implements Parcelable {
@@ -34,9 +34,9 @@ public final class AdRecord implements Parcelable {
/**
* General FLAGS
* <p/>
* <p>
* Description: Flags
* <p/>
* <p>
* Information:
* Bit 0: LE Limited Discoverable Mode
* Bit 1: LE General Discoverable Mode
@@ -10,10 +10,11 @@ import uk.co.alt236.bluetoothlelib.util.ByteUtils;
/**
* Parses the Manufactured Data field of an iBeacon
* <p/>
* The parsing is based on the following schema:
* <p/>
* <p>
* The parsing is based on the following schema:
* <pre>
* Byte|Value
* -------------------------------------------------
* 0 4C - Byte 1 (LSB) of Company identifier code
* 1 00 - Byte 0 (MSB) of Company identifier code (0x004C == Apple)
* 2 02 - Byte 0 of iBeacon advertisement indicator
@@ -25,8 +26,8 @@ import uk.co.alt236.bluetoothlelib.util.ByteUtils;
* 8 df |###\\
* 9 fb |####\\
* 10 48 |#####\\
* 11 d2 |#####|| iBeacon proximity UUID
* 12 b0 |#####||
* 11 d2 |#####|| iBeacon
* 12 b0 |#####|| Proximity UUID
* 13 60 |#####//
* 14 d0 |####//
* 15 f5 |###//
@@ -39,9 +40,7 @@ import uk.co.alt236.bluetoothlelib.util.ByteUtils;
* 22 00 - minor
* 23 00
* 24 c5 - The 2's complement of the calibrated Tx Power
* <p/>
* </p>
*
* </pre>
* @author Alexandros Schillings
*/
@@ -6,7 +6,7 @@ import java.util.Map;
/**
* The UUIDS have been collected from the following sources:
* <p/>
* <p>
* - http://developer.nokia.com/community/wiki/Bluetooth_Services_for_Windows_Phone
* - The Bluez project
*
@@ -15,7 +15,7 @@ public class ByteUtils {
/**
* Gets a pretty representation of a Byte Array as a HEX String.
* <p/>
* <p>
* Sample output: [01, 30, FF, AA]
*
* @param array the array
@@ -79,7 +79,7 @@ public class ByteUtils {
/**
* Converts a byte to an int, preserving the sign.
* <p/>
* <p>
* For example, FF will be converted to 255 and not -1.
*
* @param bite the byte
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

@@ -1,11 +0,0 @@
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
@@ -1,12 +0,0 @@
<resources>
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>
-5
View File
@@ -1,5 +0,0 @@
<resources>
<string name="app_name">Bluetooth LE Library</string>
</resources>
-20
View File
@@ -1,20 +0,0 @@
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>
+8 -7
View File
@@ -1,12 +1,13 @@
apply plugin: 'com.android.application'
final def versionMajor = 1
final def versionMinor = 0
final def versionPatch = 0
final def androidVersionCode = 100
final int versionMajor = 1
final int versionMinor = 0
final int versionPatch = 0
final int androidVersionCode = 5
final def targetSdk = rootProject.targetSdkVersion;
final def minSdkRed = rootProject.minSdkVersion;
final int targetSdk = rootProject.targetSdkVersion;
final int minSdkRed = rootProject.minSdkVersion;
final String semanticVersion = "${versionMajor}.${versionMinor}.${versionPatch}"
repositories {
maven {
@@ -35,7 +36,7 @@ android {
minSdkVersion minSdkRed
targetSdkVersion targetSdk
versionCode androidVersionCode
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionName semanticVersion
}
buildTypes {
+2
View File
@@ -86,6 +86,8 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
+1 -7
View File
@@ -1,13 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="uk.co.alt236.btlescan"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="3"
android:versionName="0.0.3">
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="18"/>
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
@@ -63,7 +63,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:text="Updated:"
android:text="@string/label_updated"
android:textSize="12sp"
android:textStyle="bold"/>
@@ -187,7 +187,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:text="Descriptor:"
android:text="@string/label_decriptor"
android:textSize="12sp"
android:textStyle="bold"/>
+2 -1
View File
@@ -70,5 +70,6 @@
<string name="label_state">State:</string>
<string name="label_tx_power">TX Power:</string>
<string name="label_uuid">UUID:</string>
<string name="label_updated">Updated:</string>
<string name="label_decriptor">Descriptor:</string>
</resources>