Skip to content

Commit 68603f1

Browse files
authored
Merge pull request #3 from GeoTecINIT/central
Deploy to Maven Central
2 parents 0d23f7d + 3384ad8 commit 68603f1

File tree

3 files changed

+34
-48
lines changed

3 files changed

+34
-48
lines changed

README.md

Lines changed: 10 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# WearOS Sensors
2-
[![](https://jitpack.io/v/GeotecINIT/WearOSSensors.svg)](https://jitpack.io/#GeotecINIT/WearOSSensors)
2+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.geotecinit/wear-os-sensors/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.geotecinit/wear-os-sensors)
33

4-
The _wearossensors_ library is an Android WearOS library that allows to collect data from the IMU sensors
4+
The _wear-os-sensors_ library is an Android WearOS library that allows to collect data from the IMU sensors
55
(i.e., accelerometer and gyroscope), the magnetometer, the heart rate, and the GPS of an Android WearOS
66
smartwatch (if the corresponding sensor is available in the device).
77

@@ -18,46 +18,17 @@ then receive the collected data from the smartwatch.
1818
The data collection can be started both from the smartwatch and from the paired smartphone. In addition,
1919
the library offers a way to communicate with the smartphone by sending messages.
2020

21-
The _wearossensors_ library uses and extends the functionality of the Android
22-
[_backgroundsensors_](https://github.com/GeoTecINIT/BackgroundSensors) library, and therefore, it is safe to carry out
21+
The _wear-os-sensors_ library uses and extends the functionality of the Android
22+
[_background-sensors_](https://github.com/GeoTecINIT/BackgroundSensors) library, and therefore, it is safe to carry out
2323
the data collection in the background (i.e., when the app is not in the foreground, or the smartwatch is idle).
2424

2525

2626
## Installation
27-
To install the library you have to add the [Jitpack](https://jitpack.io) repository to the file where your project
28-
declares the URLs of the external repositories where the dependencies are looked for:
29-
30-
<details>
31-
<summary>build.gradle (project)</summary>
32-
33-
```groovy
34-
allprojects {
35-
repositories {
36-
// ...
37-
maven { url 'https://jitpack.io' }
38-
}
39-
}
40-
```
41-
</details>
42-
43-
<details>
44-
<summary>settings.gradle</summary>
45-
46-
```groovy
47-
dependencyResolutionManagement {
48-
repositories {
49-
// ...
50-
maven { url 'https://jitpack.io' }
51-
}
52-
}
53-
```
54-
</details>
55-
56-
Then, just add the dependency in your _build.gradle_ (module):
27+
To install the library you have to add the dependency in your `build.gradle`:
5728

5829
```groovy
5930
dependencies {
60-
implementation 'com.github.GeotecINIT:WearOSSensors:1.1.0'
31+
implementation 'io.github.geotecinit:wear-os-sensors:1.0.0'
6132
}
6233
```
6334

@@ -215,7 +186,7 @@ public class MainActivity extends Activity {
215186
```
216187

217188
> **Note**: Here we are using [`Sensor`](#sensor) and [`CollectionConfiguration`](#collectionconfiguration)
218-
> from [_backgroundsensors_](https://github.com/GeoTecINIT/BackgroundSensors).
189+
> from [_background-sensors_](https://github.com/GeoTecINIT/BackgroundSensors).
219190
> Check its documentation for more information.
220191
221192
### Messaging
@@ -273,7 +244,7 @@ of the demo application.
273244
| `LOCATION` | Represents the GPS. |
274245

275246
### `SensorManager`
276-
Refer to the [_backgroundsensors_](https://github.com/GeoTecINIT/BackgroundSensors#sensormanager) documentation.
247+
Refer to the [_background-sensors_](https://github.com/GeoTecINIT/BackgroundSensors#sensormanager) documentation.
277248

278249
### [`PermissionsManager`](wearossensors/src/main/java/es/uji/geotec/wearossensors/permissions/PermissionsManager.java)
279250
| **Static Method** | **Return type** | **Description** |
@@ -298,10 +269,10 @@ Refer to the [_backgroundsensors_](https://github.com/GeoTecINIT/BackgroundSenso
298269
| `sendStopCommand(Sensor sensor)` | `void` | Sends a command to the smartphone to stop the collection of the specified sensor in the smartwatch. |
299270

300271
#### CollectionConfiguration
301-
Refer to the [_backgroundsensors_](https://github.com/GeoTecINIT/BackgroundSensors#collectionconfiguration) documentation.
272+
Refer to the [_background-sensors_](https://github.com/GeoTecINIT/BackgroundSensors#collectionconfiguration) documentation.
302273

303274
#### Sensor
304-
Refer to the [_backgroundsensors_](https://github.com/GeoTecINIT/BackgroundSensors) documentation.
275+
Refer to the [_background-sensors_](https://github.com/GeoTecINIT/BackgroundSensors) documentation.
305276

306277
### [`PlainMessageClient`](wearossensors/src/main/java/es/uji/geotec/wearossensors/plainmessage/PlainMessageClient.java)
307278
| **Method** | **Return type** | **Description** |

settings.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ dependencyResolutionManagement {
1010
repositories {
1111
google()
1212
mavenCentral()
13-
maven { url 'https://jitpack.io' }
1413
}
1514
}
1615
rootProject.name = "WearOSSensors"

wearossensors/build.gradle

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
2-
id 'maven-publish'
32
id 'com.android.library'
3+
id 'maven-publish'
4+
id 'signing'
45
}
56

67
android {
@@ -36,23 +37,23 @@ android {
3637
publishing {
3738
publications {
3839
release(MavenPublication) {
39-
groupId = 'com.github.GeotecINIT'
40-
artifactId = 'WearOSSensors'
41-
version = '1.1.0'
40+
groupId = 'io.github.geotecinit'
41+
artifactId = 'wear-os-sensors'
42+
version = '1.0.0'
4243

4344
afterEvaluate {
4445
from components.release
4546
}
4647

4748
pom {
48-
name = 'WearOSSensors'
49-
description = 'The WearOSSensors library is an Android library that allows to' +
49+
name = 'WearOS Sensors'
50+
description = 'The WearOS Sensors library is an Android library that allows to' +
5051
' collect data from the sensors of an Android WearOS Smartwatch.' +
5152
' Concretely, it can collect samples from the IMU sensors (i.e., accelerometer and gyroscope),' +
5253
' the magnetometer, the heart rate, and the GPS (if they are present in the device).' +
5354
' The collected data is sent to a paired smartphone. It also allow to communicate' +
5455
' with the smartphone by sending messages.'
55-
url = 'https://github.com/GeoTecINIT/BackgroundSensors'
56+
url = 'https://github.com/GeoTecINIT/WearOSSensors'
5657
licenses {
5758
license {
5859
name = 'The Apache License, Version 2.0'
@@ -74,13 +75,28 @@ publishing {
7475
}
7576
}
7677
}
78+
79+
repositories {
80+
maven {
81+
name = 'central'
82+
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
83+
credentials {
84+
username = ossrhUsername
85+
password = ossrhPassword
86+
}
87+
}
88+
}
89+
}
90+
91+
signing {
92+
sign publishing.publications.release
7793
}
7894

7995
dependencies {
8096
implementation 'com.google.android.gms:play-services-wearable:17.1.0'
8197
implementation 'com.google.code.gson:gson:2.9.0'
8298
implementation 'com.google.android.gms:play-services-location:20.0.0'
83-
api 'com.github.GeotecINIT:BackgroundSensors:1.0.1'
99+
api 'io.github.geotecinit:background-sensors:1.0.0'
84100
testImplementation 'junit:junit:4.13.2'
85101
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
86102
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

0 commit comments

Comments
 (0)