commit
149818a902
11 changed files with 211 additions and 209 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -8,3 +8,6 @@
|
|||
build/
|
||||
.idea/
|
||||
app/src/main/jniLibs
|
||||
full/
|
||||
debug/
|
||||
release/
|
|
@ -2,7 +2,7 @@ language: android
|
|||
jdk: oraclejdk8
|
||||
env:
|
||||
matrix:
|
||||
- ANDROID_TARGET=android-23 ANDROID_ABI=x86
|
||||
- ANDROID_TARGET=android-23 ANDROID_ABI=x86 org.gradle.jvmargs=-XX:-OmitStackTraceInFastThrow
|
||||
android:
|
||||
components:
|
||||
- platform-tools
|
||||
|
|
1
app/.gitignore
vendored
1
app/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/build
|
|
@ -167,78 +167,82 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
libs
|
||||
}
|
||||
|
||||
dependencies {
|
||||
wearApp project(':wear')
|
||||
|
||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||
compile("com.crashlytics.sdk.android:crashlytics:2.6.7@aar") {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation("com.crashlytics.sdk.android:crashlytics:2.6.7@aar") {
|
||||
transitive = true;
|
||||
}
|
||||
compile("com.crashlytics.sdk.android:answers:1.3.12@aar") {
|
||||
implementation("com.crashlytics.sdk.android:answers:1.3.12@aar") {
|
||||
transitive = true;
|
||||
}
|
||||
compile 'MilosKozak:danars-support-lib:master@zip'
|
||||
libs 'MilosKozak:danars-support-lib:master@zip'
|
||||
|
||||
compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
||||
compile "com.android.support:support-v4:${supportLibraryVersion}"
|
||||
compile "com.android.support:cardview-v7:${supportLibraryVersion}"
|
||||
compile "com.android.support:recyclerview-v7:${supportLibraryVersion}"
|
||||
compile "com.android.support:gridlayout-v7:${supportLibraryVersion}"
|
||||
compile "com.android.support:design:${supportLibraryVersion}"
|
||||
compile "com.android.support:percent:${supportLibraryVersion}"
|
||||
compile "com.wdullaer:materialdatetimepicker:2.3.0"
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
compile "com.squareup:otto:1.3.7"
|
||||
compile "com.j256.ormlite:ormlite-core:${ormLiteVersion}"
|
||||
compile "com.j256.ormlite:ormlite-android:${ormLiteVersion}"
|
||||
compile("com.github.tony19:logback-android-classic:1.1.1-6") {
|
||||
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
||||
implementation "com.android.support:support-v4:${supportLibraryVersion}"
|
||||
implementation "com.android.support:cardview-v7:${supportLibraryVersion}"
|
||||
implementation "com.android.support:recyclerview-v7:${supportLibraryVersion}"
|
||||
implementation "com.android.support:gridlayout-v7:${supportLibraryVersion}"
|
||||
implementation "com.android.support:design:${supportLibraryVersion}"
|
||||
implementation "com.android.support:percent:${supportLibraryVersion}"
|
||||
implementation "com.wdullaer:materialdatetimepicker:2.3.0"
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
implementation "com.squareup:otto:1.3.7"
|
||||
implementation "com.j256.ormlite:ormlite-core:${ormLiteVersion}"
|
||||
implementation "com.j256.ormlite:ormlite-android:${ormLiteVersion}"
|
||||
implementation("com.github.tony19:logback-android-classic:1.1.1-6") {
|
||||
exclude group: "com.google.android", module: "android"
|
||||
}
|
||||
compile "org.apache.commons:commons-lang3:3.6"
|
||||
compile "org.slf4j:slf4j-api:1.7.12"
|
||||
compile "com.jjoe64:graphview:4.0.1"
|
||||
compile "com.joanzapata.iconify:android-iconify-fontawesome:2.1.1"
|
||||
compile "com.google.android.gms:play-services-wearable:7.5.0"
|
||||
compile(name: "android-edittext-validator-v1.3.4-mod", ext: "aar")
|
||||
compile(name: "sightparser-release", ext: "aar")
|
||||
implementation "org.apache.commons:commons-lang3:3.6"
|
||||
implementation "org.slf4j:slf4j-api:1.7.12"
|
||||
implementation "com.jjoe64:graphview:4.0.1"
|
||||
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.1.1"
|
||||
implementation "com.google.android.gms:play-services-wearable:7.5.0"
|
||||
implementation(name: "android-edittext-validator-v1.3.4-mod", ext: "aar")
|
||||
implementation(name: "sightparser-release", ext: "aar")
|
||||
|
||||
compile("com.google.android:flexbox:0.3.0") {
|
||||
implementation("com.google.android:flexbox:0.3.0") {
|
||||
exclude group: "com.android.support"
|
||||
}
|
||||
compile("io.socket:socket.io-client:0.8.3") {
|
||||
implementation("io.socket:socket.io-client:0.8.3") {
|
||||
// excluding org.json which is provided by Android
|
||||
exclude group: "org.json", module: "json"
|
||||
}
|
||||
compile "com.google.code.gson:gson:2.7"
|
||||
compile "com.google.guava:guava:20.0"
|
||||
implementation "com.google.code.gson:gson:2.7"
|
||||
implementation "com.google.guava:guava:20.0"
|
||||
|
||||
compile "net.danlew:android.joda:2.9.9.1"
|
||||
compile "uk.com.robust-it:cloning:1.9.9"
|
||||
implementation "net.danlew:android.joda:2.9.9.1"
|
||||
implementation "uk.com.robust-it:cloning:1.9.9"
|
||||
|
||||
compile 'org.mozilla:rhino:1.7.7.2'
|
||||
implementation 'org.mozilla:rhino:1.7.7.2'
|
||||
|
||||
api "com.jakewharton:butterknife:8.8.1"
|
||||
annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
|
||||
|
||||
testCompile "junit:junit:4.12"
|
||||
testCompile "org.json:json:20140107"
|
||||
testCompile "org.mockito:mockito-core:2.7.22"
|
||||
testCompile "org.powermock:powermock-api-mockito2:${powermockVersion}"
|
||||
testCompile "org.powermock:powermock-module-junit4-rule-agent:${powermockVersion}"
|
||||
testCompile "org.powermock:powermock-module-junit4-rule:${powermockVersion}"
|
||||
testCompile "org.powermock:powermock-module-junit4:${powermockVersion}"
|
||||
testCompile "joda-time:joda-time:2.9.4.2"
|
||||
testCompile "com.google.truth:truth:0.39"
|
||||
testCompile "org.skyscreamer:jsonassert:1.5.0"
|
||||
testCompile 'org.robolectric:robolectric:3.8'
|
||||
testImplementation "junit:junit:4.12"
|
||||
testImplementation "org.json:json:20140107"
|
||||
testImplementation "org.mockito:mockito-core:2.7.22"
|
||||
testImplementation "org.powermock:powermock-api-mockito2:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4-rule-agent:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4-rule:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4:${powermockVersion}"
|
||||
testImplementation "joda-time:joda-time:2.9.4.2"
|
||||
testImplementation "com.google.truth:truth:0.39"
|
||||
testImplementation 'org.robolectric:robolectric:3.8'
|
||||
testImplementation "org.skyscreamer:jsonassert:1.5.0"
|
||||
|
||||
androidTestCompile "org.mockito:mockito-core:2.7.22"
|
||||
androidTestCompile "com.google.dexmaker:dexmaker:${dexmakerVersion}"
|
||||
androidTestCompile "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
|
||||
androidTestImplementation "org.mockito:mockito-core:2.7.22"
|
||||
androidTestImplementation "com.google.dexmaker:dexmaker:${dexmakerVersion}"
|
||||
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
|
||||
}
|
||||
|
||||
task unzip(type: Copy) {
|
||||
def zipPath = configurations.compile.find {it.name.startsWith("danars") }
|
||||
def zipPath = configurations.libs.find {it.name.startsWith("danars") }
|
||||
def zipFile = file(zipPath)
|
||||
def outputDir = file("${buildDir}/unpacked/dist")
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ package info.nightscout.androidaps.plugins.PumpDanaRS;
|
|||
|
||||
import android.content.Context;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -21,6 +19,7 @@ import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump;
|
|||
import info.nightscout.utils.SP;
|
||||
import info.nightscout.utils.ToastUtils;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
/**
|
||||
|
@ -41,9 +40,9 @@ public class DanaRSPluginTest {
|
|||
|
||||
Constraint<Double> c = new Constraint<>(Constants.REALLYHIGHBASALRATE);
|
||||
danaRSPlugin.applyBasalConstraints(c, AAPSMocker.getValidProfile());
|
||||
Assert.assertEquals(0.8d, c.value());
|
||||
Assert.assertEquals("DanaRS: Limiting basal rate to 0.80 U/h because of pump limit", c.getReasons());
|
||||
Assert.assertEquals("DanaRS: Limiting basal rate to 0.80 U/h because of pump limit", c.getMostLimitedReasons());
|
||||
assertEquals(Double.valueOf(0.8d), c.value());
|
||||
assertEquals("DanaRS: Limiting basal rate to 0.80 U/h because of pump limit", c.getReasons());
|
||||
assertEquals("DanaRS: Limiting basal rate to 0.80 U/h because of pump limit", c.getMostLimitedReasons());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -54,9 +53,9 @@ public class DanaRSPluginTest {
|
|||
|
||||
Constraint<Integer> c = new Constraint<>(Constants.REALLYHIGHPERCENTBASALRATE);
|
||||
danaRSPlugin.applyBasalPercentConstraints(c, AAPSMocker.getValidProfile());
|
||||
Assert.assertEquals((Integer) 200, c.value());
|
||||
Assert.assertEquals("DanaRS: Limiting percent rate to 200% because of pump limit", c.getReasons());
|
||||
Assert.assertEquals("DanaRS: Limiting percent rate to 200% because of pump limit", c.getMostLimitedReasons());
|
||||
assertEquals((Integer) 200, c.value());
|
||||
assertEquals("DanaRS: Limiting percent rate to 200% because of pump limit", c.getReasons());
|
||||
assertEquals("DanaRS: Limiting percent rate to 200% because of pump limit", c.getMostLimitedReasons());
|
||||
}
|
||||
|
||||
@Before
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,5 @@
|
|||
#Sun Dec 03 18:20:55 CET 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
|
||||
|
|
68
gradlew
vendored
68
gradlew
vendored
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
|
@ -6,12 +6,30 @@
|
|||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
|
@ -30,6 +48,7 @@ die ( ) {
|
|||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
|
@ -40,26 +59,11 @@ case "`uname`" in
|
|||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
|
@ -85,7 +89,7 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
|
@ -150,11 +154,19 @@ if $cygwin ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
14
gradlew.bat
vendored
14
gradlew.bat
vendored
|
@ -8,14 +8,14 @@
|
|||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
|
@ -46,10 +46,9 @@ echo location of your Java installation.
|
|||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
|
@ -60,11 +59,6 @@ set _SKIP=2
|
|||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
|
6
wear/.gitignore
vendored
6
wear/.gitignore
vendored
|
@ -1,6 +0,0 @@
|
|||
*.iml
|
||||
.gradle
|
||||
/build
|
||||
*.apk
|
||||
build/
|
||||
.idea/
|
|
@ -45,8 +45,6 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
publishNonDefault true
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
|
@ -64,13 +62,13 @@ allprojects {
|
|||
|
||||
|
||||
dependencies {
|
||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||
compile files("libs/hellocharts-library-1.5.5.jar")
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation files("libs/hellocharts-library-1.5.5.jar")
|
||||
//compile "com.ustwo.android:clockwise-wearable:1.0.2"
|
||||
provided "com.google.android.wearable:wearable:${wearableVersion}"
|
||||
compile "com.google.android.support:wearable:${wearableVersion}"
|
||||
compile "com.google.android.gms:play-services-wearable:7.3.0"
|
||||
compile(name:"ustwo-clockwise-debug", ext:"aar")
|
||||
compile "com.android.support:support-v4:23.0.1"
|
||||
compile "me.denley.wearpreferenceactivity:wearpreferenceactivity:0.5.0"
|
||||
compileOnly "com.google.android.wearable:wearable:${wearableVersion}"
|
||||
implementation "com.google.android.support:wearable:${wearableVersion}"
|
||||
implementation "com.google.android.gms:play-services-wearable:7.3.0"
|
||||
implementation(name:"ustwo-clockwise-debug", ext:"aar")
|
||||
implementation "com.android.support:support-v4:23.0.1"
|
||||
implementation "me.denley.wearpreferenceactivity:wearpreferenceactivity:0.5.0"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue