Skip to content

Commit 99ad6ee

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 <kai@openhab.org>
1 parent cd239f9 commit 99ad6ee

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

+175
-415
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: 19 additions & 55 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,22 +37,24 @@
3737
<organization>Sputnik Dev</organization>
3838
<organizationUrl>https://sputnikdev.org/</organizationUrl>
3939
</developer>
40+
<developer>
41+
<name>Kai Kreuzer</name>
42+
<email>kai@openhab.org</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:git@github.com:sputnikdev/bluetooth-gatt-parser.git</connection>
45-
<developerConnection>scm:git:git@github.com:sputnikdev/bluetooth-gatt-parser.git</developerConnection>
49+
<url>https://github.com/openhab/bluetooth-gatt-parser/tree/main</url>
50+
<connection>scm:git:https://github.com/openhab/bluetooth-gatt-parser</connection>
51+
<developerConnection>scm:git:https://github.com/openhab/bluetooth-gatt-parser</developerConnection>
4652
<tag>HEAD</tag>
4753
</scm>
4854

4955
<distributionManagement>
50-
<snapshotRepository>
51-
<id>ossrh</id>
52-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
53-
</snapshotRepository>
5456
<repository>
55-
<id>ossrh</id>
57+
<id>maven</id>
5658
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
5759
</repository>
5860
</distributionManagement>
@@ -71,26 +73,6 @@
7173
</repositories>
7274

7375
<profiles>
74-
<profile>
75-
<id>release-no-deploy</id>
76-
<activation>
77-
<property>
78-
<name>!travis</name>
79-
</property>
80-
</activation>
81-
<build>
82-
<plugins>
83-
<plugin>
84-
<groupId>org.apache.maven.plugins</groupId>
85-
<artifactId>maven-deploy-plugin</artifactId>
86-
<version>2.8</version>
87-
<configuration>
88-
<skip>true</skip>
89-
</configuration>
90-
</plugin>
91-
</plugins>
92-
</build>
93-
</profile>
9476
<profile>
9577
<id>sign</id>
9678
<build>
@@ -109,13 +91,6 @@
10991
</execution>
11092
</executions>
11193
</plugin>
112-
</plugins>
113-
</build>
114-
</profile>
115-
<profile>
116-
<id>build-extras</id>
117-
<build>
118-
<plugins>
11994
<plugin>
12095
<groupId>org.apache.maven.plugins</groupId>
12196
<artifactId>maven-source-plugin</artifactId>
@@ -142,17 +117,6 @@
142117
</execution>
143118
</executions>
144119
</plugin>
145-
<plugin>
146-
<groupId>org.sonatype.plugins</groupId>
147-
<artifactId>nexus-staging-maven-plugin</artifactId>
148-
<version>1.6.7</version>
149-
<extensions>true</extensions>
150-
<configuration>
151-
<serverId>ossrh</serverId>
152-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
153-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
154-
</configuration>
155-
</plugin>
156120
</plugins>
157121
</build>
158122
</profile>
@@ -172,17 +136,17 @@
172136
<dependency>
173137
<groupId>com.google.code.gson</groupId>
174138
<artifactId>gson</artifactId>
175-
<version>2.7</version>
139+
<version>2.9.0</version>
176140
</dependency>
177141
<dependency>
178142
<groupId>commons-beanutils</groupId>
179143
<artifactId>commons-beanutils</artifactId>
180-
<version>1.9.3</version>
144+
<version>1.9.4</version>
181145
</dependency>
182146
<dependency>
183147
<groupId>com.google.guava</groupId>
184148
<artifactId>guava</artifactId>
185-
<version>18.0</version>
149+
<version>31.1-jre</version>
186150
</dependency>
187151
<dependency>
188152
<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)