e9e1fbae2f
- Fixed mockito configuration for bug in 2.X
146 lines
4.6 KiB
Groovy
146 lines
4.6 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
|
|
}
|
|
}
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'jacoco-android'
|
|
|
|
jacoco {
|
|
toolVersion = "0.8.3"
|
|
}
|
|
|
|
ext {
|
|
wearableVersion = "2.4.0"
|
|
playServicesWearable = "17.0.0"
|
|
powermockVersion = "1.7.3"
|
|
}
|
|
|
|
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) {
|
|
stringBuilder.append('NoGitSystemAvailable')
|
|
}
|
|
stringBuilder.append('-')
|
|
stringBuilder.append((new Date()).format('yyyy.MM.dd'))
|
|
stringBuilder.append('"')
|
|
return stringBuilder.toString()
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
|
|
defaultConfig {
|
|
applicationId "info.nightscout.androidaps"
|
|
minSdkVersion 23
|
|
targetSdkVersion 28
|
|
versionCode 1
|
|
versionName "1.0.2"
|
|
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
productFlavors {
|
|
flavorDimensions "standard"
|
|
full {
|
|
applicationId "info.nightscout.androidaps"
|
|
dimension "standard"
|
|
versionName version
|
|
}
|
|
pumpcontrol {
|
|
applicationId "info.nightscout.aapspumpcontrol"
|
|
dimension "standard"
|
|
versionName version + "-pumpcontrol"
|
|
}
|
|
nsclient {
|
|
applicationId "info.nightscout.nsclient"
|
|
dimension "standard"
|
|
versionName version + "-nsclient"
|
|
}
|
|
nsclient2 {
|
|
applicationId "info.nightscout.nsclient2"
|
|
dimension "standard"
|
|
versionName version + "-nsclient"
|
|
}
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
jcenter()
|
|
flatDir {
|
|
dirs 'libs'
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
//implementation files("libs/hellocharts-library-1.5.5.jar")
|
|
//compile "com.ustwo.android:clockwise-wearable:1.0.2"
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
|
|
|
compileOnly "com.google.android.wearable:wearable:${wearableVersion}"
|
|
implementation "com.google.android.support:wearable:${wearableVersion}"
|
|
implementation "com.google.android.gms:play-services-wearable:${playServicesWearable}"
|
|
implementation(name: 'ustwo-clockwise-debug', ext: 'aar')
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
implementation 'androidx.percentlayout:percentlayout:1.0.0'
|
|
implementation 'androidx.wear:wear:1.0.0'
|
|
implementation('me.denley.wearpreferenceactivity:wearpreferenceactivity:0.5.0')
|
|
implementation('com.github.lecho:hellocharts-library:1.5.8@aar')
|
|
|
|
testImplementation "junit:junit:4.12"
|
|
testImplementation "org.json:json:20140107"
|
|
testImplementation ("org.mockito:mockito-core:2.8.47") {
|
|
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+
|
|
testImplementation 'net.bytebuddy:byte-buddy:1.8.22'
|
|
testImplementation 'net.bytebuddy:byte-buddy-android:1.8.22'
|
|
testImplementation 'net.bytebuddy:byte-buddy-agent:1.8.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.9"
|
|
testImplementation("com.google.truth:truth:0.39") {
|
|
exclude group: "com.google.guava", module: "guava"
|
|
}
|
|
testImplementation "org.skyscreamer:jsonassert:1.5.0"
|
|
testImplementation "org.hamcrest:hamcrest-all:1.3"
|
|
}
|