2016-06-24 17:48:11 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven { url 'https://maven.fabric.io/public' }
|
2018-01-10 23:31:31 +01:00
|
|
|
jcenter()
|
2016-06-24 17:48:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath 'io.fabric.tools:gradle:1.+'
|
2018-01-10 23:31:31 +01:00
|
|
|
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.2'
|
2016-06-24 17:48:11 +02:00
|
|
|
}
|
|
|
|
}
|
2018-01-13 21:34:38 +01:00
|
|
|
apply plugin: "com.android.application"
|
|
|
|
apply plugin: "io.fabric"
|
|
|
|
apply plugin: "jacoco-android"
|
2018-01-24 21:54:24 +01:00
|
|
|
apply plugin: 'com.jakewharton.butterknife'
|
2018-01-13 21:34:38 +01:00
|
|
|
|
|
|
|
ext {
|
2018-01-24 21:54:24 +01:00
|
|
|
supportLibraryVersion = "27.0.2"
|
2018-01-13 21:34:38 +01:00
|
|
|
ormLiteVersion = "4.46"
|
|
|
|
powermockVersion = "1.7.3"
|
|
|
|
dexmakerVersion = "1.2"
|
|
|
|
}
|
|
|
|
|
2016-06-24 17:48:11 +02:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven { url 'https://maven.fabric.io/public' }
|
|
|
|
}
|
|
|
|
|
2016-11-08 19:10:25 +01:00
|
|
|
def generateGitBuild = { ->
|
|
|
|
|
|
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
|
|
stringBuilder.append('"')
|
|
|
|
try {
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'describe', '--always'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
String commitObject = stdout.toString().trim()
|
|
|
|
stringBuilder.append(commitObject)
|
|
|
|
} catch (ignored) {
|
2016-11-08 22:55:08 +01:00
|
|
|
stringBuilder.append('NoGitSystemAvailable')
|
2016-11-08 19:10:25 +01:00
|
|
|
}
|
|
|
|
stringBuilder.append('-')
|
|
|
|
stringBuilder.append((new Date()).format('yyyy.MM.dd'))
|
|
|
|
stringBuilder.append('"')
|
|
|
|
return stringBuilder.toString()
|
|
|
|
}
|
2016-06-04 17:28:05 +02:00
|
|
|
|
|
|
|
android {
|
2018-01-24 21:54:24 +01:00
|
|
|
compileSdkVersion 27
|
|
|
|
buildToolsVersion "${supportLibraryVersion}"
|
2016-06-04 17:28:05 +02:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "info.nightscout.androidaps"
|
|
|
|
minSdkVersion 21
|
2017-04-22 10:18:31 +02:00
|
|
|
targetSdkVersion 23
|
2017-10-15 02:52:57 +02:00
|
|
|
multiDexEnabled true
|
2017-06-04 22:37:58 +02:00
|
|
|
versionCode 1500
|
2018-01-19 21:05:37 +01:00
|
|
|
version "1.57-combo-csv2-test"
|
2017-02-23 20:00:33 +01:00
|
|
|
buildConfigField "String", "VERSION", '"' + version + '"'
|
2016-11-08 19:10:25 +01:00
|
|
|
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
2017-09-13 00:35:03 +02:00
|
|
|
|
|
|
|
ndk {
|
|
|
|
moduleName "BleCommandUtil"
|
|
|
|
}
|
2016-06-04 17:28:05 +02:00
|
|
|
}
|
2016-10-21 22:16:20 +02:00
|
|
|
lintOptions {
|
2018-01-26 15:56:07 +01:00
|
|
|
// TODO remove once wear dependency com.google.android.gms:play-services-wearable:7.3.0
|
|
|
|
// has been upgraded (requiring significant code changes), which currently fails release
|
|
|
|
// build with a deprecation warning
|
|
|
|
//abortOnError false
|
|
|
|
// (disabled entirely to avoid reports on the error, which would still be displayed
|
|
|
|
// and it's easy to overlook that it's ignored)
|
|
|
|
checkReleaseBuilds false
|
2016-10-21 22:16:20 +02:00
|
|
|
disable 'MissingTranslation'
|
2018-01-11 14:14:53 +01:00
|
|
|
disable 'ExtraTranslation'
|
2016-10-21 22:16:20 +02:00
|
|
|
}
|
2016-06-04 17:28:05 +02:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
2018-01-10 23:31:31 +01:00
|
|
|
debug {
|
|
|
|
testCoverageEnabled true
|
|
|
|
}
|
2016-06-04 17:28:05 +02:00
|
|
|
}
|
2016-07-15 23:53:14 +02:00
|
|
|
productFlavors {
|
2017-10-12 18:24:48 +02:00
|
|
|
flavorDimensions "standard"
|
2017-02-10 16:53:39 +01:00
|
|
|
full {
|
2016-11-26 05:31:23 +01:00
|
|
|
dimension "standard"
|
2017-02-23 20:00:33 +01:00
|
|
|
resValue "string", "app_name", "AndroidAPS"
|
|
|
|
versionName version
|
|
|
|
manifestPlaceholders = [
|
|
|
|
appIcon: "@mipmap/blueowl"
|
|
|
|
]
|
2016-10-21 00:03:52 +02:00
|
|
|
buildConfigField "boolean", "APS", "true"
|
|
|
|
buildConfigField "boolean", "PUMPDRIVERS", "true"
|
2017-02-23 20:00:33 +01:00
|
|
|
buildConfigField "boolean", "NSCLIENTOLNY", "false"
|
2016-10-21 00:03:52 +02:00
|
|
|
buildConfigField "boolean", "CLOSEDLOOP", "true"
|
2017-11-29 16:07:26 +01:00
|
|
|
buildConfigField "boolean", "G5UPLOADER", "false"
|
2018-01-14 17:11:39 +01:00
|
|
|
buildConfigField "boolean", "PUMPCONTROL", "false"
|
2016-10-21 00:03:52 +02:00
|
|
|
}
|
2017-02-23 20:00:33 +01:00
|
|
|
openloop {
|
2016-11-26 05:31:23 +01:00
|
|
|
dimension "standard"
|
2017-02-23 20:00:33 +01:00
|
|
|
resValue "string", "app_name", "AndroidAPS"
|
|
|
|
versionName version
|
|
|
|
manifestPlaceholders = [
|
|
|
|
appIcon: "@mipmap/blueowl"
|
|
|
|
]
|
|
|
|
buildConfigField "boolean", "APS", "true"
|
2016-09-05 09:11:30 +02:00
|
|
|
buildConfigField "boolean", "PUMPDRIVERS", "true"
|
2017-02-23 20:00:33 +01:00
|
|
|
buildConfigField "boolean", "NSCLIENTOLNY", "false"
|
2016-09-05 09:11:30 +02:00
|
|
|
buildConfigField "boolean", "CLOSEDLOOP", "false"
|
2017-11-29 16:07:26 +01:00
|
|
|
buildConfigField "boolean", "G5UPLOADER", "false"
|
2018-01-14 17:11:39 +01:00
|
|
|
buildConfigField "boolean", "PUMPCONTROL", "false"
|
2016-09-05 09:11:30 +02:00
|
|
|
}
|
2017-02-23 20:00:33 +01:00
|
|
|
pumpcontrol {
|
2016-11-26 05:31:23 +01:00
|
|
|
dimension "standard"
|
2017-02-23 20:00:33 +01:00
|
|
|
resValue "string", "app_name", "AndroidAPS"
|
|
|
|
versionName version
|
|
|
|
manifestPlaceholders = [
|
|
|
|
appIcon: "@mipmap/blueowl"
|
|
|
|
]
|
2016-07-15 23:53:14 +02:00
|
|
|
buildConfigField "boolean", "APS", "false"
|
2017-02-23 20:00:33 +01:00
|
|
|
buildConfigField "boolean", "PUMPDRIVERS", "true"
|
|
|
|
buildConfigField "boolean", "NSCLIENTOLNY", "false"
|
2016-07-15 23:53:14 +02:00
|
|
|
buildConfigField "boolean", "CLOSEDLOOP", "false"
|
2017-11-29 16:07:26 +01:00
|
|
|
buildConfigField "boolean", "G5UPLOADER", "false"
|
2018-01-14 17:11:39 +01:00
|
|
|
buildConfigField "boolean", "PUMPCONTROL", "true"
|
2016-07-15 23:53:14 +02:00
|
|
|
}
|
2017-02-23 20:00:33 +01:00
|
|
|
nsclient {
|
2016-11-26 05:31:23 +01:00
|
|
|
dimension "standard"
|
2017-02-23 20:00:33 +01:00
|
|
|
resValue "string", "app_name", "NSClient"
|
|
|
|
versionName version + "-nsclient"
|
|
|
|
manifestPlaceholders = [
|
|
|
|
appIcon: "@mipmap/yellowowl"
|
|
|
|
]
|
|
|
|
buildConfigField "boolean", "APS", "false"
|
|
|
|
buildConfigField "boolean", "PUMPDRIVERS", "false"
|
|
|
|
buildConfigField "boolean", "NSCLIENTOLNY", "true"
|
2016-07-15 23:53:14 +02:00
|
|
|
buildConfigField "boolean", "CLOSEDLOOP", "false"
|
2017-11-29 16:07:26 +01:00
|
|
|
buildConfigField "boolean", "G5UPLOADER", "false"
|
2018-01-14 17:11:39 +01:00
|
|
|
buildConfigField "boolean", "PUMPCONTROL", "false"
|
2017-11-29 16:07:26 +01:00
|
|
|
}
|
|
|
|
g5uploader {
|
|
|
|
dimension "standard"
|
|
|
|
resValue "string", "app_name", "NSClient"
|
|
|
|
versionName version + "-nsclient"
|
|
|
|
manifestPlaceholders = [
|
|
|
|
appIcon: "@mipmap/yellowowl"
|
|
|
|
]
|
|
|
|
buildConfigField "boolean", "APS", "false"
|
|
|
|
buildConfigField "boolean", "PUMPDRIVERS", "false"
|
|
|
|
buildConfigField "boolean", "NSCLIENTOLNY", "false"
|
|
|
|
buildConfigField "boolean", "CLOSEDLOOP", "false"
|
|
|
|
buildConfigField "boolean", "G5UPLOADER", "true"
|
2018-01-14 17:11:39 +01:00
|
|
|
buildConfigField "boolean", "PUMPCONTROL", "false"
|
2016-07-15 23:53:14 +02:00
|
|
|
}
|
|
|
|
}
|
2017-10-28 13:42:42 +02:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2016-06-04 17:28:05 +02:00
|
|
|
}
|
|
|
|
|
2017-01-29 13:00:21 +01:00
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
flatDir {
|
|
|
|
dirs 'libs'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-04 17:28:05 +02:00
|
|
|
dependencies {
|
2017-10-12 18:01:10 +02:00
|
|
|
wearApp project(':wear')
|
2018-01-13 23:18:44 +01:00
|
|
|
compile project(path: ':ruffyscripter')
|
2017-02-13 01:55:35 +01:00
|
|
|
|
2016-12-30 16:43:43 +01:00
|
|
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
2018-01-13 21:34:38 +01:00
|
|
|
compile("com.crashlytics.sdk.android:crashlytics:2.6.7@aar") {
|
2016-07-02 23:58:57 +02:00
|
|
|
transitive = true;
|
|
|
|
}
|
2018-01-13 21:34:38 +01:00
|
|
|
compile("com.crashlytics.sdk.android:answers:1.3.12@aar") {
|
2017-03-02 23:08:40 +01:00
|
|
|
transitive = true;
|
|
|
|
}
|
2017-01-29 13:00:21 +01:00
|
|
|
|
2018-01-13 21:34:38 +01:00
|
|
|
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.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") {
|
|
|
|
exclude group: "com.google.android", module: "android"
|
2016-12-27 16:21:04 +01:00
|
|
|
}
|
2018-01-13 21:34:38 +01:00
|
|
|
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("com.google.android:flexbox:0.3.0") {
|
|
|
|
exclude group: "com.android.support"
|
2017-06-30 17:43:10 +02:00
|
|
|
}
|
2018-01-13 21:34:38 +01:00
|
|
|
compile("io.socket:socket.io-client:0.8.3") {
|
2017-02-17 13:18:36 +01:00
|
|
|
// excluding org.json which is provided by Android
|
2018-01-13 21:34:38 +01:00
|
|
|
exclude group: "org.json", module: "json"
|
2017-02-17 13:18:36 +01:00
|
|
|
}
|
2018-01-13 21:34:38 +01:00
|
|
|
compile "com.google.code.gson:gson:2.7"
|
|
|
|
compile "com.google.guava:guava:20.0"
|
|
|
|
|
|
|
|
compile "net.danlew:android.joda:2.9.9.1"
|
|
|
|
|
2018-01-24 21:54:24 +01:00
|
|
|
api "com.jakewharton:butterknife:8.8.1"
|
|
|
|
annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
|
|
|
|
|
2018-01-13 21:34:38 +01:00
|
|
|
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"
|
2017-01-29 13:00:21 +01:00
|
|
|
|
2018-01-13 21:34:38 +01:00
|
|
|
androidTestCompile "org.mockito:mockito-core:2.7.22"
|
|
|
|
androidTestCompile "com.google.dexmaker:dexmaker:${dexmakerVersion}"
|
|
|
|
androidTestCompile "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
|
2017-07-21 16:49:43 +02:00
|
|
|
}
|