Skip to content

Commit 57f93dc

Browse files
authored
Merge pull request #1 from winemug/omnicore_dev_jhd
Omnicore dev jhd
2 parents c196370 + 20e5059 commit 57f93dc

1,162 files changed

Lines changed: 68747 additions & 17240 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
language: android
22
jdk: oraclejdk8
3+
dist: trusty
34
env:
45
matrix:
5-
- ANDROID_TARGET=android-23 ANDROID_ABI=x86 org.gradle.jvmargs=-XX:-OmitStackTraceInFastThrow
6+
- ANDROID_TARGET=android-28 ANDROID_ABI=x86 org.gradle.jvmargs=-XX:-OmitStackTraceInFastThrow
67
android:
78
components:
89
- platform-tools
910
- tools
10-
- build-tools-27.0.2
11-
- android-23
11+
- build-tools-28.0.3
12+
- android-28
1213
- extra-google-m2repository
1314
- extra-android-m2repository
1415
- extra-google-google_play_services
1516

1617
before_install:
17-
- yes | sdkmanager "platforms;android-27"
18+
#- yes | sdkmanager "platforms;android-28"
1819

1920
script:
2021
# Unit Test
21-
- ./gradlew -Pcoverage testFullDebugUnitTest jacocoTestFullDebugUnitTestReport
22+
- ./gradlew -Pcoverage -PfirebaseDisable testFullDebugUnitTest jacocoTestFullDebugUnitTestReport
2223

2324
after_success:
2425
- bash <(curl -s https://codecov.io/bash)
@@ -31,4 +32,4 @@ cache:
3132
directories:
3233
- $HOME/.gradle/caches/
3334
- $HOME/.gradle/wrapper/
34-
- $HOME/.android/build-cache
35+
- $HOME/.android/build-cache

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
dev: [![codecov](https://codecov.io/gh/MilosKozak/AndroidAPS/branch/dev/graph/badge.svg)](https://codecov.io/gh/MilosKozak/AndroidAPS)
1212

1313

14-
[![Donate via PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y4LHGJJESAVB8)
14+
[![Donate via PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y4LHGJJESAVB8)

app/build.gradle

Lines changed: 82 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,28 @@ buildscript {
66

77
dependencies {
88
classpath 'io.fabric.tools:gradle:1.+'
9-
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.3'
9+
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
10+
classpath 'de.undercouch:gradle-download-task:3.4.3'
1011
}
1112
}
12-
apply plugin: "com.android.application"
13-
apply plugin: 'kotlin-android-extensions'
13+
apply plugin: 'com.android.application'
1414
apply plugin: 'kotlin-android'
15+
apply plugin: 'kotlin-android-extensions'
1516
apply plugin: 'com.google.gms.google-services'
16-
apply plugin: "io.fabric"
17-
apply plugin: "jacoco-android"
18-
apply plugin: 'com.jakewharton.butterknife'
17+
apply plugin: 'io.fabric'
18+
apply plugin: 'jacoco-android'
19+
apply plugin: 'de.undercouch.download'
20+
21+
22+
jacoco {
23+
toolVersion = "0.8.3"
24+
}
1925

2026
ext {
21-
supportLibraryVersion = "27.1.1"
27+
supportLibraryVersion = "28.0.0"
2228
ormLiteVersion = "4.46"
2329
powermockVersion = "1.7.3"
2430
dexmakerVersion = "1.2"
25-
butterknifeVersion = "8.8.1"
2631
}
2732

2833

@@ -33,7 +38,7 @@ repositories {
3338
}
3439

3540
def generateGitBuild = { ->
36-
StringBuilder stringBuilder = new StringBuilder();
41+
StringBuilder stringBuilder = new StringBuilder()
3742
try {
3843
def stdout = new ByteArrayOutputStream()
3944
exec {
@@ -49,7 +54,7 @@ def generateGitBuild = { ->
4954
}
5055

5156
def generateGitRemote = { ->
52-
StringBuilder stringBuilder = new StringBuilder();
57+
StringBuilder stringBuilder = new StringBuilder()
5358
try {
5459
def stdout = new ByteArrayOutputStream()
5560
exec {
@@ -65,7 +70,7 @@ def generateGitRemote = { ->
6570
}
6671

6772
def generateDate = { ->
68-
StringBuilder stringBuilder = new StringBuilder();
73+
StringBuilder stringBuilder = new StringBuilder()
6974
stringBuilder.append((new Date()).format('yyyy.MM.dd-HH:mm'))
7075
return stringBuilder.toString()
7176
}
@@ -75,7 +80,7 @@ def isMaster = { ->
7580
}
7681

7782
def allCommited = { ->
78-
StringBuilder stringBuilder = new StringBuilder();
83+
StringBuilder stringBuilder = new StringBuilder()
7984
try {
8085
def stdout = new ByteArrayOutputStream()
8186
exec {
@@ -85,7 +90,7 @@ def allCommited = { ->
8590
String commitObject = stdout.toString().trim()
8691
stringBuilder.append(commitObject)
8792
} catch (ignored) {
88-
return false; // NoGitSystemAvailable
93+
return false // NoGitSystemAvailable
8994
}
9095
return stringBuilder.toString().isEmpty()
9196

@@ -97,19 +102,20 @@ tasks.matching { it instanceof Test }.all {
97102
}
98103

99104
android {
100-
compileSdkVersion 27
105+
compileSdkVersion 28
101106

102107
defaultConfig {
103-
minSdkVersion 21
104-
targetSdkVersion 25
108+
minSdkVersion 23
109+
targetSdkVersion 28
105110
multiDexEnabled true
106111
versionCode 1500
107-
version "2.3.OmniCore.1.0.0.705"
112+
version "2.5.1.0002"
108113
buildConfigField "String", "VERSION", '"' + version + '"'
114+
buildConfigField "String", "VARIANT", '"OmniCore v1.0.0.702"'
109115
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
110116
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
111117
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
112-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
118+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
113119
// if you change minSdkVersion to less than 11, you need to change executeTask for wear
114120

115121
ndk {
@@ -139,11 +145,11 @@ android {
139145
testCoverageEnabled(project.hasProperty('coverage'))
140146
}
141147
}
148+
149+
flavorDimensions "standard"
142150
productFlavors {
143-
flavorDimensions "standard"
144151
full {
145152
applicationId "info.nightscout.androidaps"
146-
dimension "standard"
147153
resValue "string", "app_name", "AndroidAPS"
148154
versionName version
149155
manifestPlaceholders = [
@@ -153,7 +159,6 @@ android {
153159
}
154160
pumpcontrol {
155161
applicationId "info.nightscout.aapspumpcontrol"
156-
dimension "standard"
157162
resValue "string", "app_name", "Pumpcontrol"
158163
versionName version + "-pumpcontrol"
159164
manifestPlaceholders = [
@@ -163,7 +168,6 @@ android {
163168
}
164169
nsclient {
165170
applicationId "info.nightscout.nsclient"
166-
dimension "standard"
167171
resValue "string", "app_name", "NSClient"
168172
versionName version + "-nsclient"
169173
manifestPlaceholders = [
@@ -173,7 +177,6 @@ android {
173177
}
174178
nsclient2 {
175179
applicationId "info.nightscout.nsclient2"
176-
dimension "standard"
177180
resValue "string", "app_name", "NSClient2"
178181
versionName version + "-nsclient"
179182
manifestPlaceholders = [
@@ -188,8 +191,15 @@ android {
188191
}
189192

190193
testOptions {
191-
unitTests.returnDefaultValues = true
192-
unitTests.includeAndroidResources = true
194+
unitTests {
195+
returnDefaultValues = true
196+
includeAndroidResources = true
197+
198+
all {
199+
maxParallelForks = 10
200+
forkEvery = 20
201+
}
202+
}
193203
}
194204

195205
useLibrary "org.apache.http.legacy"
@@ -201,34 +211,32 @@ allprojects {
201211
flatDir {
202212
dirs 'libs'
203213
}
214+
maven { url 'https://jitpack.io' }
204215
}
205216
}
206217

207-
configurations {
208-
libs
209-
}
210-
211218
dependencies {
212219
wearApp project(':wear')
213220

214221
implementation fileTree(include: ['*.jar'], dir: 'libs')
215-
implementation 'com.google.android.gms:play-services-wearable:16.0.1'
216-
implementation 'com.google.firebase:firebase-core:16.0.8'
222+
implementation 'com.google.android.gms:play-services-wearable:17.0.0'
223+
implementation 'com.google.firebase:firebase-core:17.2.0'
217224
implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") {
218225
transitive = true;
219226
}
220-
libs "MilosKozak:danars-support-lib:master@zip"
221-
222-
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
223-
implementation "com.android.support:support-v13:${supportLibraryVersion}"
224-
implementation "com.android.support:support-v4:${supportLibraryVersion}"
225-
implementation "com.android.support:cardview-v7:${supportLibraryVersion}"
226-
implementation "com.android.support:recyclerview-v7:${supportLibraryVersion}"
227-
implementation "com.android.support:gridlayout-v7:${supportLibraryVersion}"
228-
implementation "com.android.support:design:${supportLibraryVersion}"
229-
implementation "com.android.support:percent:${supportLibraryVersion}"
227+
228+
implementation 'androidx.appcompat:appcompat:1.1.0'
229+
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
230+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
231+
implementation 'androidx.cardview:cardview:1.0.0'
232+
implementation 'androidx.recyclerview:recyclerview:1.0.0'
233+
implementation 'androidx.gridlayout:gridlayout:1.0.0'
234+
implementation 'com.google.android.material:material:1.0.0'
235+
implementation 'androidx.percentlayout:percentlayout:1.0.0'
230236
implementation "com.wdullaer:materialdatetimepicker:2.3.0"
231-
implementation "com.squareup:otto:1.3.7"
237+
238+
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
239+
232240
implementation "com.j256.ormlite:ormlite-core:${ormLiteVersion}"
233241
implementation "com.j256.ormlite:ormlite-android:${ormLiteVersion}"
234242
implementation("com.github.tony19:logback-android-classic:1.1.1-6") {
@@ -239,7 +247,7 @@ dependencies {
239247
// Graphview cannot be upgraded
240248
implementation "com.jjoe64:graphview:4.0.1"
241249
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.1.1"
242-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
250+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
243251
implementation(name: "android-edittext-validator-v1.3.4-mod", ext: "aar")
244252
implementation 'com.madgag.spongycastle:core:1.58.0.0'
245253

@@ -250,16 +258,15 @@ dependencies {
250258
// excluding org.json which is provided by Android
251259
exclude group: "org.json", module: "json"
252260
}
253-
implementation "com.google.code.gson:gson:2.8.2"
261+
implementation "com.google.code.gson:gson:2.8.5"
254262
implementation "com.google.guava:guava:24.1-jre"
255263

256264
implementation "net.danlew:android.joda:2.9.9.1"
257265
implementation "uk.com.robust-it:cloning:1.9.9"
258266

259267
implementation 'org.mozilla:rhino:1.7.7.2'
260268

261-
implementation "com.jakewharton:butterknife:${butterknifeVersion}"
262-
annotationProcessor "com.jakewharton:butterknife-compiler:${butterknifeVersion}"
269+
implementation 'com.github.DavidProdinger:weekdays-selector:1.1.0'
263270

264271
testImplementation "junit:junit:4.12"
265272
testImplementation "org.json:json:20140107"
@@ -269,26 +276,47 @@ dependencies {
269276
testImplementation "org.powermock:powermock-module-junit4-rule:${powermockVersion}"
270277
testImplementation "org.powermock:powermock-module-junit4:${powermockVersion}"
271278
testImplementation "joda-time:joda-time:2.9.9"
272-
testImplementation "com.google.truth:truth:0.39"
273-
testImplementation 'org.robolectric:robolectric:3.8'
279+
testImplementation("com.google.truth:truth:0.39") {
280+
exclude group: "com.google.guava", module: "guava"
281+
}
274282
testImplementation "org.skyscreamer:jsonassert:1.5.0"
283+
testImplementation "org.hamcrest:hamcrest-all:1.3"
284+
/*
285+
testImplementation("uk.org.lidalia:slf4j-test:1.2.0") {
286+
exclude group: "com.google.guava", module: "guava"
287+
}
288+
*/
275289

276290
androidTestImplementation "org.mockito:mockito-core:2.8.47"
277291
androidTestImplementation "com.google.dexmaker:dexmaker:${dexmakerVersion}"
278292
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
279293
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
294+
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
295+
296+
297+
// new for tidepool
298+
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
299+
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
300+
implementation "com.squareup.retrofit2:retrofit:2.4.0"
301+
implementation "com.squareup.retrofit2:adapter-rxjava2:2.4.0"
302+
implementation "com.squareup.retrofit2:converter-gson:2.4.0"
303+
280304
}
281305

282-
task unzip(type: Copy) {
283-
def zipPath = configurations.libs.find { it.name.startsWith("danars") }
284-
def zipFile = file(zipPath)
285-
def outputDir = file("${buildDir}/unpacked/dist")
286306

287-
from zipTree(zipFile)
307+
task downloadZipFile(type: Download) {
308+
src 'https://github.com/MilosKozak/danars-support-lib/archive/master.zip'
309+
dest new File(buildDir, 'danars.zip')
310+
}
311+
312+
task downloadAndUnzipFile(dependsOn: downloadZipFile, type: Copy) {
313+
from zipTree(downloadZipFile.dest)
314+
def outputDir = file("${buildDir}/unpacked/dist")
288315
into outputDir
289316
}
290317

291-
task copyLibs(dependsOn: unzip, type: Copy) {
318+
319+
task copyLibs(dependsOn: downloadAndUnzipFile, type: Copy) {
292320
def src = file("${buildDir}/unpacked/dist/danars-support-lib-master")
293321
def target = file("src/main/jniLibs/")
294322

0 commit comments

Comments
 (0)