2019-11-26 09:14:39 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2021-02-10 23:33:32 +01:00
|
|
|
google()
|
|
|
|
mavenCentral()
|
2020-07-28 23:49:21 +02:00
|
|
|
maven { url "https://plugins.gradle.org/m2/" } // jacoco 0.2
|
2019-11-26 09:14:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-07-28 23:49:21 +02:00
|
|
|
//classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
|
|
|
|
classpath 'com.hiya:jacoco-android:0.2'
|
2019-11-26 09:14:39 +01:00
|
|
|
}
|
|
|
|
}
|
2016-11-17 15:17:02 +01:00
|
|
|
apply plugin: 'com.android.application'
|
2021-05-18 19:02:25 +02:00
|
|
|
apply plugin: 'kotlin-android'
|
2020-07-28 23:49:21 +02:00
|
|
|
apply plugin: 'com.hiya.jacoco-android'
|
2019-11-26 09:14:39 +01:00
|
|
|
|
|
|
|
jacoco {
|
2021-07-09 20:02:22 +02:00
|
|
|
toolVersion = "0.8.7"
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(Test) {
|
|
|
|
jacoco.includeNoLocationClasses = true
|
|
|
|
jacoco.excludes = ['jdk.internal.*']
|
2019-11-26 09:14:39 +01:00
|
|
|
}
|
2016-11-17 15:17:02 +01:00
|
|
|
|
2018-01-13 21:34:38 +01:00
|
|
|
ext {
|
2021-02-11 11:34:35 +01:00
|
|
|
wearableVersion = "2.8.1"
|
2021-05-19 21:11:50 +02:00
|
|
|
// playServicesWearable 17.1.0 breaks test
|
|
|
|
playServicesWearable = "17.0.0"
|
2018-01-13 21:34:38 +01:00
|
|
|
}
|
|
|
|
|
2017-08-08 02:06:46 +02:00
|
|
|
def generateGitBuild = { ->
|
|
|
|
|
2019-07-26 23:21:01 +02:00
|
|
|
StringBuilder stringBuilder = new StringBuilder()
|
2017-08-08 02:06:46 +02:00
|
|
|
stringBuilder.append('"')
|
|
|
|
try {
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'describe', '--always'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
String commitObject = stdout.toString().trim()
|
|
|
|
stringBuilder.append(commitObject)
|
|
|
|
} catch (ignored) {
|
|
|
|
stringBuilder.append('NoGitSystemAvailable')
|
|
|
|
}
|
|
|
|
stringBuilder.append('-')
|
|
|
|
stringBuilder.append((new Date()).format('yyyy.MM.dd'))
|
|
|
|
stringBuilder.append('"')
|
|
|
|
return stringBuilder.toString()
|
|
|
|
}
|
2016-11-17 15:17:02 +01:00
|
|
|
|
|
|
|
android {
|
2019-05-16 00:21:32 +02:00
|
|
|
compileSdkVersion 28
|
2016-11-17 15:17:02 +01:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "info.nightscout.androidaps"
|
2020-11-30 20:02:33 +01:00
|
|
|
minSdkVersion 23
|
2019-05-16 00:21:32 +02:00
|
|
|
targetSdkVersion 28
|
2021-01-09 07:00:32 +01:00
|
|
|
versionCode 2
|
|
|
|
versionName "1.0.3"
|
2017-08-08 02:06:46 +02:00
|
|
|
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
2016-11-17 15:17:02 +01:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
2020-04-01 16:13:08 +02:00
|
|
|
firebaseDisable {
|
|
|
|
}
|
2016-11-17 15:17:02 +01:00
|
|
|
}
|
|
|
|
|
2017-10-28 13:42:42 +02:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2018-08-29 17:56:34 +02:00
|
|
|
|
2019-03-14 10:47:29 +01:00
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
}
|
|
|
|
|
2021-02-04 12:57:35 +01:00
|
|
|
flavorDimensions "standard"
|
2018-08-29 17:56:34 +02:00
|
|
|
productFlavors {
|
|
|
|
full {
|
|
|
|
applicationId "info.nightscout.androidaps"
|
|
|
|
dimension "standard"
|
|
|
|
versionName version
|
|
|
|
}
|
|
|
|
pumpcontrol {
|
2019-03-05 20:44:51 +01:00
|
|
|
applicationId "info.nightscout.aapspumpcontrol"
|
2018-08-29 17:56:34 +02:00
|
|
|
dimension "standard"
|
2019-03-05 20:44:51 +01:00
|
|
|
versionName version + "-pumpcontrol"
|
2018-08-29 17:56:34 +02:00
|
|
|
}
|
|
|
|
nsclient {
|
|
|
|
applicationId "info.nightscout.nsclient"
|
|
|
|
dimension "standard"
|
|
|
|
versionName version + "-nsclient"
|
|
|
|
}
|
|
|
|
nsclient2 {
|
|
|
|
applicationId "info.nightscout.nsclient2"
|
|
|
|
dimension "standard"
|
|
|
|
versionName version + "-nsclient"
|
|
|
|
}
|
|
|
|
}
|
2016-11-17 15:17:02 +01:00
|
|
|
}
|
|
|
|
|
2016-11-25 21:29:46 +01:00
|
|
|
allprojects {
|
|
|
|
repositories {
|
2021-02-10 23:33:32 +01:00
|
|
|
google()
|
|
|
|
mavenCentral()
|
2016-11-25 21:29:46 +01:00
|
|
|
flatDir {
|
|
|
|
dirs 'libs'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-11-17 15:17:02 +01:00
|
|
|
dependencies {
|
2018-03-30 21:26:07 +02:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2019-05-16 00:21:32 +02:00
|
|
|
//implementation files("libs/hellocharts-library-1.5.5.jar")
|
2018-01-13 21:34:38 +01:00
|
|
|
//compile "com.ustwo.android:clockwise-wearable:1.0.2"
|
2019-11-07 22:39:29 +01:00
|
|
|
|
2021-02-11 11:24:31 +01:00
|
|
|
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
2019-11-07 22:39:29 +01:00
|
|
|
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
|
|
|
|
2018-03-30 21:26:07 +02:00
|
|
|
compileOnly "com.google.android.wearable:wearable:${wearableVersion}"
|
|
|
|
implementation "com.google.android.support:wearable:${wearableVersion}"
|
2019-03-05 00:23:51 +01:00
|
|
|
implementation "com.google.android.gms:play-services-wearable:${playServicesWearable}"
|
2019-05-16 00:21:32 +02:00
|
|
|
implementation(name: 'ustwo-clockwise-debug', ext: 'aar')
|
2021-02-10 23:33:32 +01:00
|
|
|
implementation(name: 'wearpreferenceactivity-0.5.0', ext: 'aar')
|
2019-05-16 13:57:37 +02:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
|
|
implementation 'androidx.percentlayout:percentlayout:1.0.0'
|
2020-10-19 21:51:13 +02:00
|
|
|
implementation 'androidx.wear:wear:1.1.0'
|
2019-05-16 00:21:32 +02:00
|
|
|
implementation('com.github.lecho:hellocharts-library:1.5.8@aar')
|
2020-05-04 21:37:03 +02:00
|
|
|
|
2020-10-19 21:51:13 +02:00
|
|
|
testImplementation "junit:junit:$junit_version"
|
2021-03-10 08:21:51 +01:00
|
|
|
testImplementation 'org.json:json:20210307'
|
2020-12-18 00:58:49 +01:00
|
|
|
testImplementation("org.mockito:mockito-core:${mockitoVersion}") {
|
2019-11-26 09:14:39 +01:00
|
|
|
exclude group: 'net.bytebuddy', module: 'byte-buddy'
|
|
|
|
exclude group: 'net.bytebuddy', module: 'byte-buddy-android'
|
|
|
|
exclude group: 'net.bytebuddy', module: 'byte-buddy-agent'
|
|
|
|
}
|
|
|
|
// to fix org.mockito:mockito-core dependency issues, fixed in mockito 3+
|
2021-02-22 23:31:26 +01:00
|
|
|
testImplementation "net.bytebuddy:byte-buddy:$byteBuddyVersion"
|
2021-02-28 11:09:31 +01:00
|
|
|
testImplementation "net.bytebuddy:byte-buddy-android:$byteBuddyVersion"
|
|
|
|
testImplementation "net.bytebuddy:byte-buddy-agent:$byteBuddyVersion"
|
2019-11-26 09:14:39 +01:00
|
|
|
|
2019-11-20 00:18:30 +01:00
|
|
|
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}"
|
2021-02-11 11:24:31 +01:00
|
|
|
testImplementation "joda-time:joda-time:$jodatime_version"
|
2021-05-26 07:56:02 +02:00
|
|
|
testImplementation('com.google.truth:truth:1.1.3') {
|
2019-11-20 00:18:30 +01:00
|
|
|
exclude group: "com.google.guava", module: "guava"
|
|
|
|
}
|
|
|
|
testImplementation "org.skyscreamer:jsonassert:1.5.0"
|
|
|
|
testImplementation "org.hamcrest:hamcrest-all:1.3"
|
2021-07-09 17:51:49 +02:00
|
|
|
implementation "androidx.core:core-ktx:$coreVersion"
|
2021-05-18 19:02:25 +02:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2017-12-27 14:57:54 +01:00
|
|
|
}
|