Skip to content

Commit cd876b2

Browse files
authored
Merge pull request #28 from ShimmerEngineering/JA-49_test
JA-49
2 parents ca04947 + 1a75800 commit cd876b2

File tree

17 files changed

+227
-177
lines changed

17 files changed

+227
-177
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
# Important ~ Migration to JFrog
2+
With Bintray being sunset, we have migrated to the use of JFrog. Should you face any problems please do not hesitate to contact us. We apologize for any inconvenience caused.
3+
4+
# JFrog Gradle Settings
5+
The gradle file for the example ShimmerBasicExample has been updated accordingly to the following:-
6+
7+
repositories:-
8+
9+
```
10+
maven {
11+
url 'https://shimmersensing.jfrog.io/artifactory/ShimmerAPI'
12+
}
13+
```
14+
dependencies:-
15+
```
16+
compile(group: 'com.shimmersensing', name: 'ShimmerAndroidInstrumentDriver', version: '3.0.70Beta', ext: 'aar')
17+
implementation (group: 'com.shimmersensing', name: 'ShimmerBluetoothManager', version:'0.9.42beta'){
18+
// excluding org.json which is provided by Android
19+
exclude group: 'io.netty'
20+
exclude group: 'com.google.protobuf'
21+
exclude group: 'org.apache.commons.math'
22+
}
23+
implementation (group: 'com.shimmersensing', name: 'ShimmerDriver', version:'0.9.138beta'){
24+
// excluding org.json which is provided by Android
25+
exclude group: 'io.netty'
26+
exclude group: 'com.google.protobuf'
27+
exclude group: 'org.apache.commons.math'
28+
}
29+
```
30+
31+
For further info
32+
https://shimmersensing.jfrog.io/ui/repos/tree/General/ShimmerAPI%2Fcom%2Fshimmersensing%2FShimmerBluetoothManager
33+
https://shimmersensing.jfrog.io/ui/repos/tree/General/ShimmerAPI%2Fcom%2Fshimmersensing%2FShimmerDriver
34+
https://shimmersensing.jfrog.io/ui/repos/tree/General/ShimmerAPI%2Fcom%2Fshimmersensing%2FShimmerAndroidInstrumentDriver
35+
36+
# Bintray Sunset
37+
The following ways of getting the library is **deprecated**
38+
repositories:-
39+
40+
```
41+
maven {
42+
url "http://dl.bintray.com/shimmerengineering/Shimmer"
43+
}
44+
```
45+
dependencies:-
46+
```
47+
compile 'ShimmerAndroidInstrumentDriver:ShimmerAndroidInstrumentDriver:3.0.69Beta_AA-245_AA-246'
48+
```
49+
50+
151
# ShimmerAndroidAPI 3.0Beta
252

353
The Shimmer Android API is currently in a BETA development state, users are free to use and provide feedback.

ShimmerAndroidInstrumentDriver/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ local.properties
3434
.Spotlight-V100
3535
.Trashes
3636
ehthumbs.db
37-
Thumbs.db
37+
Thumbs.db
38+
/ShimmerAndroidInstrumentDriver/gradle.properties

ShimmerAndroidInstrumentDriver/.idea/gradle.xml

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

ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/.idea/gradle.xml

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

ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle

Lines changed: 16 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
apply plugin: 'com.android.library'
44
apply plugin: 'com.github.dcendents.android-maven'
5+
apply plugin: 'com.jfrog.artifactory'
56
apply plugin: 'maven-publish'
6-
apply plugin: 'com.jfrog.bintray'
77

8-
version = '3.0.65Beta'
8+
version = '3.0.70Beta'
99

1010
android {
1111
compileSdkVersion 25
@@ -19,7 +19,6 @@ android {
1919
multiDexEnabled true
2020
minSdkVersion 14
2121
targetSdkVersion 14
22-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2322
}
2423

2524
buildTypes {
@@ -57,169 +56,35 @@ android {
5756
}
5857
}
5958

60-
//repositories {
61-
// mavenCentral()
62-
// maven {
63-
// url "http://192.168.0.139:8081/artifactory/libs-release-local"
64-
// credentials {
65-
// username = "alex"
66-
// password = "AP5DYAtHgg8mmK4Tnrx6RyrniF6"
67-
// }
68-
// }
69-
// flatDir {
70-
// dirs 'libs'
71-
// }
72-
//}
59+
publishing {
60+
artifactoryPublish.dependsOn('build')
61+
publications {
62+
mavenJava(MavenPublication) {
63+
groupId = 'com.shimmersensing'
64+
version = project.version
65+
artifactId project.getName()
66+
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
67+
}
68+
}
69+
}
7370

7471
dependencies {
75-
//compile 'com.shimmerresearch:shimmerDriver:0.3.3'
76-
// compile 'org.apache.commons:commons-lang3:3.4'
77-
// compile 'org.apache.commons:commons-math3:3.6'
78-
// compile 'org.apache.commons:commons-math:2.2'
7972
compile 'com.google.guava:guava:20.0'
8073
compile 'java3d:vecmath:1.3.1'
81-
// compile 'commons-collections:commons-collections:3.2'
82-
83-
//compile 'io.grpc:grpc-okhttp:1.0.0-pre1'
84-
//compile 'io.grpc:grpc-protobuf-lite:1.0.0-pre1'
85-
//compile 'io.grpc:grpc-stub:1.0.0-pre1']
86-
87-
testImplementation 'junit:junit:4.12'
88-
androidTestImplementation 'com.android.support.test:runner:1.0.1'
89-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
90-
//compile fileTree(include: ['*.jar'], dir: 'libs')
9174
compile files('libs/ShimmerBiophysicalProcessingLibrary_Rev_0_11.jar')
9275
compile files('libs/AndroidBluetoothLibrary.jar')
9376
compile files('libs/androidplot-core-0.5.0-release.jar')
94-
//compile files('libs/ShimmerDriverML.jar')
95-
compile ('com.shimmerresearch.managers.bluetoothmanager:ShimmerBluetoothManager:0.9.33beta') {
77+
implementation (group: 'com.shimmersensing', name: 'ShimmerBluetoothManager', version:'0.9.42beta'){
9678
// excluding org.json which is provided by Android
9779
exclude group: 'io.netty'
9880
exclude group: 'com.google.protobuf'
9981
exclude group: 'org.apache.commons.math'
100-
}
101-
compile ('com.shimmerresearch.driver:ShimmerDriver:0.9.120beta') {
82+
}
83+
implementation (group: 'com.shimmersensing', name: 'ShimmerDriver', version:'0.9.138beta'){
10284
// excluding org.json which is provided by Android
10385
exclude group: 'io.netty'
10486
exclude group: 'com.google.protobuf'
10587
exclude group: 'org.apache.commons.math'
10688
}
107-
//For fragments:
10889
compile 'com.android.support:appcompat-v7:25.3.1'
109-
110-
111-
/*
112-
install {
113-
repositories.mavenInstaller {
114-
// This generates POM.xml with proper parameters
115-
pom {
116-
project {
117-
packaging 'aar'
118-
groupId 'com.shimmerresearch.android'
119-
artifactId 'com.shimmerresearch.android'
120-
121-
// Add your description here
122-
name ''
123-
description ''
124-
url ''
125-
126-
// Set your license
127-
licenses {
128-
license {
129-
name 'MIT License'
130-
url 'https://opensource.org/licenses/MIT'
131-
}
132-
}
133-
developers {
134-
developer {
135-
id 'stefanosiano'
136-
name 'Stefano Siano'
137-
138-
}
139-
}
140-
scm {
141-
connection ''
142-
developerConnection ''
143-
url ''
144-
145-
}
146-
}
147-
}
148-
}
149-
}
150-
*/
151-
152-
153-
154-
155-
if (project.hasProperty("android")) { // Android libraries
156-
task sourcesJar(type: Jar) {
157-
classifier = 'sources'
158-
from android.sourceSets.main.java.srcDirs
159-
}
160-
161-
task javadoc(type: Javadoc) {
162-
source = android.sourceSets.main.java.srcDirs
163-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
164-
}
165-
} else { // Java libraries
166-
task sourcesJar(type: Jar, dependsOn: classes) {
167-
classifier = 'sources'
168-
from sourceSets.main.allSource
169-
}
170-
}
171-
172-
task javadocJar(type: Jar, dependsOn: javadoc) {
173-
classifier = 'javadoc'
174-
from javadoc.destinationDir
175-
}
176-
177-
artifacts {
178-
archives sourcesJar
179-
}
180-
181-
publishing{
182-
publications {
183-
maven(MavenPublication) {
184-
groupId 'com.shimmerresearch.android'
185-
version = project.version
186-
artifactId project.getName()
187-
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
188-
}
189-
}
190-
}
191-
192-
// https://github.com/bintray/gradle-bintray-plugin
193-
File file = new File(rootProject.getProjectDir().getAbsolutePath() + '/gradle.properties')
194-
if(file.exists()) {
195-
bintray {
196-
user = shimmer_bintray_username
197-
//this usually comes from gradle.properties file in ~/.gradle
198-
key = shimmer_bintray_api_key
199-
//this usually comes from gradle.properties file in ~/.gradle
200-
201-
configurations = ['archives']
202-
203-
// Package info for BinTray
204-
pkg {
205-
repo = 'Shimmer'
206-
// it is the name that appears in bintray when logged
207-
name = 'shimmerandroiddriver'
208-
desc = ''
209-
websiteUrl = ''
210-
vcsUrl = 'https://github.com/ShimmerEngineering/ShimmerAndroidAPI'
211-
licenses = ['MIT']
212-
publish = true
213-
publicDownloadNumbers = true
214-
version {
215-
name = project.version
216-
desc = ''
217-
released = new Date()
218-
vcsTag = ''
219-
}
220-
}
221-
}
222-
}
223-
224-
22590
}

ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip

ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/android/manager/ShimmerBluetoothManagerAndroid.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,16 @@ protected ShimmerDevice createNewShimmer3(ShimmerRadioInitializer shimmerRadioIn
230230
Shimmer shimmer = new Shimmer(mHandler);
231231
shimmer.setDelayForBtRespone(true);
232232
mMapOfBtConnectedShimmers.put(bluetoothAddress, shimmer);
233-
ShimmerVerObject sVO = shimmerRadioInitializer.readShimmerVerObject();
234-
if (sVO.isShimmerGen3()){
235-
return initializeShimmer3(serialPort, shimmer);
236-
} else if(sVO.isShimmerGen2()) {
237-
return initializeShimmer2r(serialPort, shimmer);
233+
try {
234+
ShimmerVerObject sVO = shimmerRadioInitializer.readShimmerVerObject();
235+
if (sVO.isShimmerGen3()) {
236+
return initializeShimmer3(serialPort, shimmer);
237+
} else if (sVO.isShimmerGen2()) {
238+
return initializeShimmer2r(serialPort, shimmer);
239+
}
240+
} catch (Exception ex){
241+
ex.printStackTrace();
242+
return null;
238243
}
239244
return null;
240245
}

ShimmerAndroidInstrumentDriver/bluetoothManagerExample/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ android {
4444

4545
dependencies {
4646
compile project(':ShimmerAndroidInstrumentDriver')
47+
implementation (group: 'com.shimmersensing', name: 'ShimmerBluetoothManager', version:'0.9.42beta'){
48+
// excluding org.json which is provided by Android
49+
exclude group: 'io.netty'
50+
exclude group: 'com.google.protobuf'
51+
exclude group: 'org.apache.commons.math'
52+
}
53+
implementation (group: 'com.shimmersensing', name: 'ShimmerDriver', version:'0.9.138beta'){
54+
// excluding org.json which is provided by Android
55+
exclude group: 'io.netty'
56+
exclude group: 'com.google.protobuf'
57+
exclude group: 'org.apache.commons.math'
58+
}
4759
compile fileTree(dir: 'libs', include: ['*.jar'])
4860
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
4961
exclude group: 'com.android.support', module: 'support-annotations'

0 commit comments

Comments
 (0)