2019-11-26 09:14:39 +01:00
buildscript {
repositories {
2021-02-10 23:33:32 +01:00
google ( )
mavenCentral ( )
2019-11-26 09:14:39 +01:00
}
dependencies {
2023-07-19 13:53:43 +02:00
classpath "org.jacoco:org.jacoco.core:0.8.10"
2019-11-26 09:14:39 +01:00
}
}
2022-11-08 09:23:46 +01:00
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
}
2019-11-26 09:14:39 +01:00
2022-12-02 10:56:11 +01:00
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
2021-07-09 20:02:22 +02:00
2016-11-17 15:17:02 +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 {
2023-08-03 16:44:27 +02:00
compileSdk 33
2016-11-17 15:17:02 +01:00
defaultConfig {
2023-08-03 16:44:27 +02:00
minSdkVersion 25
2021-12-14 12:17:04 +01:00
targetSdkVersion 29
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
}
2019-03-14 10:47:29 +01:00
2022-06-23 20:31:40 +02:00
buildFeatures {
viewBinding true
}
2023-08-03 11:03:57 +02: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
}
2022-10-17 12:04:14 +02:00
aapsclient {
2022-10-13 15:26:49 +02:00
applicationId "info.nightscout.aapsclient"
2018-08-29 17:56:34 +02:00
dimension "standard"
2022-10-13 15:26:49 +02:00
versionName version + "-aapsclient"
2018-08-29 17:56:34 +02:00
}
2022-10-17 12:04:14 +02:00
aapsclient2 {
2022-10-13 15:26:49 +02:00
applicationId "info.nightscout.aapsclient2"
2018-08-29 17:56:34 +02:00
dimension "standard"
2022-10-13 15:26:49 +02:00
versionName version + "-aapsclient"
2018-08-29 17:56:34 +02:00
}
}
2022-06-06 10:25:08 +02:00
namespace 'info.nightscout.androidaps'
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
}
2023-07-19 13:53:43 +02:00
apply plugin: 'jacoco'
2016-11-25 21:29:46 +01:00
}
2016-11-17 15:17:02 +01:00
dependencies {
2022-11-06 12:28:35 +01:00
implementation project ( ':app-wear-shared:shared' )
implementation project ( ':app-wear-shared:shared-impl' )
2021-12-10 08:58:23 +01:00
2018-03-30 21:26:07 +02:00
implementation fileTree ( include: [ '*.jar' ] , dir: 'libs' )
2019-11-07 22:39:29 +01:00
2021-02-11 11:24:31 +01:00
implementation "androidx.appcompat:appcompat:$appcompat_version"
2022-04-23 14:09:37 +02:00
implementation "androidx.core:core-ktx:$core_version"
2021-12-10 16:29:05 +01:00
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
2022-04-23 14:09:37 +02:00
implementation "androidx.preference:preference-ktx:$preferencektx_version"
2023-08-11 12:53:59 +02:00
implementation 'androidx.wear:wear:1.3.0'
2022-09-19 16:16:17 +02:00
implementation 'androidx.wear.tiles:tiles:1.1.0'
2022-06-23 20:31:40 +02:00
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
2023-09-04 10:05:43 +02:00
testImplementation project ( ':app-wear-shared:shared-tests' )
2021-12-10 15:19:19 +01:00
2022-05-25 15:46:06 +02:00
compileOnly "com.google.android.wearable:wearable:$wearable_version"
implementation "com.google.android.support:wearable:$wearable_version"
implementation "com.google.android.gms:play-services-wearable:$play_services_wearable_version"
2022-11-25 22:14:46 +01:00
implementation ( files ( "${rootProject.rootDir}/core/libraries/libs/ustwo-clockwise-debug.aar" ) )
implementation ( files ( "${rootProject.rootDir}/core/libraries/libs/wearpreferenceactivity-0.5.0.aar" ) )
implementation ( files ( "${rootProject.rootDir}/core/libraries/libs/hellocharts-library-1.5.8.aar" ) )
2020-05-04 21:37:03 +02:00
2022-04-11 14:25:00 +02:00
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutines_version"
2021-12-08 15:20:34 +01:00
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
2021-12-09 22:42:43 +01:00
// for old fashioned support-app version
implementation "com.google.dagger:dagger:$dagger_version"
implementation "com.google.dagger:dagger-android:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
2021-05-18 19:02:25 +02:00
}
repositories {
mavenCentral ( )
2017-12-27 14:57:54 +01:00
}
2022-11-11 19:27:47 +01:00
// This is necessary to prevent Gradle build errors like:
//
// Duplicate class androidx.lifecycle.ViewModelLazy found in modules jetified-lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1) and lifecycle-viewmodel-2.5.0-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.0)
//
// By explicitly adding these dependencies, the jetifier
// is forced to use the correct lifecycle version instead
// of automatically picking 2.3.1.
//
// See: https://stackoverflow.com/a/69832319/560774
configurations {
all {
exclude group: 'androidx.lifecycle' , module: 'lifecycle-viewmodel-ktx'
}
}