Skip to content

Commit bf7caa6

Browse files
committed
Created forked version with:
- sputnikdev#15 included - version number bumped to 2.0.0 - org.openhab namespace - dependencies updated to latest versions - updated README - removal of travis Signed-off-by: Kai Kreuzer <[email protected]>
1 parent cd239f9 commit bf7caa6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+174
-372
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode
2+
target

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.travis/before-deploy.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

.travis/codesigning.asc.enc

-9.42 KB
Binary file not shown.

.travis/deploy.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

.travis/settings.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
[![Maven Central](https://img.shields.io/maven-central/v/org.sputnikdev/bluetooth-gatt-parser.svg)](https://mvnrepository.com/artifact/org.sputnikdev/bluetooth-gatt-parser)
2-
[![Build Status](https://travis-ci.org/sputnikdev/bluetooth-gatt-parser.svg?branch=master)](https://travis-ci.org/sputnikdev/bluetooth-gatt-parser)
3-
[![Coverage Status](https://coveralls.io/repos/github/sputnikdev/bluetooth-gatt-parser/badge.svg?branch=master)](https://coveralls.io/github/sputnikdev/bluetooth-gatt-parser?branch=master)
4-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/42d4968bc4ae4474b2cda4d01f8e4d56)](https://www.codacy.com/app/vkolotov/bluetooth-gatt-parser?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=sputnikdev/bluetooth-gatt-parser&amp;utm_campaign=Badge_Grade)
5-
[![Join the chat at https://gitter.im/sputnikdev/bluetooth-gatt-parser](https://badges.gitter.im/sputnikdev/bluetooth-gatt-parser.svg)](https://gitter.im/sputnikdev/bluetooth-gatt-parser?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6-
# bluetooth-gatt-parser
1+
[![Maven Central](https://img.shields.io/maven-central/v/org.openhab/bluetooth-gatt-parser.svg)](https://mvnrepository.com/artifact/org.openhab/bluetooth-gatt-parser)
72

83
A **simple** library/framework to work with Bluetooth Smart (BLE) GATT services and characteristics.
94

5+
Note: This is a fork from the no longer maintained project at https://github.com/sputnikdev/bluetooth-gatt-parser.
6+
107
Have a look at an example of parsing a standard characteristic ([Battery Level 0x2A19](https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.battery_level.xml)) value:
118
```java
129
BluetoothGattParserFactory.getDefault().parse("2A19", new byte[] {51}).get("Level").getInteger(null);
@@ -25,7 +22,7 @@ This would print 51.
2522
**Start using the library by including a maven dependency in your project:**
2623
```xml
2724
<dependency>
28-
<groupId>org.sputnikdev</groupId>
25+
<groupId>org.openhab</groupId>
2926
<artifactId>bluetooth-gatt-parser</artifactId>
3027
<version>X.Y.Z</version>
3128
</dependency>
@@ -81,10 +78,7 @@ parser.registerParser(CHARACTERISTIC_UUID, customParser);
8178
---
8279
## Contribution
8380

84-
You are welcome to contribute to the project, the project environment is designed to make it easy by using:
85-
* Travis CI to release artifacts directly to the Maven Central repository.
86-
* Code style rules to support clarity and supportability. The results can be seen in the Codacy.
87-
* Code coverage reports in the Coveralls to maintain sustainability. 100% of code coverage with unittests is the target.
81+
You are welcome to contribute to the project.
8882

8983
The build process is streamlined by using standard maven tools.
9084

@@ -98,4 +92,3 @@ To cut a new release and upload it to the Maven Central Repository:
9892
mvn release:prepare -B
9993
mvn release:perform
10094
```
101-
Travis CI process will take care of everything, you will find a new artifact in the Maven Central repository when the release process finishes successfully.

pom.xml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22
<modelVersion>4.0.0</modelVersion>
33

4-
<groupId>org.sputnikdev</groupId>
4+
<groupId>org.openhab</groupId>
55
<artifactId>bluetooth-gatt-parser</artifactId>
6-
<version>1.9.5-SNAPSHOT</version>
6+
<version>2.0.0-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<name>${project.groupId}:${project.artifactId}</name>
1010
<description>A simple library/framework to work with Bluetooth Smart (BLE) GATT services and characteristics.</description>
11-
<url>https://github.com/sputnikdev/bluetooth-gatt-parser</url>
11+
<url>https://github.com/openhab/bluetooth-gatt-parser</url>
1212

1313
<licenses>
1414
<license>
@@ -18,10 +18,10 @@
1818
</licenses>
1919

2020
<organization>
21-
<name>Sputnik Dev</name>
22-
<url>http://sputnikdev.org/</url>
21+
<name>openHAB</name>
22+
<url>https://www.openhab.org/</url>
2323
</organization>
24-
<inceptionYear>2017</inceptionYear>
24+
<inceptionYear>2022</inceptionYear>
2525

2626
<properties>
2727
<maven.compiler.source>1.8</maven.compiler.source>
@@ -37,12 +37,18 @@
3737
<organization>Sputnik Dev</organization>
3838
<organizationUrl>https://sputnikdev.org/</organizationUrl>
3939
</developer>
40+
<developer>
41+
<name>Kai Kreuzer</name>
42+
<email>[email protected]</email>
43+
<organization>openHAB</organization>
44+
<organizationUrl>https://www.openhab.org/</organizationUrl>
45+
</developer>
4046
</developers>
4147

4248
<scm>
43-
<url>https://github.com/sputnikdev/bluetooth-gatt-parser/tree/master</url>
44-
<connection>scm:git:[email protected]:sputnikdev/bluetooth-gatt-parser.git</connection>
45-
<developerConnection>scm:git:[email protected]:sputnikdev/bluetooth-gatt-parser.git</developerConnection>
49+
<url>https://github.com/openhab/bluetooth-gatt-parser/tree/master</url>
50+
<connection>scm:git:[email protected]:openhab/bluetooth-gatt-parser.git</connection>
51+
<developerConnection>scm:git:[email protected]:openhab/bluetooth-gatt-parser.git</developerConnection>
4652
<tag>HEAD</tag>
4753
</scm>
4854

@@ -172,17 +178,17 @@
172178
<dependency>
173179
<groupId>com.google.code.gson</groupId>
174180
<artifactId>gson</artifactId>
175-
<version>2.7</version>
181+
<version>2.9.0</version>
176182
</dependency>
177183
<dependency>
178184
<groupId>commons-beanutils</groupId>
179185
<artifactId>commons-beanutils</artifactId>
180-
<version>1.9.3</version>
186+
<version>1.9.4</version>
181187
</dependency>
182188
<dependency>
183189
<groupId>com.google.guava</groupId>
184190
<artifactId>guava</artifactId>
185-
<version>18.0</version>
191+
<version>31.1-jre</version>
186192
</dependency>
187193
<dependency>
188194
<groupId>junit</groupId>

src/main/java/org/sputnikdev/bluetooth/gattparser/BluetoothGattParser.java renamed to src/main/java/org/openhab/bluetooth/gattparser/BluetoothGattParser.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
package org.sputnikdev.bluetooth.gattparser;
1+
package org.openhab.bluetooth.gattparser;
2+
3+
import org.openhab.bluetooth.gattparser.spec.BluetoothGattSpecificationReader;
4+
import org.openhab.bluetooth.gattparser.spec.Characteristic;
5+
import org.openhab.bluetooth.gattparser.spec.Field;
6+
import org.openhab.bluetooth.gattparser.spec.Service;
27

38
/*-
4-
* #%L
5-
* org.sputnikdev:bluetooth-gatt-parser
6-
* %%
79
* Copyright (C) 2017 Sputnik Dev
810
* %%
911
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,10 +24,6 @@
2224

2325
import org.slf4j.Logger;
2426
import org.slf4j.LoggerFactory;
25-
import org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader;
26-
import org.sputnikdev.bluetooth.gattparser.spec.Characteristic;
27-
import org.sputnikdev.bluetooth.gattparser.spec.Field;
28-
import org.sputnikdev.bluetooth.gattparser.spec.Service;
2927

3028
import java.net.URL;
3129
import java.util.Arrays;

src/main/java/org/sputnikdev/bluetooth/gattparser/BluetoothGattParserFactory.java renamed to src/main/java/org/openhab/bluetooth/gattparser/BluetoothGattParserFactory.java

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,11 @@
1-
package org.sputnikdev.bluetooth.gattparser;
1+
package org.openhab.bluetooth.gattparser;
22

3-
/*-
4-
* #%L
5-
* org.sputnikdev:bluetooth-gatt-parser
6-
* %%
7-
* Copyright (C) 2017 Sputnik Dev
8-
* %%
9-
* Licensed under the Apache License, Version 2.0 (the "License");
10-
* you may not use this file except in compliance with the License.
11-
* You may obtain a copy of the License at
12-
*
13-
* http://www.apache.org/licenses/LICENSE-2.0
14-
*
15-
* Unless required by applicable law or agreed to in writing, software
16-
* distributed under the License is distributed on an "AS IS" BASIS,
17-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18-
* See the License for the specific language governing permissions and
19-
* limitations under the License.
20-
* #L%
21-
*/
22-
23-
import org.sputnikdev.bluetooth.gattparser.num.FloatingPointNumberFormatter;
24-
import org.sputnikdev.bluetooth.gattparser.num.IEEE11073FloatingPointNumberFormatter;
25-
import org.sputnikdev.bluetooth.gattparser.num.IEEE754FloatingPointNumberFormatter;
26-
import org.sputnikdev.bluetooth.gattparser.num.RealNumberFormatter;
27-
import org.sputnikdev.bluetooth.gattparser.num.TwosComplementNumberFormatter;
28-
import org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader;
3+
import org.openhab.bluetooth.gattparser.num.FloatingPointNumberFormatter;
4+
import org.openhab.bluetooth.gattparser.num.IEEE11073FloatingPointNumberFormatter;
5+
import org.openhab.bluetooth.gattparser.num.IEEE754FloatingPointNumberFormatter;
6+
import org.openhab.bluetooth.gattparser.num.RealNumberFormatter;
7+
import org.openhab.bluetooth.gattparser.num.TwosComplementNumberFormatter;
8+
import org.openhab.bluetooth.gattparser.spec.BluetoothGattSpecificationReader;
299

3010
/**
3111
* A factory class for some main objects in the library:

0 commit comments

Comments
 (0)