Skip to content

Commit 62539a5

Browse files
committed
Fixed proguard inclusion in gradle and minify in release for plugins
Added doc for Empa proTime
1 parent ab0816b commit 62539a5

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

SensorFlow/plugins/build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ android {
99
targetSdkVersion 24
1010
versionCode 1
1111
versionName "1.0"
12+
13+
proguardFile getDefaultProguardFile('proguard-android.txt')
1214
}
13-
productFlavors {
15+
16+
buildTypes {
17+
release {
18+
minifyEnabled false
19+
}
1420
}
1521

1622
packagingOptions {
@@ -19,7 +25,7 @@ android {
1925
}
2026

2127
dependencies {
22-
compile 'com.android.support:appcompat-v7:24.2.0'
28+
compile 'com.android.support:appcompat-v7:24.2.1'
2329
compile 'commons-io:commons-io:2.4'
2430
compile 'com.google.code.gson:gson:2.4'
2531
compile 'com.loopj.android:android-async-http:1.4.6'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /home/alessandrobat/android-sdk-linux/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
-keepattributes InnerClasses

SensorFlow/plugins/src/main/java/eu/fbk/mpba/sensorsflows/plugins/inputs/empatica/EmpaticaNode.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ public class EmpaticaNode implements NodePlugin<Long, double[]> {
3131
// also through the values.
3232
private Long mTimeToDevice = 0L;
3333

34+
/**
35+
* Converts the seconds in nanos and updates TimeToDevice
36+
* @param seconds timestamp received in seconds
37+
* @return timestamp received in nanoseconds
38+
*/
3439
private Long proTime(double seconds) {
3540
Long nanoTime = System.nanoTime();
3641
Long nanos = (long) (seconds * 1_000_000_000);

0 commit comments

Comments
 (0)