Skip to content

Commit 39e6e96

Browse files
committed
Merge branch 'release-2.5.2'
* release-2.5.2: (69 commits) Fix StockAlertTest Update versionCode and versionName for 2.5.2 release Update strings_translatable.xml (POEditor.com) Remove all "created by" comments. StockCalculatorTest: use the non-deprecated version of Assert Refactor stock calculation: Update translations. Squashed commit of the following: Update strings_translatable.xml (POEditor.com) Update strings_translatable.xml (POEditor.com) Update strings_translatable.xml (POEditor.com) Update strings_translatable.xml (POEditor.com) DownloadDBHelper: externalize hardcoded string AlertManager: add missing 'break' to switch PinLockActivity: don't shadow "toolbar" field from CalendulaActivity MedicineCreateOrEditFragment: substitute "&" for "&&" Improve style of several onOptionItemsSelected() switches. LeftDrawerMgr: rename "home" field to avoid confusion with HOME constant LeftDrawerMgr: rescue "add patient" drawer item. DBMgrs: check if file is empty before continuing with setup Make sure a bunch of Closeables are closed properly. ...
2 parents ed16198 + 764ee05 commit 39e6e96

File tree

220 files changed

+3628
-2643
lines changed

Some content is hidden

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

220 files changed

+3628
-2643
lines changed

Calendula/build.gradle

+79-69
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ buildscript {
2323
}
2424
apply plugin: 'com.android.application'
2525
apply plugin: 'kotlin-android'
26+
apply plugin: 'kotlin-android-extensions'
2627
apply plugin: 'kotlin-kapt'
2728
apply plugin: 'idea'
2829

@@ -62,23 +63,26 @@ def getCustomProguardFiles() {
6263
return fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
6364
}
6465

66+
// workaround for Kotlin coverage in Android Studio 3
67+
// see https://stackoverflow.com/questions/45819700/android-studio-3-0-gradle-3-0-0-beta2-breaks-kotlin-unit-test-coverage
68+
task copyTestClasses(type: Copy) {
69+
from "build/tmp/kotlin-classes/developDebug"
70+
into "build/intermediates/classes/develop/debug"
71+
}
72+
6573
android {
6674
compileSdkVersion 25
6775
buildToolsVersion '26.0.2'
6876
defaultConfig {
6977
minSdkVersion 16
7078
targetSdkVersion 25
71-
versionCode 32
72-
versionName "2.5.1"
79+
versionCode 33
80+
versionName "2.5.2"
7381
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
7482
applicationId "es.usc.citius.servando.calendula"
7583
multiDexEnabled true
7684
}
7785

78-
dexOptions {
79-
javaMaxHeapSize "2g"
80-
}
81-
8286
packagingOptions {
8387
exclude 'LICENSE.txt'
8488
}
@@ -115,6 +119,7 @@ android {
115119
debug {
116120
debuggable true
117121
minifyEnabled false
122+
testCoverageEnabled true
118123
}
119124
beta {
120125
minifyEnabled false
@@ -134,12 +139,14 @@ android {
134139
develop {
135140
applicationIdSuffix ".dev"
136141
dimension "buildType"
142+
minSdkVersion 21
137143
}
138144
product {
139145
dimension "buildType"
140146
}
141147
ci {
142148
dimension "buildType"
149+
minSdkVersion 21
143150
}
144151
}
145152

@@ -155,150 +162,153 @@ dependencies {
155162

156163
/********** DEBUGGING **********/
157164
// Chrome debug bridge
158-
debugCompile 'com.facebook.stetho:stetho:1.5.0'
165+
debugImplementation 'com.facebook.stetho:stetho:1.5.0'
159166

160167
// Memory leak debugging
161168
// 1.5.2 held back because of a bug with gradle 3.0
162-
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
163-
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
164-
alphaCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
165-
betaCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
166-
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
167-
androidTestCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
169+
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.1'
170+
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
171+
alphaImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
172+
betaImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
173+
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
174+
androidTestImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
168175

169176
/********** SUPPORT **********/
170177
// Multidex support
171-
compile 'com.android.support:multidex:1.0.2'
178+
implementation 'com.android.support:multidex:1.0.2'
172179

173180
// Support libs
174-
compile "com.android.support:appcompat-v7:$libVersions.android.support"
175-
compile "com.android.support:cardview-v7:$libVersions.android.support"
176-
compile "com.android.support:design:$libVersions.android.support"
177-
compile "com.android.support:gridlayout-v7:$libVersions.android.support"
178-
compile "com.android.support:palette-v7:$libVersions.android.support"
179-
compile "com.android.support:preference-v7:$libVersions.android.support"
180-
compile "com.android.support:recyclerview-v7:$libVersions.android.support"
181-
compile "com.android.support:support-annotations:$libVersions.android.support"
182-
compile "com.android.support:support-v4:$libVersions.android.support"
181+
implementation "com.android.support:appcompat-v7:$libVersions.android.support"
182+
implementation "com.android.support:cardview-v7:$libVersions.android.support"
183+
implementation "com.android.support:design:$libVersions.android.support"
184+
implementation "com.android.support:gridlayout-v7:$libVersions.android.support"
185+
implementation "com.android.support:palette-v7:$libVersions.android.support"
186+
implementation "com.android.support:preference-v7:$libVersions.android.support"
187+
implementation "com.android.support:recyclerview-v7:$libVersions.android.support"
188+
implementation "com.android.support:support-annotations:$libVersions.android.support"
189+
implementation "com.android.support:support-v4:$libVersions.android.support"
190+
implementation "com.android.support:preference-v14:$libVersions.android.support"
183191

184192
// Testing dependencies
185193
// Made explicit to avoid conflicts with other testing libs
186-
androidTestCompile "com.android.support:appcompat-v7:$libVersions.android.support"
187-
androidTestCompile "com.android.support:design:$libVersions.android.support"
188-
androidTestCompile "com.android.support:recyclerview-v7:$libVersions.android.support"
189-
androidTestCompile "com.android.support:support-annotations:$libVersions.android.support"
190-
androidTestCompile "com.android.support:support-v4:$libVersions.android.support"
194+
androidTestImplementation "com.android.support:appcompat-v7:$libVersions.android.support"
195+
androidTestImplementation "com.android.support:design:$libVersions.android.support"
196+
androidTestImplementation "com.android.support:recyclerview-v7:$libVersions.android.support"
197+
androidTestImplementation "com.android.support:support-annotations:$libVersions.android.support"
198+
androidTestImplementation "com.android.support:support-v4:$libVersions.android.support"
191199

192200
/********** TESTING **********/
193201
// JUnit
194-
testCompile 'junit:junit:4.12'
202+
testImplementation 'junit:junit:4.12'
195203

196204
// Mockito
197-
testCompile "org.mockito:mockito-core:2.8.47"
205+
testImplementation "org.mockito:mockito-inline:2.13.0"
206+
androidTestImplementation "org.mockito:mockito-android:2.13.0"
198207

199208
// Support testing
200-
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:3.0.0'
201-
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.0'
202-
androidTestCompile 'com.android.support.test:rules:1.0.0'
203-
androidTestCompile 'com.android.support.test:runner:1.0.0'
209+
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.1'
210+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
211+
androidTestImplementation 'com.android.support.test:rules:1.0.1'
212+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
204213

205214
// Roboelectric
206-
testCompile "org.robolectric:robolectric:3.6.1"
207-
testCompile "org.robolectric:shadows-multidex:3.6.1"
215+
testImplementation "org.robolectric:robolectric:3.6.1"
216+
testImplementation "org.robolectric:shadows-multidex:3.6.1"
208217

209218
/********** UTILITIES **********/
210219
// HTML parsing
211-
compile 'org.jsoup:jsoup:1.10.2'
220+
implementation 'org.jsoup:jsoup:1.10.2'
212221

213222
// Event bus
214-
compile 'org.greenrobot:eventbus:3.0.0'
223+
implementation 'org.greenrobot:eventbus:3.0.0'
215224

216225
// Jobs
217-
compile 'com.evernote:android-job:1.1.11'
226+
implementation 'com.evernote:android-job:1.1.11'
218227

219228
// JSON serializing-deserializing
220-
compile 'com.google.code.gson:gson:2.8.1'
229+
implementation 'com.google.code.gson:gson:2.8.1'
221230

222231
// Lang utilities
223232
// Used for Levenshtein distance, etc
224-
compile 'org.apache.commons:commons-lang3:3.6'
225-
compile 'org.apache.commons:commons-text:1.1'
233+
implementation 'org.apache.commons:commons-lang3:3.6'
234+
implementation 'org.apache.commons:commons-text:1.1'
226235

227236
// QR code scanning
228-
compile 'com.google.zxing:core:3.3.0'
229-
compile 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
237+
implementation 'com.google.zxing:core:3.3.0'
238+
implementation 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
230239

231240
// Recurrence processing
232-
compile files('libs/rfc2445.jar')
241+
implementation files('libs/rfc2445.jar')
233242

234243
// SQLite ORM
235-
compile 'com.j256.ormlite:ormlite-android:5.0'
244+
implementation 'com.j256.ormlite:ormlite-android:5.0'
236245

237246
// Time and date handling
238-
compile 'com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.6.0'
239-
compile 'joda-time:joda-time:2.9.7'
247+
implementation 'com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.6.0'
248+
implementation 'joda-time:joda-time:2.9.7'
240249

241250
// View/resource binding
242251
kapt 'com.jakewharton:butterknife-compiler:8.8.1'
243-
compile 'com.jakewharton:butterknife:8.8.1'
252+
implementation 'com.jakewharton:butterknife:8.8.1'
244253

245254
/********** VIEWS AND VIEW UTILITIES **********/
246255
// About page with libraries
247-
compile('com.mikepenz:aboutlibraries:5.2.5@aar') {
256+
implementation('com.mikepenz:aboutlibraries:5.2.5@aar') {
248257
transitive = true
249258
}
250259

251260
// Calendar views
252-
compile 'com.roomorama:caldroid:3.0.1'
253-
compile 'com.squareup:android-times-square:1.6.4@aar'
261+
implementation 'com.roomorama:caldroid:3.0.1'
262+
implementation 'com.squareup:android-times-square:1.6.4@aar'
254263

255264
// Circular progress "pie" view
256265
// Used for pill picker
257-
compile 'com.github.filippudak.progresspieview:library:1.0.4'
266+
implementation 'com.github.filippudak.progresspieview:library:1.0.4'
258267

259268
// Dialogs with material style
260-
compile 'com.github.javiersantos:MaterialStyledDialogs:2.0'
269+
implementation 'com.github.javiersantos:MaterialStyledDialogs:2.0'
261270

262271
// GIF ImageView
263-
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.3'
272+
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.3'
264273

265274
// Icons
266-
compile 'com.mikepenz:community-material-typeface:1.9.32.2@aar'
267-
compile 'com.mikepenz:google-material-typeface:2.1.2.1@aar'
268-
compile 'com.mikepenz:iconics-core:2.7.1@aar'
275+
implementation 'com.mikepenz:community-material-typeface:1.9.32.2@aar'
276+
implementation 'com.mikepenz:google-material-typeface:2.1.2.1@aar'
277+
implementation 'com.mikepenz:iconics-core:2.7.1@aar'
269278

270279
// Image loading
271-
compile 'com.squareup.picasso:picasso:2.5.2'
280+
implementation 'com.squareup.picasso:picasso:2.5.2'
272281

273282
// Intro slides
274-
compile 'com.heinrichreimersoftware:material-intro:1.5.8'
283+
implementation 'com.heinrichreimersoftware:material-intro:1.5.8'
275284

276285
// Material style utilities
277-
compile('com.mikepenz:materialize:0.2.7@aar') {
286+
implementation('com.mikepenz:materialize:0.2.7@aar') {
278287
transitive = true
279288
}
280289

281290
// Picker DialogFragments
282-
compile 'com.code-troopers.betterpickers:library:3.1.0'
291+
implementation 'com.code-troopers.betterpickers:library:3.1.0'
283292

284293
// Round image view
285-
compile 'com.makeramen:roundedimageview:1.5.0'
294+
implementation 'com.makeramen:roundedimageview:1.5.0'
286295

287296
// Tab strip
288-
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
297+
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
289298

290299
// Sliding left drawer
291-
compile('com.mikepenz:materialdrawer:4.4.1@aar') {
300+
implementation('com.mikepenz:materialdrawer:4.4.1@aar') {
292301
transitive = true
293302
}
294303

295304
// Recyclerview adapters
296-
compile('com.mikepenz:fastadapter:2.1.5@aar') {
305+
implementation('com.mikepenz:fastadapter:2.1.5@aar') {
297306
transitive = true
298307
}
299-
compile 'com.mikepenz:fastadapter-commons:2.1.0@aar'
300-
compile 'com.mikepenz:fastadapter-extensions:2.1.0@aar'
301-
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
308+
implementation 'com.mikepenz:fastadapter-commons:2.1.0@aar'
309+
implementation 'com.mikepenz:fastadapter-extensions:2.1.0@aar'
310+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
302311

303312

304313
}
314+

Calendula/src/alpha/java/es/usc/citius/servando/calendula/util/debug/StethoHelper.java

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
import android.content.Context;
44

5-
/**
6-
* Created by alvaro.brey.vilas on 19/12/17.
7-
*/
8-
95
public class StethoHelper implements StethoHelperInterface {
106
@Override
117
public void init(Context context) {

Calendula/src/androidTest/java/es/usc/citius/servando/calendula/activities/AllergiesTest.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@
5252
import static android.support.test.espresso.matcher.ViewMatchers.withText;
5353
import static org.junit.Assert.assertEquals;
5454

55-
/**
56-
* Created by alvaro.brey.vilas on 06/02/17.
57-
*/
58-
5955
@RunWith(AndroidJUnit4.class)
6056
public class AllergiesTest {
6157

@@ -65,7 +61,7 @@ public class AllergiesTest {
6561

6662

6763
@Before
68-
public void setup() throws SQLException {
64+
public void setUp() throws SQLException {
6965
// drop database
7066
DB.dropAndCreateDatabase();
7167
// create some allergens

Calendula/src/androidTest/java/es/usc/citius/servando/calendula/activities/MedicinesAlertTest.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@
5757
import static android.support.test.espresso.assertion.ViewAssertions.matches;
5858
import static android.support.test.espresso.matcher.ViewMatchers.withId;
5959

60-
/**
61-
* Created by alvaro.brey.vilas on 06/02/17.
62-
*/
6360

6461
@RunWith(AndroidJUnit4.class)
6562
public class MedicinesAlertTest {
@@ -72,7 +69,7 @@ public class MedicinesAlertTest {
7269

7370

7471
@Before
75-
public void setup() throws SQLException {
72+
public void setUp() throws SQLException {
7673
// drop database
7774
DB.dropAndCreateDatabase();
7875
// set some vars

0 commit comments

Comments
 (0)