Merge branch 'dev' of https://github.com/nightscout/AndroidAPS into dev
This commit is contained in:
commit
d8190d00b6
147 changed files with 2911 additions and 2413 deletions
|
@ -25,8 +25,8 @@ jobs:
|
||||||
- android/start-emulator-and-run-tests:
|
- android/start-emulator-and-run-tests:
|
||||||
system-image: system-images;android-29;google_apis;x86
|
system-image: system-images;android-29;google_apis;x86
|
||||||
# Compile while the emulator starts to use the time.
|
# Compile while the emulator starts to use the time.
|
||||||
post-emulator-launch-assemble-command: ./gradlew compileFullDebugUnitTestSources database:impl:compileFullDebugAndroidTestSources
|
post-emulator-launch-assemble-command: ./gradlew compileFullDebugUnitTestSources compileFullDebugAndroidTestSources
|
||||||
test-command: ./gradlew database:impl:connectedFullDebugAndroidTest
|
test-command: ./gradlew connectedFullDebugAndroidTest
|
||||||
|
|
||||||
- android/run-tests:
|
- android/run-tests:
|
||||||
test-command: ./gradlew testFullDebugUnitTest
|
test-command: ./gradlew testFullDebugUnitTest
|
||||||
|
|
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -3,6 +3,7 @@
|
||||||
/local.properties
|
/local.properties
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*/jacoco.exec
|
*/jacoco.exec
|
||||||
|
*/output-metadata.json
|
||||||
/build
|
/build
|
||||||
/captures
|
/captures
|
||||||
*.apk
|
*.apk
|
||||||
|
@ -19,6 +20,9 @@ app/.classpath
|
||||||
app/.settings/org.eclipse.buildship.core.prefs
|
app/.settings/org.eclipse.buildship.core.prefs
|
||||||
wear/.classpath
|
wear/.classpath
|
||||||
wear/.settings/org.eclipse.buildship.core.prefs
|
wear/.settings/org.eclipse.buildship.core.prefs
|
||||||
app/nsclient/*
|
app/aapsclient/*
|
||||||
app/nsclient2/*
|
app/aapsclient2/*
|
||||||
app/pumpcontrol/*
|
app/pumpcontrol/*
|
||||||
|
wear/aapsclient/*
|
||||||
|
wear/aapsclient2/*
|
||||||
|
wear/pumpcontrol/*
|
||||||
|
|
282
app/build.gradle
282
app/build.gradle
|
@ -1,282 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.application'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
id 'kotlinx-serialization'
|
|
||||||
id 'com.google.gms.google-services'
|
|
||||||
id 'com.google.firebase.crashlytics'
|
|
||||||
id 'com.vanniktech.dependency.graph.generator'
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
google()
|
|
||||||
}
|
|
||||||
|
|
||||||
def generateGitBuild = { ->
|
|
||||||
StringBuilder stringBuilder = new StringBuilder()
|
|
||||||
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')
|
|
||||||
}
|
|
||||||
return stringBuilder.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
def generateGitRemote = { ->
|
|
||||||
StringBuilder stringBuilder = new StringBuilder()
|
|
||||||
try {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'remote', 'get-url', 'origin'
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
String commitObject = stdout.toString().trim()
|
|
||||||
stringBuilder.append(commitObject)
|
|
||||||
} catch (ignored) {
|
|
||||||
stringBuilder.append('NoGitSystemAvailable')
|
|
||||||
}
|
|
||||||
return stringBuilder.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
def generateDate = { ->
|
|
||||||
StringBuilder stringBuilder = new StringBuilder()
|
|
||||||
// showing only date prevents app to rebuild everytime
|
|
||||||
stringBuilder.append((new Date()).format('yyyy.MM.dd'))
|
|
||||||
return stringBuilder.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
def isMaster = { ->
|
|
||||||
return !version.contains('-')
|
|
||||||
}
|
|
||||||
|
|
||||||
def gitAvailable = { ->
|
|
||||||
StringBuilder stringBuilder = new StringBuilder()
|
|
||||||
try {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine 'git', '--version'
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
String commitObject = stdout.toString().trim()
|
|
||||||
stringBuilder.append(commitObject)
|
|
||||||
} catch (ignored) {
|
|
||||||
return false // NoGitSystemAvailable
|
|
||||||
}
|
|
||||||
return !stringBuilder.toString().isEmpty()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def allCommitted = { ->
|
|
||||||
StringBuilder stringBuilder = new StringBuilder()
|
|
||||||
try {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'status', '-s'
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
// ignore all changes done in .idea/codeStyles
|
|
||||||
String cleanedList = stdout.toString().replaceAll(/(?m)^\s*(M|A|D|\?\?)\s*.*?\.idea\/codeStyles\/.*?\s*$/, "")
|
|
||||||
// ignore all files added to project dir but not staged/known to GIT
|
|
||||||
cleanedList = cleanedList.replaceAll(/(?m)^\s*(\?\?)\s*.*?\s*$/, "")
|
|
||||||
stringBuilder.append(cleanedList.trim())
|
|
||||||
} catch (ignored) {
|
|
||||||
return false // NoGitSystemAvailable
|
|
||||||
}
|
|
||||||
return stringBuilder.toString().isEmpty()
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
|
|
||||||
namespace 'app.aaps'
|
|
||||||
ndkVersion "21.1.6352462"
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
multiDexEnabled true
|
|
||||||
versionCode 1500
|
|
||||||
version "3.2.0-dev-m"
|
|
||||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
|
||||||
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
|
||||||
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
|
|
||||||
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
|
|
||||||
buildConfigField "String", "COMMITTED", '"' + allCommitted() + '"'
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
flavorDimensions = ["standard"]
|
|
||||||
productFlavors {
|
|
||||||
full {
|
|
||||||
getIsDefault().set(true)
|
|
||||||
applicationId "info.nightscout.androidaps"
|
|
||||||
dimension "standard"
|
|
||||||
resValue "string", "app_name", "AAPS"
|
|
||||||
versionName version
|
|
||||||
manifestPlaceholders = [
|
|
||||||
appIcon : "@mipmap/ic_launcher",
|
|
||||||
appIconRound: "@mipmap/ic_launcher_round"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
pumpcontrol {
|
|
||||||
applicationId "info.nightscout.aapspumpcontrol"
|
|
||||||
dimension "standard"
|
|
||||||
resValue "string", "app_name", "Pumpcontrol"
|
|
||||||
versionName version + "-pumpcontrol"
|
|
||||||
manifestPlaceholders = [
|
|
||||||
appIcon : "@mipmap/ic_pumpcontrol",
|
|
||||||
appIconRound: "@null"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
aapsclient {
|
|
||||||
applicationId "info.nightscout.aapsclient"
|
|
||||||
dimension "standard"
|
|
||||||
resValue "string", "app_name", "AAPSClient"
|
|
||||||
versionName version + "-aapsclient"
|
|
||||||
manifestPlaceholders = [
|
|
||||||
appIcon : "@mipmap/ic_yellowowl",
|
|
||||||
appIconRound: "@mipmap/ic_yellowowl"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
aapsclient2 {
|
|
||||||
applicationId "info.nightscout.aapsclient2"
|
|
||||||
dimension "standard"
|
|
||||||
resValue "string", "app_name", "AAPSClient2"
|
|
||||||
versionName version + "-aapsclient"
|
|
||||||
manifestPlaceholders = [
|
|
||||||
appIcon : "@mipmap/ic_blueowl",
|
|
||||||
appIconRound: "@mipmap/ic_blueowl"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
useLibrary "org.apache.http.legacy"
|
|
||||||
|
|
||||||
dataBinding { //Deleting it causes a binding error
|
|
||||||
enabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
wearApp project(':wear')
|
|
||||||
|
|
||||||
// in order to use internet's versions you'd need to enable Jetifier again
|
|
||||||
// https://github.com/nightscout/graphview.git
|
|
||||||
// https://github.com/nightscout/iconify.git
|
|
||||||
implementation project(':shared:impl')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:graphview')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:libraries')
|
|
||||||
implementation project(':core:nssdk')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
implementation project(':ui')
|
|
||||||
implementation project(':plugins:aps')
|
|
||||||
implementation project(':plugins:automation')
|
|
||||||
implementation project(':plugins:configuration')
|
|
||||||
implementation project(':plugins:constraints')
|
|
||||||
implementation project(':plugins:insulin')
|
|
||||||
implementation project(':plugins:main')
|
|
||||||
implementation project(':plugins:sensitivity')
|
|
||||||
implementation project(':plugins:smoothing')
|
|
||||||
implementation project(':plugins:source')
|
|
||||||
implementation project(':plugins:sync')
|
|
||||||
implementation project(':implementation')
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':database:impl')
|
|
||||||
implementation project(':pump:combo')
|
|
||||||
implementation project(':pump:combov2')
|
|
||||||
implementation project(':pump:dana')
|
|
||||||
implementation project(':pump:danars')
|
|
||||||
implementation project(':pump:danar')
|
|
||||||
implementation project(':pump:diaconn')
|
|
||||||
implementation project(':pump:eopatch')
|
|
||||||
implementation project(':pump:medtrum')
|
|
||||||
implementation project(':insight')
|
|
||||||
implementation project(':pump:medtronic')
|
|
||||||
implementation project(':pump:pump-common')
|
|
||||||
implementation project(':pump:omnipod-common')
|
|
||||||
implementation project(':pump:omnipod-eros')
|
|
||||||
implementation project(':pump:omnipod-dash')
|
|
||||||
implementation project(':pump:rileylink')
|
|
||||||
implementation project(':pump:virtual')
|
|
||||||
implementation project(':workflow')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
|
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
||||||
|
|
||||||
/* Dagger2 - We are going to use dagger.android which includes
|
|
||||||
* support for Activity and fragment injection so we need to include
|
|
||||||
* the following dependencies */
|
|
||||||
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
|
|
||||||
kapt "com.google.dagger:dagger-compiler:$dagger_version"
|
|
||||||
|
|
||||||
// MainApp
|
|
||||||
api "com.uber.rxdogtag2:rxdogtag:2.0.2"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
// Run 'adb' shell command to clear application data of main app for 'debug' variant
|
|
||||||
task clearMainAppData(type: Exec) {
|
|
||||||
// we have to iterate to find the 'debug' variant to obtain a variant reference
|
|
||||||
android.applicationVariants.all { variant ->
|
|
||||||
if (variant.name == "fullDebug") {
|
|
||||||
def applicationId = [variant.mergedFlavor.applicationId, variant.buildType.applicationIdSuffix].findAll().join()
|
|
||||||
def clearDataCommand = ['adb', 'shell', 'pm', 'clear', applicationId]
|
|
||||||
println "Clearing application data of ${variant.name} variant: [${clearDataCommand}]"
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine clearDataCommand
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
String result = stdout.toString().trim()
|
|
||||||
if (!result.startsWith("Success")) {
|
|
||||||
println result
|
|
||||||
throw new GradleException(clearDataCommand.join(" "))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Clear Application Data (once) before running instrumentation test
|
|
||||||
tasks.whenTaskAdded { task ->
|
|
||||||
// Both of these targets are equivalent today, although in future connectedCheck
|
|
||||||
// will also include connectedUiAutomatorTest (not implemented yet)
|
|
||||||
if(task.name == "connectedAndroidTest" || task.name == "connectedCheck"){
|
|
||||||
task.dependsOn(clearMainAppData)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
printf('--------------\n')
|
|
||||||
printf('isMaster: %s\n', isMaster().toString())
|
|
||||||
printf('gitAvailable: %s\n', gitAvailable().toString())
|
|
||||||
printf('allCommitted: %s\n', allCommitted().toString())
|
|
||||||
printf('--------------\n')
|
|
||||||
if (isMaster() && !gitAvailable()) {
|
|
||||||
throw new GradleException('GIT system is not available. On Windows try to run Android Studio as an Administrator. Check if GIT is installed and Studio have permissions to use it')
|
|
||||||
}
|
|
||||||
if (isMaster() && !allCommitted()) {
|
|
||||||
throw new GradleException('There are uncommitted changes. Clone sources again as described in wiki and do not allow gradle update')
|
|
||||||
}
|
|
||||||
|
|
234
app/build.gradle.kts
Normal file
234
app/build.gradle.kts
Normal file
|
@ -0,0 +1,234 @@
|
||||||
|
import java.io.ByteArrayOutputStream
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Date
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("com.google.gms.google-services")
|
||||||
|
id("com.google.firebase.crashlytics")
|
||||||
|
id("android-app-dependencies")
|
||||||
|
id("test-app-dependencies")
|
||||||
|
id("jacoco-app-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
google()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun generateGitBuild(): String {
|
||||||
|
val stringBuilder: StringBuilder = StringBuilder()
|
||||||
|
try {
|
||||||
|
val stdout = ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine("git", "describe", "--always")
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
val commitObject = stdout.toString().trim()
|
||||||
|
stringBuilder.append(commitObject)
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
stringBuilder.append("NoGitSystemAvailable")
|
||||||
|
}
|
||||||
|
return stringBuilder.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun generateGitRemote(): String {
|
||||||
|
val stringBuilder: StringBuilder = StringBuilder()
|
||||||
|
try {
|
||||||
|
val stdout = ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine("git", "remote", "get-url", "origin")
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
val commitObject: String = stdout.toString().trim()
|
||||||
|
stringBuilder.append(commitObject)
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
stringBuilder.append("NoGitSystemAvailable")
|
||||||
|
}
|
||||||
|
return stringBuilder.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun generateDate(): String {
|
||||||
|
val stringBuilder: StringBuilder = StringBuilder()
|
||||||
|
// showing only date prevents app to rebuild everytime
|
||||||
|
stringBuilder.append(SimpleDateFormat("yyyy.MM.dd").format(Date()))
|
||||||
|
return stringBuilder.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun isMaster(): Boolean = !Versions.appVersion.contains("-")
|
||||||
|
|
||||||
|
fun gitAvailable(): Boolean {
|
||||||
|
val stringBuilder: StringBuilder = StringBuilder()
|
||||||
|
try {
|
||||||
|
val stdout = ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine("git", "--version")
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
val commitObject = stdout.toString().trim()
|
||||||
|
stringBuilder.append(commitObject)
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
return false // NoGitSystemAvailable
|
||||||
|
}
|
||||||
|
return stringBuilder.toString().isNotEmpty()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun allCommitted(): Boolean {
|
||||||
|
val stringBuilder: StringBuilder = StringBuilder()
|
||||||
|
try {
|
||||||
|
val stdout = ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine("git", "status", "-s")
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
// ignore all changes done in .idea/codeStyles
|
||||||
|
val cleanedList: String = stdout.toString().replace("/(?m)^\\s*(M|A|D|\\?\\?)\\s*.*?\\.idea\\/codeStyles\\/.*?\\s*\$/", "")
|
||||||
|
// ignore all files added to project dir but not staged/known to GIT
|
||||||
|
.replace("/(?m)^\\s*(\\?\\?)\\s*.*?\\s*\$/", "")
|
||||||
|
stringBuilder.append(cleanedList.trim())
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
return false // NoGitSystemAvailable
|
||||||
|
}
|
||||||
|
return stringBuilder.toString().isEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
|
||||||
|
namespace = "app.aaps"
|
||||||
|
ndkVersion = Versions.ndkVersion
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = Versions.minSdk
|
||||||
|
targetSdk = Versions.targetSdk
|
||||||
|
|
||||||
|
buildConfigField("String", "VERSION", "\"$version\"")
|
||||||
|
buildConfigField("String", "BUILDVERSION", "\"${generateGitBuild()}-${generateDate()}\"")
|
||||||
|
buildConfigField("String", "REMOTE", "\"${generateGitRemote()}\"")
|
||||||
|
buildConfigField("String", "HEAD", "\"${generateGitBuild()}\"")
|
||||||
|
buildConfigField("String", "COMMITTED", "\"${allCommitted()}\"")
|
||||||
|
}
|
||||||
|
|
||||||
|
flavorDimensions.add("standard")
|
||||||
|
productFlavors {
|
||||||
|
create("full") {
|
||||||
|
isDefault = true
|
||||||
|
applicationId = "info.nightscout.androidaps"
|
||||||
|
dimension = "standard"
|
||||||
|
resValue("string", "app_name", "AAPS")
|
||||||
|
versionName = Versions.appVersion
|
||||||
|
manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher"
|
||||||
|
manifestPlaceholders["appIconRound"] = "@mipmap/ic_launcher_round"
|
||||||
|
}
|
||||||
|
create("pumpcontrol") {
|
||||||
|
applicationId = "info.nightscout.aapspumpcontrol"
|
||||||
|
dimension = "standard"
|
||||||
|
resValue("string", "app_name", "Pumpcontrol")
|
||||||
|
versionName = Versions.appVersion + "-pumpcontrol"
|
||||||
|
manifestPlaceholders["appIcon"] = "@mipmap/ic_pumpcontrol"
|
||||||
|
manifestPlaceholders["appIconRound"] = "@null"
|
||||||
|
}
|
||||||
|
create("aapsclient") {
|
||||||
|
applicationId = "info.nightscout.aapsclient"
|
||||||
|
dimension = "standard"
|
||||||
|
resValue("string", "app_name", "AAPSClient")
|
||||||
|
versionName = Versions.appVersion + "-aapsclient"
|
||||||
|
manifestPlaceholders["appIcon"] = "@mipmap/ic_yellowowl"
|
||||||
|
manifestPlaceholders["appIconRound"] = "@mipmap/ic_yellowowl"
|
||||||
|
}
|
||||||
|
create("aapsclient2") {
|
||||||
|
applicationId = "info.nightscout.aapsclient2"
|
||||||
|
dimension = "standard"
|
||||||
|
resValue("string", "app_name", "AAPSClient2")
|
||||||
|
versionName = Versions.appVersion + "-aapsclient"
|
||||||
|
manifestPlaceholders["appIcon"] = "@mipmap/ic_blueowl"
|
||||||
|
manifestPlaceholders["appIconRound"] = "@mipmap/ic_blueowl"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
useLibrary("org.apache.http.legacy")
|
||||||
|
|
||||||
|
//Deleting it causes a binding error
|
||||||
|
buildFeatures {
|
||||||
|
dataBinding = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
wearApp(project(":wear"))
|
||||||
|
|
||||||
|
// in order to use internet"s versions you"d need to enable Jetifier again
|
||||||
|
// https://github.com/nightscout/graphview.git
|
||||||
|
// https://github.com/nightscout/iconify.git
|
||||||
|
implementation(project(":shared:impl"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:graphview"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:libraries"))
|
||||||
|
implementation(project(":core:nssdk"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
implementation(project(":ui"))
|
||||||
|
implementation(project(":plugins:aps"))
|
||||||
|
implementation(project(":plugins:automation"))
|
||||||
|
implementation(project(":plugins:configuration"))
|
||||||
|
implementation(project(":plugins:constraints"))
|
||||||
|
implementation(project(":plugins:insulin"))
|
||||||
|
implementation(project(":plugins:main"))
|
||||||
|
implementation(project(":plugins:sensitivity"))
|
||||||
|
implementation(project(":plugins:smoothing"))
|
||||||
|
implementation(project(":plugins:source"))
|
||||||
|
implementation(project(":plugins:sync"))
|
||||||
|
implementation(project(":implementation"))
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":database:impl"))
|
||||||
|
implementation(project(":pump:combo"))
|
||||||
|
implementation(project(":pump:combov2"))
|
||||||
|
implementation(project(":pump:dana"))
|
||||||
|
implementation(project(":pump:danars"))
|
||||||
|
implementation(project(":pump:danar"))
|
||||||
|
implementation(project(":pump:diaconn"))
|
||||||
|
implementation(project(":pump:eopatch"))
|
||||||
|
implementation(project(":pump:medtrum"))
|
||||||
|
implementation(project(":insight"))
|
||||||
|
implementation(project(":pump:medtronic"))
|
||||||
|
implementation(project(":pump:pump-common"))
|
||||||
|
implementation(project(":pump:omnipod-common"))
|
||||||
|
implementation(project(":pump:omnipod-eros"))
|
||||||
|
implementation(project(":pump:omnipod-dash"))
|
||||||
|
implementation(project(":pump:rileylink"))
|
||||||
|
implementation(project(":pump:virtual"))
|
||||||
|
implementation(project(":workflow"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
|
||||||
|
/* Dagger2 - We are going to use dagger.android which includes
|
||||||
|
* support for Activity and fragment injection so we need to include
|
||||||
|
* the following dependencies */
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
|
||||||
|
// MainApp
|
||||||
|
api(Libs.Rx.rxDogTag)
|
||||||
|
}
|
||||||
|
|
||||||
|
println("-------------------")
|
||||||
|
println("isMaster: ${isMaster()}")
|
||||||
|
println("gitAvailable: ${gitAvailable()}")
|
||||||
|
println("allCommitted: ${allCommitted()}")
|
||||||
|
println("-------------------")
|
||||||
|
if (isMaster() && !gitAvailable()) {
|
||||||
|
throw GradleException("GIT system is not available. On Windows try to run Android Studio as an Administrator. Check if GIT is installed and Studio have permissions to use it")
|
||||||
|
}
|
||||||
|
if (isMaster() && !allCommitted()) {
|
||||||
|
throw GradleException("There are uncommitted changes. Clone sources again as described in wiki and do not allow gradle update")
|
||||||
|
}
|
||||||
|
|
|
@ -205,7 +205,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() {
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.nav_about -> {
|
R.id.nav_about -> {
|
||||||
var message = "Build: ${BuildConfig.BUILDVERSION}\n"
|
var message = "Build: ${config.BUILD_VERSION}\n"
|
||||||
message += "Flavor: ${BuildConfig.FLAVOR}${BuildConfig.BUILD_TYPE}\n"
|
message += "Flavor: ${BuildConfig.FLAVOR}${BuildConfig.BUILD_TYPE}\n"
|
||||||
message += "${rh.gs(app.aaps.plugins.configuration.R.string.configbuilder_nightscoutversion_label)} ${activePlugin.activeNsClient?.detectedNsVersion() ?: rh.gs(app.aaps.plugins.main.R.string.not_available_full)}"
|
message += "${rh.gs(app.aaps.plugins.configuration.R.string.configbuilder_nightscoutversion_label)} ${activePlugin.activeNsClient?.detectedNsVersion() ?: rh.gs(app.aaps.plugins.main.R.string.not_available_full)}"
|
||||||
if (config.isEngineeringMode()) message += "\n${rh.gs(app.aaps.plugins.configuration.R.string.engineering_mode_enabled)}"
|
if (config.isEngineeringMode()) message += "\n${rh.gs(app.aaps.plugins.configuration.R.string.engineering_mode_enabled)}"
|
||||||
|
@ -215,7 +215,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() {
|
||||||
val messageSpanned = SpannableString(message)
|
val messageSpanned = SpannableString(message)
|
||||||
Linkify.addLinks(messageSpanned, Linkify.WEB_URLS)
|
Linkify.addLinks(messageSpanned, Linkify.WEB_URLS)
|
||||||
MaterialAlertDialogBuilder(this@MainActivity, app.aaps.core.ui.R.style.DialogTheme)
|
MaterialAlertDialogBuilder(this@MainActivity, app.aaps.core.ui.R.style.DialogTheme)
|
||||||
.setTitle(rh.gs(R.string.app_name) + " " + BuildConfig.VERSION)
|
.setTitle(rh.gs(R.string.app_name) + " " + config.VERSION)
|
||||||
.setIcon(iconsProvider.getIcon())
|
.setIcon(iconsProvider.getIcon())
|
||||||
.setMessage(messageSpanned)
|
.setMessage(messageSpanned)
|
||||||
.setPositiveButton(rh.gs(app.aaps.core.ui.R.string.ok), null)
|
.setPositiveButton(rh.gs(app.aaps.core.ui.R.string.ok), null)
|
||||||
|
@ -448,16 +448,16 @@ class MainActivity : DaggerAppCompatActivityWithResult() {
|
||||||
if (!fabricPrivacy.fabricEnabled()) return
|
if (!fabricPrivacy.fabricEnabled()) return
|
||||||
val closedLoopEnabled = if (constraintChecker.isClosedLoopAllowed().value()) "CLOSED_LOOP_ENABLED" else "CLOSED_LOOP_DISABLED"
|
val closedLoopEnabled = if (constraintChecker.isClosedLoopAllowed().value()) "CLOSED_LOOP_ENABLED" else "CLOSED_LOOP_DISABLED"
|
||||||
// Size is limited to 36 chars
|
// Size is limited to 36 chars
|
||||||
val remote = BuildConfig.REMOTE.lowercase(Locale.getDefault())
|
val remote = config.REMOTE.lowercase(Locale.getDefault())
|
||||||
.replace("https://", "")
|
.replace("https://", "")
|
||||||
.replace("http://", "")
|
.replace("http://", "")
|
||||||
.replace(".git", "")
|
.replace(".git", "")
|
||||||
.replace(".com/", ":")
|
.replace(".com/", ":")
|
||||||
.replace(".org/", ":")
|
.replace(".org/", ":")
|
||||||
.replace(".net/", ":")
|
.replace(".net/", ":")
|
||||||
fabricPrivacy.firebaseAnalytics.setUserProperty("Mode", BuildConfig.APPLICATION_ID + "-" + closedLoopEnabled)
|
fabricPrivacy.firebaseAnalytics.setUserProperty("Mode", config.APPLICATION_ID + "-" + closedLoopEnabled)
|
||||||
fabricPrivacy.firebaseAnalytics.setUserProperty("Language", sp.getString(app.aaps.core.ui.R.string.key_language, Locale.getDefault().language))
|
fabricPrivacy.firebaseAnalytics.setUserProperty("Language", sp.getString(app.aaps.core.ui.R.string.key_language, Locale.getDefault().language))
|
||||||
fabricPrivacy.firebaseAnalytics.setUserProperty("Version", BuildConfig.VERSION)
|
fabricPrivacy.firebaseAnalytics.setUserProperty("Version", config.VERSION_NAME)
|
||||||
fabricPrivacy.firebaseAnalytics.setUserProperty("HEAD", BuildConfig.HEAD)
|
fabricPrivacy.firebaseAnalytics.setUserProperty("HEAD", BuildConfig.HEAD)
|
||||||
fabricPrivacy.firebaseAnalytics.setUserProperty("Remote", remote)
|
fabricPrivacy.firebaseAnalytics.setUserProperty("Remote", remote)
|
||||||
val hashes: List<String> = signatureVerifierPlugin.shortHashes()
|
val hashes: List<String> = signatureVerifierPlugin.shortHashes()
|
||||||
|
@ -471,9 +471,9 @@ class MainActivity : DaggerAppCompatActivityWithResult() {
|
||||||
activePlugin.activeInsulin.let { fabricPrivacy.firebaseAnalytics.setUserProperty("Insulin", it::class.java.simpleName) }
|
activePlugin.activeInsulin.let { fabricPrivacy.firebaseAnalytics.setUserProperty("Insulin", it::class.java.simpleName) }
|
||||||
// Add to crash log too
|
// Add to crash log too
|
||||||
FirebaseCrashlytics.getInstance().setCustomKey("HEAD", BuildConfig.HEAD)
|
FirebaseCrashlytics.getInstance().setCustomKey("HEAD", BuildConfig.HEAD)
|
||||||
FirebaseCrashlytics.getInstance().setCustomKey("Version", BuildConfig.VERSION)
|
FirebaseCrashlytics.getInstance().setCustomKey("Version", config.VERSION_NAME)
|
||||||
FirebaseCrashlytics.getInstance().setCustomKey("BuildType", BuildConfig.BUILD_TYPE)
|
FirebaseCrashlytics.getInstance().setCustomKey("BuildType", config.BUILD_TYPE)
|
||||||
FirebaseCrashlytics.getInstance().setCustomKey("BuildFlavor", BuildConfig.FLAVOR)
|
FirebaseCrashlytics.getInstance().setCustomKey("BuildFlavor", config.FLAVOR)
|
||||||
FirebaseCrashlytics.getInstance().setCustomKey("Remote", remote)
|
FirebaseCrashlytics.getInstance().setCustomKey("Remote", remote)
|
||||||
FirebaseCrashlytics.getInstance().setCustomKey("Committed", BuildConfig.COMMITTED)
|
FirebaseCrashlytics.getInstance().setCustomKey("Committed", BuildConfig.COMMITTED)
|
||||||
FirebaseCrashlytics.getInstance().setCustomKey("Hash", hashes[0])
|
FirebaseCrashlytics.getInstance().setCustomKey("Hash", hashes[0])
|
||||||
|
|
|
@ -100,7 +100,7 @@ class MainApp : DaggerApplication() {
|
||||||
setRxErrorHandler()
|
setRxErrorHandler()
|
||||||
LocaleHelper.update(this@MainApp)
|
LocaleHelper.update(this@MainApp)
|
||||||
|
|
||||||
var gitRemote: String? = BuildConfig.REMOTE
|
var gitRemote: String? = config.REMOTE
|
||||||
var commitHash: String? = BuildConfig.HEAD
|
var commitHash: String? = BuildConfig.HEAD
|
||||||
if (gitRemote?.contains("NoGitSystemAvailable") == true) {
|
if (gitRemote?.contains("NoGitSystemAvailable") == true) {
|
||||||
gitRemote = null
|
gitRemote = null
|
||||||
|
@ -109,9 +109,9 @@ class MainApp : DaggerApplication() {
|
||||||
disposable += compatDBHelper.dbChangeDisposable()
|
disposable += compatDBHelper.dbChangeDisposable()
|
||||||
registerActivityLifecycleCallbacks(activityMonitor)
|
registerActivityLifecycleCallbacks(activityMonitor)
|
||||||
runOnUiThread { themeSwitcherPlugin.setThemeMode() }
|
runOnUiThread { themeSwitcherPlugin.setThemeMode() }
|
||||||
aapsLogger.debug("Version: " + BuildConfig.VERSION_NAME)
|
aapsLogger.debug("Version: " + config.VERSION_NAME)
|
||||||
aapsLogger.debug("BuildVersion: " + BuildConfig.BUILDVERSION)
|
aapsLogger.debug("BuildVersion: " + config.BUILD_VERSION)
|
||||||
aapsLogger.debug("Remote: " + BuildConfig.REMOTE)
|
aapsLogger.debug("Remote: " + config.REMOTE)
|
||||||
registerLocalBroadcastReceiver()
|
registerLocalBroadcastReceiver()
|
||||||
|
|
||||||
// trigger here to see the new version on app start after an update
|
// trigger here to see the new version on app start after an update
|
||||||
|
@ -128,7 +128,7 @@ class MainApp : DaggerApplication() {
|
||||||
if (config.isDev() && sp.getStringOrNull(app.aaps.core.utils.R.string.key_email_for_crash_report, null).isNullOrBlank())
|
if (config.isDev() && sp.getStringOrNull(app.aaps.core.utils.R.string.key_email_for_crash_report, null).isNullOrBlank())
|
||||||
notificationStore.add(Notification(Notification.IDENTIFICATION_NOT_SET, rh.get().gs(R.string.identification_not_set), Notification.INFO))
|
notificationStore.add(Notification(Notification.IDENTIFICATION_NOT_SET, rh.get().gs(R.string.identification_not_set), Notification.INFO))
|
||||||
// log version
|
// log version
|
||||||
disposable += repository.runTransaction(VersionChangeTransaction(BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE, gitRemote, commitHash)).subscribe()
|
disposable += repository.runTransaction(VersionChangeTransaction(config.VERSION_NAME, BuildConfig.VERSION_CODE, gitRemote, commitHash)).subscribe()
|
||||||
// log app start
|
// log app start
|
||||||
if (sp.getBoolean(app.aaps.plugins.sync.R.string.key_ns_log_app_started_event, config.APS))
|
if (sp.getBoolean(app.aaps.plugins.sync.R.string.key_ns_log_app_started_event, config.APS))
|
||||||
disposable += repository
|
disposable += repository
|
||||||
|
|
|
@ -47,8 +47,8 @@ class ConfigImpl @Inject constructor(
|
||||||
|
|
||||||
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile
|
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile
|
||||||
unfinishedMode = unfinishedModeSemaphore.exists() && unfinishedModeSemaphore.isFile
|
unfinishedMode = unfinishedModeSemaphore.exists() && unfinishedModeSemaphore.isFile
|
||||||
devBranch = BuildConfig.VERSION.contains("-") || BuildConfig.VERSION.matches(Regex(".*[a-zA-Z]+.*"))
|
devBranch = VERSION.contains("-") || VERSION.matches(Regex(".*[a-zA-Z]+.*"))
|
||||||
if (BuildConfig.VERSION.contains("-beta") || BuildConfig.VERSION.contains("-rc"))
|
if (VERSION.contains("-beta") || VERSION.contains("-rc"))
|
||||||
devBranch = false
|
devBranch = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
127
build.gradle
127
build.gradle
|
@ -1,127 +0,0 @@
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
||||||
|
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
||||||
|
|
||||||
buildscript {
|
|
||||||
ext {
|
|
||||||
kotlin_version = '1.9.10'
|
|
||||||
core_version = '1.12.0'
|
|
||||||
rxjava_version = '3.1.7'
|
|
||||||
rxandroid_version = '3.0.2'
|
|
||||||
rxkotlin_version = '3.0.1'
|
|
||||||
room_version = '2.5.2'
|
|
||||||
lifecycle_version = '2.6.2'
|
|
||||||
dagger_version = '2.48.1'
|
|
||||||
coroutines_version = '1.7.3'
|
|
||||||
activity_version = '1.8.0'
|
|
||||||
fragmentktx_version = '1.6.1'
|
|
||||||
ormLite_version = '4.46'
|
|
||||||
gson_version = '2.10.1'
|
|
||||||
nav_version = '2.7.4'
|
|
||||||
appcompat_version = '1.6.1'
|
|
||||||
material_version = '1.10.0'
|
|
||||||
gridlayout_version = '1.0.0'
|
|
||||||
constraintlayout_version = '2.1.4'
|
|
||||||
preferencektx_version = '1.2.1'
|
|
||||||
commonslang3_version = '3.13.0'
|
|
||||||
commonscodec_version = '1.16.0'
|
|
||||||
guava_version = '32.1.3-jre'
|
|
||||||
jodatime_version = '2.12.5'
|
|
||||||
work_version = '2.8.1'
|
|
||||||
tink_version = '1.10.0'
|
|
||||||
json_version = '20230618'
|
|
||||||
joda_version = '2.12.5'
|
|
||||||
swipe_version = '1.1.0'
|
|
||||||
|
|
||||||
junit_version = '4.13.2'
|
|
||||||
junit_jupiter_version = '5.10.0'
|
|
||||||
mockito_version = '5.6.0'
|
|
||||||
dexmaker_version = '1.2'
|
|
||||||
retrofit2_version = '2.9.0'
|
|
||||||
okhttp3_version = '4.12.0'
|
|
||||||
byteBuddy_version = '1.12.8'
|
|
||||||
|
|
||||||
androidx_junit_version = '1.1.5'
|
|
||||||
androidx_rules_version = '1.5.0'
|
|
||||||
|
|
||||||
rxandroidble_version = '1.12.1'
|
|
||||||
replayshare_version = '2.2.0'
|
|
||||||
|
|
||||||
wearable_version = '2.9.0'
|
|
||||||
play_services_wearable_version = '18.1.0'
|
|
||||||
play_services_location_version = '21.0.1'
|
|
||||||
play_services_measurement_version = '21.4.0'
|
|
||||||
|
|
||||||
kotlinx_datetime_version = '0.4.1'
|
|
||||||
kotlinx_serialization_version = '1.6.0'
|
|
||||||
|
|
||||||
caverock_androidsvg_version = '1.4'
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:8.1.2'
|
|
||||||
classpath 'com.google.gms:google-services:4.4.0'
|
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
|
||||||
// in the individual module build.gradle files
|
|
||||||
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
|
||||||
classpath "org.jacoco:org.jacoco.core:0.8.11"
|
|
||||||
classpath "com.vanniktech:gradle-dependency-graph-generator-plugin:0.8.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
// Test Gradle build, keep disabled under normal circumstances
|
|
||||||
// id "com.osacky.doctor" version "0.8.1"
|
|
||||||
id "org.jlleitschuh.gradle.ktlint" version "11.6.1"
|
|
||||||
// Aggregates and/or logs Jacoco test coverage to the Gradle build log
|
|
||||||
//id 'org.barfuin.gradle.jacocolog' version '3.1.0'
|
|
||||||
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url "https://maven.google.com" }
|
|
||||||
maven { url 'https://jitpack.io' }
|
|
||||||
}
|
|
||||||
tasks.withType(KotlinCompile).all {
|
|
||||||
kotlinOptions {
|
|
||||||
freeCompilerArgs = [
|
|
||||||
'-opt-in=kotlin.RequiresOptIn',
|
|
||||||
'-opt-in=kotlin.ExperimentalUnsignedTypes',
|
|
||||||
'-Xjvm-default=all' //Support @JvmDefault
|
|
||||||
]
|
|
||||||
jvmTarget = "11"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gradle.projectsEvaluated {
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'org.jlleitschuh.gradle.ktlint'
|
|
||||||
apply plugin: 'jacoco'
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup all al reports aggregation
|
|
||||||
apply from: 'jacoco_project.gradle'
|
|
||||||
|
|
||||||
task clean(type: Delete) {
|
|
||||||
delete rootProject.buildDir
|
|
||||||
}
|
|
||||||
|
|
||||||
subprojects {
|
|
||||||
tasks.withType(Test) {
|
|
||||||
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
|
|
||||||
}
|
|
||||||
}
|
|
62
build.gradle.kts
Normal file
62
build.gradle.kts
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath("com.android.tools.build:gradle:8.1.2")
|
||||||
|
classpath("com.google.gms:google-services:4.4.0")
|
||||||
|
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.9")
|
||||||
|
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
|
||||||
|
classpath(kotlin("gradle-plugin", version = Libs.Kotlin.kotlin))
|
||||||
|
classpath(kotlin("allopen", version = Libs.Kotlin.kotlin))
|
||||||
|
classpath(kotlin("serialization", version = Libs.Kotlin.kotlin))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
maven("https://maven.google.com")
|
||||||
|
maven("https://jitpack.io")
|
||||||
|
}
|
||||||
|
tasks.withType<KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
freeCompilerArgs = listOf(
|
||||||
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
|
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||||
|
"-Xjvm-default=all" //Support @JvmDefault
|
||||||
|
)
|
||||||
|
jvmTarget = "11"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gradle.projectsEvaluated {
|
||||||
|
tasks.withType<JavaCompile> {
|
||||||
|
val compilerArgs = options.compilerArgs
|
||||||
|
compilerArgs.add("-Xlint:deprecation")
|
||||||
|
compilerArgs.add("-Xlint:unchecked")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(plugin = "org.jlleitschuh.gradle.ktlint")
|
||||||
|
apply(plugin = "jacoco")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup all reports aggregation
|
||||||
|
apply(from = "jacoco_aggregation.gradle.kts")
|
||||||
|
|
||||||
|
tasks.register<Delete>("clean").configure {
|
||||||
|
delete(rootProject.buildDir)
|
||||||
|
}
|
22
buildSrc/build.gradle.kts
Normal file
22
buildSrc/build.gradle.kts
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
object KtsBuildVersions {
|
||||||
|
|
||||||
|
const val gradle = "8.1.2"
|
||||||
|
const val kotlin = "1.9.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
`kotlin-dsl-precompiled-script-plugins`
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("com.android.tools.build:gradle:${KtsBuildVersions.gradle}")
|
||||||
|
implementation(kotlin("gradle-plugin", version = KtsBuildVersions.kotlin))
|
||||||
|
implementation(kotlin("allopen", version = KtsBuildVersions.kotlin))
|
||||||
|
}
|
215
buildSrc/src/main/kotlin/Libs.kt
Normal file
215
buildSrc/src/main/kotlin/Libs.kt
Normal file
|
@ -0,0 +1,215 @@
|
||||||
|
@Suppress("SpellCheckingInspection")
|
||||||
|
object Libs {
|
||||||
|
|
||||||
|
object Kotlin {
|
||||||
|
|
||||||
|
const val kotlin = "1.9.10"
|
||||||
|
|
||||||
|
const val stdlibJdk8 = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin"
|
||||||
|
const val reflect = "org.jetbrains.kotlin:kotlin-reflect:$kotlin"
|
||||||
|
}
|
||||||
|
|
||||||
|
object KotlinX {
|
||||||
|
|
||||||
|
private const val serialization = "1.6.0"
|
||||||
|
private const val coroutinesVersion = "1.7.3"
|
||||||
|
|
||||||
|
const val serializationJson = "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization"
|
||||||
|
const val serializationProtobuf = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf:$serialization"
|
||||||
|
const val serializationCore = "org.jetbrains.kotlinx:kotlinx-serialization-core:$serialization"
|
||||||
|
const val coroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
|
||||||
|
const val coroutinesAndroid = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
|
||||||
|
const val coroutinesRx3 = "org.jetbrains.kotlinx:kotlinx-coroutines-rx3:$coroutinesVersion"
|
||||||
|
const val coroutinesGuava = "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$coroutinesVersion"
|
||||||
|
const val coroutinesPlayServices = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion"
|
||||||
|
const val coroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion"
|
||||||
|
const val datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
object AndroidX {
|
||||||
|
|
||||||
|
const val core = "androidx.core:core-ktx:1.12.0"
|
||||||
|
const val appCompat = "androidx.appcompat:appcompat:1.6.1"
|
||||||
|
const val activity = "androidx.activity:activity-ktx:1.8.0"
|
||||||
|
const val preference = "androidx.preference:preference-ktx:1.2.1"
|
||||||
|
const val constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||||
|
const val swipeRefreshLayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||||
|
const val gridLayout = "androidx.gridlayout:gridlayout:1.0.0"
|
||||||
|
const val browser = "androidx.browser:browser:1.6.0"
|
||||||
|
const val lifecycleViewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
|
||||||
|
const val fragment = "androidx.fragment:fragment-ktx:1.6.1"
|
||||||
|
const val navigationFragment = "androidx.navigation:navigation-fragment-ktx:2.7.4"
|
||||||
|
const val legacySupport = "androidx.legacy:legacy-support-v13:1.0.0"
|
||||||
|
|
||||||
|
object Work {
|
||||||
|
|
||||||
|
private const val workVersion = "2.8.1"
|
||||||
|
const val runtimeKtx = "androidx.work:work-runtime-ktx:$workVersion"
|
||||||
|
const val testing = "androidx.work:work-testing:$workVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Test {
|
||||||
|
|
||||||
|
const val espressoCore = "androidx.test.espresso:espresso-core:3.5.1"
|
||||||
|
const val extKtx = "androidx.test.ext:junit-ktx:1.1.5"
|
||||||
|
const val rules = "androidx.test:rules:1.5.0"
|
||||||
|
const val uiAutomator = "androidx.test.uiautomator:uiautomator:2.2.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Room {
|
||||||
|
|
||||||
|
private const val roomVersion = "2.5.2"
|
||||||
|
|
||||||
|
const val room = "androidx.room:room-ktx:$roomVersion"
|
||||||
|
const val compiler = "androidx.room:room-compiler:$roomVersion"
|
||||||
|
const val runtime = "androidx.room:room-runtime:$roomVersion"
|
||||||
|
const val rxJava3 = "androidx.room:room-rxjava3:$roomVersion"
|
||||||
|
const val testing = "androidx.room:room-testing:$roomVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Wear {
|
||||||
|
|
||||||
|
const val wear = "androidx.wear:wear:1.3.0"
|
||||||
|
const val tiles = "androidx.wear.tiles:tiles:1.2.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
const val biometric = "androidx.biometric:biometric:1.1.0"
|
||||||
|
const val media3 = "androidx.media3:media3-common:1.1.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Google {
|
||||||
|
|
||||||
|
object Android {
|
||||||
|
object PlayServices {
|
||||||
|
|
||||||
|
const val measurementApi = "com.google.android.gms:play-services-measurement-api:21.4.0"
|
||||||
|
const val wearable = "com.google.android.gms:play-services-wearable:18.1.0"
|
||||||
|
const val location = "com.google.android.gms:play-services-location:21.0.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Wearable {
|
||||||
|
|
||||||
|
const val wearable = "com.google.android.wearable:wearable:2.9.0"
|
||||||
|
const val wearableSupport = "com.google.android.support:wearable:2.9.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
const val material = "com.google.android.material:material:1.10.0"
|
||||||
|
const val flexbox = "com.google.android.flexbox:flexbox:3.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Firebase {
|
||||||
|
|
||||||
|
const val firebaseBom = "com.google.firebase:firebase-bom:32.4.0"
|
||||||
|
const val analytics = "com.google.firebase:firebase-analytics-ktx"
|
||||||
|
const val crashlytics = "com.google.firebase:firebase-crashlytics-ktx"
|
||||||
|
const val messaging = "com.google.firebase:firebase-messaging-ktx"
|
||||||
|
const val auth = "com.google.firebase:firebase-auth-ktx"
|
||||||
|
const val database = "com.google.firebase:firebase-database-ktx"
|
||||||
|
}
|
||||||
|
|
||||||
|
const val truth = "com.google.truth:truth:1.1.5"
|
||||||
|
const val gson = "com.google.code.gson:gson:2.10.1"
|
||||||
|
const val guava = "com.google.guava:guava:32.1.3-jre"
|
||||||
|
const val tinkAndroid = "com.google.crypto.tink:tink-android:1.10.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Dagger {
|
||||||
|
|
||||||
|
private const val version = "2.48.1"
|
||||||
|
const val dagger = "com.google.dagger:dagger:$version"
|
||||||
|
const val android = "com.google.dagger:dagger-android:$version"
|
||||||
|
const val androidProcessor = "com.google.dagger:dagger-android-processor:$version"
|
||||||
|
const val androidSupport = "com.google.dagger:dagger-android-support:$version"
|
||||||
|
const val compiler = "com.google.dagger:dagger-compiler:$version"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Rx {
|
||||||
|
|
||||||
|
const val rxDogTag = "com.uber.rxdogtag2:rxdogtag:2.0.2"
|
||||||
|
const val rxJava = "io.reactivex.rxjava3:rxjava:3.1.7"
|
||||||
|
const val rxKotlin = "io.reactivex.rxjava3:rxkotlin:3.0.1"
|
||||||
|
const val rxAndroid = "io.reactivex.rxjava3:rxandroid:3.0.2"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Apache {
|
||||||
|
|
||||||
|
const val commonsLang3 = "org.apache.commons:commons-lang3:3.13.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Logging {
|
||||||
|
|
||||||
|
const val slf4jApi = "org.slf4j:slf4j-api:1.7.36" // 2.0.x breaks logging. Code change needed
|
||||||
|
const val logbackAndroid = "com.github.tony19:logback-android:2.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
object JUnit {
|
||||||
|
|
||||||
|
private const val junitVersion = "5.10.0"
|
||||||
|
|
||||||
|
const val jupiter = "org.junit.jupiter:junit-jupiter:$junitVersion"
|
||||||
|
const val jupiterApi = "org.junit.jupiter:junit-jupiter-api:$junitVersion"
|
||||||
|
const val jupiterEngine = "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Mockito {
|
||||||
|
|
||||||
|
const val jupiter = "org.mockito:mockito-junit-jupiter:5.6.0"
|
||||||
|
const val kotlin = "org.mockito.kotlin:mockito-kotlin:5.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Squareup {
|
||||||
|
object Retrofit2 {
|
||||||
|
|
||||||
|
private const val retrofitVersion = "2.9.0"
|
||||||
|
|
||||||
|
const val retrofit = "com.squareup.retrofit2:retrofit:$retrofitVersion"
|
||||||
|
const val adapterRxJava3 = "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion"
|
||||||
|
const val converterGson = "com.squareup.retrofit2:converter-gson:$retrofitVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
object Okhttp3 {
|
||||||
|
|
||||||
|
private const val okhttpVersion = "4.12.0"
|
||||||
|
|
||||||
|
const val okhttp = "com.squareup.okhttp3:okhttp:$okhttpVersion"
|
||||||
|
const val loggingInterceptor = "com.squareup.okhttp3:logging-interceptor:$okhttpVersion"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object Mozilla {
|
||||||
|
|
||||||
|
const val rhino = "org.mozilla:rhino:1.7.14"
|
||||||
|
}
|
||||||
|
|
||||||
|
const val spongycastleCore = "com.madgag.spongycastle:core:1.58.0.0"
|
||||||
|
const val androidSvg = "com.caverock:androidsvg:1.4"
|
||||||
|
const val jodaTimeAndroid = "net.danlew:android.joda:2.12.5"
|
||||||
|
const val jodaTime = "joda-time:joda-time:2.12.5"
|
||||||
|
const val json = "org.json:json:20230618"
|
||||||
|
const val jsonAssert = "org.skyscreamer:jsonassert:1.5.0"
|
||||||
|
const val rootBeer = "com.scottyab:rootbeer-lib:0.1.0"
|
||||||
|
const val javaOtp = "com.eatthepath:java-otp:0.4.0"
|
||||||
|
const val qrGen = "com.github.kenglxn.QRGen:android:3.0.1"
|
||||||
|
const val socketIo = "io.socket:socket.io-client:2.1.0"
|
||||||
|
const val kotlinTestRunner = "io.kotlintest:kotlintest-runner-junit5:3.4.2"
|
||||||
|
const val rxandroidBle = "com.polidea.rxandroidble3:rxandroidble:1.17.2"
|
||||||
|
const val rx3ReplayingShare = "com.jakewharton.rx3:replaying-share:3.0.0"
|
||||||
|
const val commonCodecs = "commons-codec:commons-codec:1.16.0"
|
||||||
|
const val kulid = "com.github.guepardoapps:kulid:2.0.0.0"
|
||||||
|
const val xstream = "com.thoughtworks.xstream:xstream:1.4.20"
|
||||||
|
|
||||||
|
const val ormLite = "4.46"
|
||||||
|
|
||||||
|
const val junit = "4.13.2"
|
||||||
|
const val mockito = "5.6.0"
|
||||||
|
const val dexmaker = "1.2"
|
||||||
|
const val byteBuddy = "1.12.8"
|
||||||
|
|
||||||
|
const val androidx_junit = "1.1.5"
|
||||||
|
const val androidx_rules = "1.5.0"
|
||||||
|
|
||||||
|
const val kotlinx_datetime = "0.4.1"
|
||||||
|
const val kotlinx_serialization = "1.6.0"
|
||||||
|
|
||||||
|
const val caverock_androidsvg = "1.4"
|
||||||
|
}
|
18
buildSrc/src/main/kotlin/Versions.kt
Normal file
18
buildSrc/src/main/kotlin/Versions.kt
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import org.gradle.api.JavaVersion
|
||||||
|
|
||||||
|
object Versions {
|
||||||
|
|
||||||
|
const val appVersion = "3.2.0.1-dev"
|
||||||
|
const val versionCode = 1500
|
||||||
|
|
||||||
|
const val ndkVersion = "21.1.6352462"
|
||||||
|
|
||||||
|
const val compileSdk = 34
|
||||||
|
const val minSdk = 28
|
||||||
|
const val targetSdk = 28
|
||||||
|
const val wearMinSdk = 26
|
||||||
|
const val wearTargetSdk = 29
|
||||||
|
|
||||||
|
val javaVersion = JavaVersion.VERSION_11
|
||||||
|
const val jacoco = "0.8.11"
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-allopen")
|
||||||
|
}
|
||||||
|
|
||||||
|
allOpen {
|
||||||
|
// allows mocking for classes w/o directly opening them for release builds
|
||||||
|
annotation("app.aaps.annotations.OpenForTesting")
|
||||||
|
}
|
41
buildSrc/src/main/kotlin/android-app-dependencies.gradle.kts
Normal file
41
buildSrc/src/main/kotlin/android-app-dependencies.gradle.kts
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("kotlin-android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk = Versions.compileSdk
|
||||||
|
defaultConfig {
|
||||||
|
multiDexEnabled = true
|
||||||
|
versionCode = Versions.versionCode
|
||||||
|
version = Versions.appVersion
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
named("release") {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
setProguardFiles(listOf(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"))
|
||||||
|
}
|
||||||
|
named("debug") {
|
||||||
|
enableUnitTestCoverage = true
|
||||||
|
enableAndroidTestCoverage = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = Versions.javaVersion
|
||||||
|
targetCompatibility = Versions.javaVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
lint {
|
||||||
|
checkReleaseBuilds = false
|
||||||
|
disable += "MissingTranslation"
|
||||||
|
disable += "ExtraTranslation"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk = Versions.compileSdk
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = Versions.minSdk
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
targetSdk = Versions.targetSdk
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
named("release") {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
setProguardFiles(listOf(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"))
|
||||||
|
}
|
||||||
|
named("debug") {
|
||||||
|
enableUnitTestCoverage = true
|
||||||
|
enableAndroidTestCoverage = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
named("main") {
|
||||||
|
jniLibs.srcDirs(listOf("src/main/jniLibs"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = Versions.javaVersion
|
||||||
|
targetCompatibility = Versions.javaVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
lint {
|
||||||
|
checkReleaseBuilds = false
|
||||||
|
disable += "MissingTranslation"
|
||||||
|
disable += "ExtraTranslation"
|
||||||
|
}
|
||||||
|
|
||||||
|
flavorDimensions.add("standard")
|
||||||
|
productFlavors {
|
||||||
|
create("full") {
|
||||||
|
isDefault = true
|
||||||
|
dimension = "standard"
|
||||||
|
}
|
||||||
|
create("pumpcontrol") {
|
||||||
|
dimension = "standard"
|
||||||
|
}
|
||||||
|
create("aapsclient") {
|
||||||
|
dimension = "standard"
|
||||||
|
}
|
||||||
|
create("aapsclient2") {
|
||||||
|
dimension = "standard"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
// disable for modules here
|
||||||
|
buildConfig = false
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
}
|
207
buildSrc/src/main/kotlin/jacoco-app-dependencies.gradle.kts
Normal file
207
buildSrc/src/main/kotlin/jacoco-app-dependencies.gradle.kts
Normal file
|
@ -0,0 +1,207 @@
|
||||||
|
import groovy.xml.XmlSlurper
|
||||||
|
import groovy.xml.slurpersupport.NodeChild
|
||||||
|
import java.io.File
|
||||||
|
import java.util.Locale
|
||||||
|
import org.gradle.api.GradleException
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
import org.gradle.kotlin.dsl.extra
|
||||||
|
import org.gradle.kotlin.dsl.register
|
||||||
|
import org.gradle.testing.jacoco.tasks.JacocoReport
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("jacoco")
|
||||||
|
}
|
||||||
|
|
||||||
|
private val limits = mutableMapOf(
|
||||||
|
"instruction" to 0.0,
|
||||||
|
"branch" to 0.0,
|
||||||
|
"line" to 0.0,
|
||||||
|
"complexity" to 0.0,
|
||||||
|
"method" to 0.0,
|
||||||
|
"class" to 0.0
|
||||||
|
)
|
||||||
|
|
||||||
|
extra.set("limits", limits)
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
"implementation"("org.jacoco:org.jacoco.core:${Versions.jacoco}")
|
||||||
|
}
|
||||||
|
|
||||||
|
project.afterEvaluate {
|
||||||
|
val buildTypes = android.buildTypes.map { type -> type.name }
|
||||||
|
var productFlavors = android.productFlavors.map { flavor -> flavor.name }
|
||||||
|
|
||||||
|
if (productFlavors.isEmpty()) {
|
||||||
|
productFlavors = productFlavors + ""
|
||||||
|
}
|
||||||
|
|
||||||
|
productFlavors.forEach { flavorName ->
|
||||||
|
buildTypes.forEach { buildTypeName ->
|
||||||
|
val sourceName: String
|
||||||
|
val sourcePath: String
|
||||||
|
|
||||||
|
if (flavorName.isEmpty()) {
|
||||||
|
sourceName = buildTypeName
|
||||||
|
sourcePath = buildTypeName
|
||||||
|
} else {
|
||||||
|
sourceName = "${flavorName}${buildTypeName.replaceFirstChar(Char::titlecase)}"
|
||||||
|
sourcePath = "${flavorName}/${buildTypeName}"
|
||||||
|
}
|
||||||
|
|
||||||
|
val testTaskName = "test${sourceName.replaceFirstChar(Char::titlecase)}UnitTest"
|
||||||
|
//println("Task -> $testTaskName")
|
||||||
|
|
||||||
|
registerCodeCoverageTask(
|
||||||
|
testTaskName = testTaskName,
|
||||||
|
sourceName = sourceName,
|
||||||
|
sourcePath = sourcePath,
|
||||||
|
flavorName = flavorName,
|
||||||
|
buildTypeName = buildTypeName
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val excludedFiles = mutableSetOf(
|
||||||
|
// data binding
|
||||||
|
"android/databinding/**/*.class",
|
||||||
|
"**/android/databinding/*Binding.class",
|
||||||
|
"**/android/databinding/*",
|
||||||
|
"**/androidx/databinding/*",
|
||||||
|
"**/BR.*",
|
||||||
|
// android
|
||||||
|
"**/R.class",
|
||||||
|
"**/R$*.class",
|
||||||
|
"**/BuildConfig.*",
|
||||||
|
"**/Manifest*.*",
|
||||||
|
"**/*Test*.*",
|
||||||
|
"android/**/*.*",
|
||||||
|
// kotlin
|
||||||
|
"**/*MapperImpl*.*",
|
||||||
|
"**/*\$ViewInjector*.*",
|
||||||
|
"**/*\$ViewBinder*.*",
|
||||||
|
"**/BuildConfig.*",
|
||||||
|
"**/*Component*.*",
|
||||||
|
"**/*BR*.*",
|
||||||
|
"**/Manifest*.*",
|
||||||
|
"**/*\$Lambda\$*.*",
|
||||||
|
"**/*Companion*.*",
|
||||||
|
"**/*Module*.*",
|
||||||
|
"**/*Dagger*.*",
|
||||||
|
"**/*Hilt*.*",
|
||||||
|
"**/*MembersInjector*.*",
|
||||||
|
"**/*_MembersInjector.class",
|
||||||
|
"**/*_Factory*.*",
|
||||||
|
"**/*_Provide*Factory*.*",
|
||||||
|
"**/*Extensions*.*",
|
||||||
|
// sealed and data classes
|
||||||
|
"**/*\$Result.*",
|
||||||
|
"**/*\$Result\$*.*",
|
||||||
|
// adapters generated by moshi
|
||||||
|
"**/*JsonAdapter.*"
|
||||||
|
)
|
||||||
|
|
||||||
|
fun Project.registerCodeCoverageTask(
|
||||||
|
testTaskName: String,
|
||||||
|
sourceName: String,
|
||||||
|
sourcePath: String,
|
||||||
|
flavorName: String,
|
||||||
|
buildTypeName: String
|
||||||
|
) {
|
||||||
|
tasks.register<JacocoReport>("${testTaskName}Coverage") {
|
||||||
|
dependsOn(testTaskName)
|
||||||
|
group = "Reporting"
|
||||||
|
description = "Generate Jacoco coverage reports on the ${sourceName.replaceFirstChar(Char::titlecase)} build."
|
||||||
|
|
||||||
|
val javaDirectories = fileTree(
|
||||||
|
"${project.buildDir}/intermediates/classes/${sourcePath}"
|
||||||
|
) { exclude(excludedFiles) }
|
||||||
|
|
||||||
|
val kotlinDirectories = fileTree(
|
||||||
|
"${project.buildDir}/tmp/kotlin-classes/${sourcePath}"
|
||||||
|
) { exclude(excludedFiles) }
|
||||||
|
|
||||||
|
val coverageSrcDirectories = listOf(
|
||||||
|
"src/main/java",
|
||||||
|
"src/main/kotlin",
|
||||||
|
"src/$flavorName/java",
|
||||||
|
"src/$flavorName/kotlin",
|
||||||
|
"src/$buildTypeName/java",
|
||||||
|
"src/$buildTypeName/kotlin"
|
||||||
|
)
|
||||||
|
|
||||||
|
classDirectories.setFrom(files(javaDirectories, kotlinDirectories))
|
||||||
|
additionalClassDirs.setFrom(files(coverageSrcDirectories))
|
||||||
|
sourceDirectories.setFrom(files(coverageSrcDirectories))
|
||||||
|
executionData.setFrom(
|
||||||
|
files("${project.buildDir}/jacoco/${testTaskName}.exec")
|
||||||
|
)
|
||||||
|
|
||||||
|
reports {
|
||||||
|
xml.required.set(true)
|
||||||
|
html.required.set(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
doLast {
|
||||||
|
jacocoTestReport("${testTaskName}Coverage")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
fun Project.jacocoTestReport(testTaskName: String) {
|
||||||
|
val reportsDirectory = jacoco.reportsDirectory.asFile.get()
|
||||||
|
val report = file("$reportsDirectory/${testTaskName}/${testTaskName}.xml")
|
||||||
|
|
||||||
|
logger.lifecycle("Checking coverage results: $report")
|
||||||
|
|
||||||
|
val metrics = report.extractTestsCoveredByType()
|
||||||
|
val limits = project.extra["limits"] as Map<String, Double>
|
||||||
|
|
||||||
|
val failures = metrics.filter { entry ->
|
||||||
|
entry.value < limits[entry.key]!!
|
||||||
|
}.map { entry ->
|
||||||
|
"- ${entry.key} coverage rate is: ${entry.value}%, minimum is ${limits[entry.key]}%"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failures.isNotEmpty()) {
|
||||||
|
logger.quiet("------------------ Code Coverage Failed -----------------------")
|
||||||
|
failures.forEach { logger.quiet(it) }
|
||||||
|
logger.quiet("---------------------------------------------------------------")
|
||||||
|
throw GradleException("Code coverage failed")
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.quiet("------------------ Code Coverage Success -----------------------")
|
||||||
|
metrics.forEach { entry ->
|
||||||
|
logger.quiet("- ${entry.key} coverage rate is: ${entry.value}%")
|
||||||
|
}
|
||||||
|
logger.quiet("---------------------------------------------------------------")
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
fun File.extractTestsCoveredByType(): Map<String, Double> {
|
||||||
|
val xmlReader = XmlSlurper().apply {
|
||||||
|
setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false)
|
||||||
|
setFeature("http://apache.org/xml/features/disallow-doctype-decl", false)
|
||||||
|
}
|
||||||
|
|
||||||
|
val counterNodes: List<NodeChild> = xmlReader
|
||||||
|
.parse(this).parent()
|
||||||
|
.children()
|
||||||
|
.filter {
|
||||||
|
(it as NodeChild).name() == "counter"
|
||||||
|
} as List<NodeChild>
|
||||||
|
|
||||||
|
return counterNodes.associate { nodeChild ->
|
||||||
|
val type = nodeChild.attributes()["type"].toString().lowercase(Locale.ENGLISH)
|
||||||
|
|
||||||
|
val covered = nodeChild.attributes()["covered"].toString().toDouble()
|
||||||
|
val missed = nodeChild.attributes()["missed"].toString().toDouble()
|
||||||
|
val percentage = ((covered / (covered + missed)) * 10000.0).roundToInt() / 100.0
|
||||||
|
|
||||||
|
Pair(type, percentage)
|
||||||
|
}
|
||||||
|
}
|
207
buildSrc/src/main/kotlin/jacoco-module-dependencies.gradle.kts
Normal file
207
buildSrc/src/main/kotlin/jacoco-module-dependencies.gradle.kts
Normal file
|
@ -0,0 +1,207 @@
|
||||||
|
import groovy.xml.XmlSlurper
|
||||||
|
import groovy.xml.slurpersupport.NodeChild
|
||||||
|
import java.io.File
|
||||||
|
import java.util.Locale
|
||||||
|
import org.gradle.api.GradleException
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
import org.gradle.kotlin.dsl.extra
|
||||||
|
import org.gradle.kotlin.dsl.register
|
||||||
|
import org.gradle.testing.jacoco.tasks.JacocoReport
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("jacoco")
|
||||||
|
}
|
||||||
|
|
||||||
|
private val limits = mutableMapOf(
|
||||||
|
"instruction" to 0.0,
|
||||||
|
"branch" to 0.0,
|
||||||
|
"line" to 0.0,
|
||||||
|
"complexity" to 0.0,
|
||||||
|
"method" to 0.0,
|
||||||
|
"class" to 0.0
|
||||||
|
)
|
||||||
|
|
||||||
|
extra.set("limits", limits)
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
"implementation"("org.jacoco:org.jacoco.core:${Versions.jacoco}")
|
||||||
|
}
|
||||||
|
|
||||||
|
project.afterEvaluate {
|
||||||
|
val buildTypes = android.buildTypes.map { type -> type.name }
|
||||||
|
var productFlavors = android.productFlavors.map { flavor -> flavor.name }
|
||||||
|
|
||||||
|
if (productFlavors.isEmpty()) {
|
||||||
|
productFlavors = productFlavors + ""
|
||||||
|
}
|
||||||
|
|
||||||
|
productFlavors.forEach { flavorName ->
|
||||||
|
buildTypes.forEach { buildTypeName ->
|
||||||
|
val sourceName: String
|
||||||
|
val sourcePath: String
|
||||||
|
|
||||||
|
if (flavorName.isEmpty()) {
|
||||||
|
sourceName = buildTypeName
|
||||||
|
sourcePath = buildTypeName
|
||||||
|
} else {
|
||||||
|
sourceName = "${flavorName}${buildTypeName.replaceFirstChar(Char::titlecase)}"
|
||||||
|
sourcePath = "${flavorName}/${buildTypeName}"
|
||||||
|
}
|
||||||
|
|
||||||
|
val testTaskName = "test${sourceName.replaceFirstChar(Char::titlecase)}UnitTest"
|
||||||
|
//println("Task -> $testTaskName")
|
||||||
|
|
||||||
|
registerCodeCoverageTask(
|
||||||
|
testTaskName = testTaskName,
|
||||||
|
sourceName = sourceName,
|
||||||
|
sourcePath = sourcePath,
|
||||||
|
flavorName = flavorName,
|
||||||
|
buildTypeName = buildTypeName
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val excludedFiles = mutableSetOf(
|
||||||
|
// data binding
|
||||||
|
"android/databinding/**/*.class",
|
||||||
|
"**/android/databinding/*Binding.class",
|
||||||
|
"**/android/databinding/*",
|
||||||
|
"**/androidx/databinding/*",
|
||||||
|
"**/BR.*",
|
||||||
|
// android
|
||||||
|
"**/R.class",
|
||||||
|
"**/R$*.class",
|
||||||
|
"**/BuildConfig.*",
|
||||||
|
"**/Manifest*.*",
|
||||||
|
"**/*Test*.*",
|
||||||
|
"android/**/*.*",
|
||||||
|
// kotlin
|
||||||
|
"**/*MapperImpl*.*",
|
||||||
|
"**/*\$ViewInjector*.*",
|
||||||
|
"**/*\$ViewBinder*.*",
|
||||||
|
"**/BuildConfig.*",
|
||||||
|
"**/*Component*.*",
|
||||||
|
"**/*BR*.*",
|
||||||
|
"**/Manifest*.*",
|
||||||
|
"**/*\$Lambda\$*.*",
|
||||||
|
"**/*Companion*.*",
|
||||||
|
"**/*Module*.*",
|
||||||
|
"**/*Dagger*.*",
|
||||||
|
"**/*Hilt*.*",
|
||||||
|
"**/*MembersInjector*.*",
|
||||||
|
"**/*_MembersInjector.class",
|
||||||
|
"**/*_Factory*.*",
|
||||||
|
"**/*_Provide*Factory*.*",
|
||||||
|
"**/*Extensions*.*",
|
||||||
|
// sealed and data classes
|
||||||
|
"**/*\$Result.*",
|
||||||
|
"**/*\$Result\$*.*",
|
||||||
|
// adapters generated by moshi
|
||||||
|
"**/*JsonAdapter.*"
|
||||||
|
)
|
||||||
|
|
||||||
|
fun Project.registerCodeCoverageTask(
|
||||||
|
testTaskName: String,
|
||||||
|
sourceName: String,
|
||||||
|
sourcePath: String,
|
||||||
|
flavorName: String,
|
||||||
|
buildTypeName: String
|
||||||
|
) {
|
||||||
|
tasks.register<JacocoReport>("${testTaskName}Coverage") {
|
||||||
|
dependsOn(testTaskName)
|
||||||
|
group = "Reporting"
|
||||||
|
description = "Generate Jacoco coverage reports on the ${sourceName.replaceFirstChar(Char::titlecase)} build."
|
||||||
|
|
||||||
|
val javaDirectories = fileTree(
|
||||||
|
"${project.buildDir}/intermediates/classes/${sourcePath}"
|
||||||
|
) { exclude(excludedFiles) }
|
||||||
|
|
||||||
|
val kotlinDirectories = fileTree(
|
||||||
|
"${project.buildDir}/tmp/kotlin-classes/${sourcePath}"
|
||||||
|
) { exclude(excludedFiles) }
|
||||||
|
|
||||||
|
val coverageSrcDirectories = listOf(
|
||||||
|
"src/main/java",
|
||||||
|
"src/main/kotlin",
|
||||||
|
"src/$flavorName/java",
|
||||||
|
"src/$flavorName/kotlin",
|
||||||
|
"src/$buildTypeName/java",
|
||||||
|
"src/$buildTypeName/kotlin"
|
||||||
|
)
|
||||||
|
|
||||||
|
classDirectories.setFrom(files(javaDirectories, kotlinDirectories))
|
||||||
|
additionalClassDirs.setFrom(files(coverageSrcDirectories))
|
||||||
|
sourceDirectories.setFrom(files(coverageSrcDirectories))
|
||||||
|
executionData.setFrom(
|
||||||
|
files("${project.buildDir}/jacoco/${testTaskName}.exec")
|
||||||
|
)
|
||||||
|
|
||||||
|
reports {
|
||||||
|
xml.required.set(true)
|
||||||
|
html.required.set(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
doLast {
|
||||||
|
jacocoTestReport("${testTaskName}Coverage")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
fun Project.jacocoTestReport(testTaskName: String) {
|
||||||
|
val reportsDirectory = jacoco.reportsDirectory.asFile.get()
|
||||||
|
val report = file("$reportsDirectory/${testTaskName}/${testTaskName}.xml")
|
||||||
|
|
||||||
|
logger.lifecycle("Checking coverage results: $report")
|
||||||
|
|
||||||
|
val metrics = report.extractTestsCoveredByType()
|
||||||
|
val limits = project.extra["limits"] as Map<String, Double>
|
||||||
|
|
||||||
|
val failures = metrics.filter { entry ->
|
||||||
|
entry.value < limits[entry.key]!!
|
||||||
|
}.map { entry ->
|
||||||
|
"- ${entry.key} coverage rate is: ${entry.value}%, minimum is ${limits[entry.key]}%"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failures.isNotEmpty()) {
|
||||||
|
logger.quiet("------------------ Code Coverage Failed -----------------------")
|
||||||
|
failures.forEach { logger.quiet(it) }
|
||||||
|
logger.quiet("---------------------------------------------------------------")
|
||||||
|
throw GradleException("Code coverage failed")
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.quiet("------------------ Code Coverage Success -----------------------")
|
||||||
|
metrics.forEach { entry ->
|
||||||
|
logger.quiet("- ${entry.key} coverage rate is: ${entry.value}%")
|
||||||
|
}
|
||||||
|
logger.quiet("---------------------------------------------------------------")
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
fun File.extractTestsCoveredByType(): Map<String, Double> {
|
||||||
|
val xmlReader = XmlSlurper().apply {
|
||||||
|
setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false)
|
||||||
|
setFeature("http://apache.org/xml/features/disallow-doctype-decl", false)
|
||||||
|
}
|
||||||
|
|
||||||
|
val counterNodes: List<NodeChild> = xmlReader
|
||||||
|
.parse(this).parent()
|
||||||
|
.children()
|
||||||
|
.filter {
|
||||||
|
(it as NodeChild).name() == "counter"
|
||||||
|
} as List<NodeChild>
|
||||||
|
|
||||||
|
return counterNodes.associate { nodeChild ->
|
||||||
|
val type = nodeChild.attributes()["type"].toString().lowercase(Locale.ENGLISH)
|
||||||
|
|
||||||
|
val covered = nodeChild.attributes()["covered"].toString().toDouble()
|
||||||
|
val missed = nodeChild.attributes()["missed"].toString().toDouble()
|
||||||
|
val percentage = ((covered / (covered + missed)) * 10000.0).roundToInt() / 100.0
|
||||||
|
|
||||||
|
Pair(type, percentage)
|
||||||
|
}
|
||||||
|
}
|
62
buildSrc/src/main/kotlin/test-app-dependencies.gradle.kts
Normal file
62
buildSrc/src/main/kotlin/test-app-dependencies.gradle.kts
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||||
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("kotlin-android")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
testImplementation(kotlin("test"))
|
||||||
|
testImplementation(Libs.JUnit.jupiter)
|
||||||
|
testImplementation(Libs.JUnit.jupiterApi)
|
||||||
|
testImplementation(Libs.json)
|
||||||
|
testImplementation(Libs.Mockito.jupiter)
|
||||||
|
testImplementation(Libs.Mockito.kotlin)
|
||||||
|
testImplementation(Libs.jodaTime)
|
||||||
|
testImplementation(Libs.Google.truth)
|
||||||
|
testImplementation(Libs.jsonAssert)
|
||||||
|
|
||||||
|
androidTestImplementation(Libs.AndroidX.Test.espressoCore)
|
||||||
|
androidTestImplementation(Libs.AndroidX.Test.extKtx)
|
||||||
|
androidTestImplementation(Libs.AndroidX.Test.rules)
|
||||||
|
androidTestImplementation(Libs.AndroidX.Test.uiAutomator)
|
||||||
|
androidTestImplementation(Libs.Google.truth)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Test> {
|
||||||
|
// use to display stdout in travis
|
||||||
|
testLogging {
|
||||||
|
// set options for log level LIFECYCLE
|
||||||
|
events = setOf(
|
||||||
|
TestLogEvent.FAILED,
|
||||||
|
TestLogEvent.STARTED,
|
||||||
|
TestLogEvent.SKIPPED,
|
||||||
|
TestLogEvent.STANDARD_OUT
|
||||||
|
)
|
||||||
|
exceptionFormat = TestExceptionFormat.FULL
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Test>().configureEach {
|
||||||
|
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||||
|
forkEvery = 20
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
testOptions {
|
||||||
|
unitTests {
|
||||||
|
isReturnDefaultValues = true
|
||||||
|
isIncludeAndroidResources = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
packaging {
|
||||||
|
resources {
|
||||||
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||||
|
excludes += "META-INF/COPYRIGHT"
|
||||||
|
excludes += "META-INF/LICENSE.md"
|
||||||
|
excludes += "META-INF/LICENSE-notice.md"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
62
buildSrc/src/main/kotlin/test-module-dependencies.gradle.kts
Normal file
62
buildSrc/src/main/kotlin/test-module-dependencies.gradle.kts
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||||
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
testImplementation(kotlin("test"))
|
||||||
|
testImplementation(Libs.JUnit.jupiter)
|
||||||
|
testImplementation(Libs.JUnit.jupiterApi)
|
||||||
|
testImplementation(Libs.json)
|
||||||
|
testImplementation(Libs.Mockito.jupiter)
|
||||||
|
testImplementation(Libs.Mockito.kotlin)
|
||||||
|
testImplementation(Libs.jodaTime)
|
||||||
|
testImplementation(Libs.Google.truth)
|
||||||
|
testImplementation(Libs.jsonAssert)
|
||||||
|
|
||||||
|
androidTestImplementation(Libs.AndroidX.Test.espressoCore)
|
||||||
|
androidTestImplementation(Libs.AndroidX.Test.extKtx)
|
||||||
|
androidTestImplementation(Libs.AndroidX.Test.rules)
|
||||||
|
androidTestImplementation(Libs.Google.truth)
|
||||||
|
androidTestImplementation(Libs.AndroidX.Test.uiAutomator)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Test> {
|
||||||
|
// use to display stdout in travis
|
||||||
|
testLogging {
|
||||||
|
// set options for log level LIFECYCLE
|
||||||
|
events = setOf(
|
||||||
|
TestLogEvent.FAILED,
|
||||||
|
TestLogEvent.STARTED,
|
||||||
|
TestLogEvent.SKIPPED,
|
||||||
|
TestLogEvent.STANDARD_OUT
|
||||||
|
)
|
||||||
|
exceptionFormat = TestExceptionFormat.FULL
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Test>().configureEach {
|
||||||
|
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||||
|
forkEvery = 20
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
testOptions {
|
||||||
|
unitTests {
|
||||||
|
isReturnDefaultValues = true
|
||||||
|
isIncludeAndroidResources = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
packaging {
|
||||||
|
resources {
|
||||||
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||||
|
excludes += "META-INF/COPYRIGHT"
|
||||||
|
excludes += "META-INF/LICENSE.md"
|
||||||
|
excludes += "META-INF/LICENSE-notice.md"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,17 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
|
|
||||||
namespace 'com.jjoe64.graphview'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api "androidx.core:core-ktx:$core_version"
|
|
||||||
}
|
|
15
core/graphview/build.gradle.kts
Normal file
15
core/graphview/build.gradle.kts
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
android {
|
||||||
|
|
||||||
|
namespace = "com.jjoe64.graphview"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api(Libs.AndroidX.core)
|
||||||
|
}
|
|
@ -1,54 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
id 'kotlin-parcelize'
|
|
||||||
id 'kotlinx-serialization'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
|
|
||||||
namespace 'app.aaps.core.interfaces'
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 26 // for wear
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':database:entities')
|
|
||||||
|
|
||||||
api "androidx.appcompat:appcompat:$appcompat_version"
|
|
||||||
api "androidx.preference:preference-ktx:$preferencektx_version"
|
|
||||||
api "net.danlew:android.joda:$joda_version"
|
|
||||||
|
|
||||||
|
|
||||||
api "com.google.dagger:dagger:$dagger_version"
|
|
||||||
api "com.google.dagger:dagger-android:$dagger_version"
|
|
||||||
api "com.google.dagger:dagger-android-support:$dagger_version"
|
|
||||||
|
|
||||||
//Logger
|
|
||||||
api 'org.slf4j:slf4j-api:1.7.36' // 2.0.x breaks logging. Code change needed
|
|
||||||
api 'com.github.tony19:logback-android:2.0.0'
|
|
||||||
|
|
||||||
api "com.google.android.gms:play-services-measurement-api:$play_services_measurement_version"
|
|
||||||
|
|
||||||
api "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinx_serialization_version"
|
|
||||||
api "org.jetbrains.kotlinx:kotlinx-serialization-protobuf:$kotlinx_serialization_version"
|
|
||||||
api "com.caverock:androidsvg:$caverock_androidsvg_version"
|
|
||||||
api "org.apache.commons:commons-lang3:$commonslang3_version"
|
|
||||||
|
|
||||||
//RxBus
|
|
||||||
api "io.reactivex.rxjava3:rxjava:$rxjava_version"
|
|
||||||
api "io.reactivex.rxjava3:rxkotlin:$rxkotlin_version"
|
|
||||||
api "io.reactivex.rxjava3:rxandroid:$rxandroid_version"
|
|
||||||
|
|
||||||
// WorkerClasses
|
|
||||||
api "androidx.work:work-runtime-ktx:$work_version"
|
|
||||||
}
|
|
52
core/interfaces/build.gradle.kts
Normal file
52
core/interfaces/build.gradle.kts
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("kotlin-parcelize")
|
||||||
|
id("kotlinx-serialization")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
|
||||||
|
namespace = "app.aaps.core.interfaces"
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = Versions.wearMinSdk // for wear
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
|
||||||
|
api(Libs.AndroidX.appCompat)
|
||||||
|
api(Libs.AndroidX.preference)
|
||||||
|
api(Libs.jodaTimeAndroid)
|
||||||
|
|
||||||
|
api(Libs.Dagger.androidSupport)
|
||||||
|
|
||||||
|
//Logger
|
||||||
|
api(Libs.Logging.slf4jApi)
|
||||||
|
api(Libs.Logging.logbackAndroid)
|
||||||
|
|
||||||
|
api(Libs.Google.Android.PlayServices.measurementApi)
|
||||||
|
|
||||||
|
api(Libs.KotlinX.serializationJson)
|
||||||
|
api(Libs.KotlinX.serializationProtobuf)
|
||||||
|
|
||||||
|
api(Libs.androidSvg)
|
||||||
|
api(Libs.Apache.commonsLang3)
|
||||||
|
|
||||||
|
//RxBus
|
||||||
|
api(Libs.Rx.rxJava)
|
||||||
|
api(Libs.Rx.rxKotlin)
|
||||||
|
api(Libs.Rx.rxAndroid)
|
||||||
|
|
||||||
|
// WorkerClasses
|
||||||
|
api(Libs.AndroidX.Work.runtimeKtx)
|
||||||
|
|
||||||
|
// TODO eliminate kapt from low level modules
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -58,6 +58,7 @@
|
||||||
<string name="pref_show_direction_arrow">Afficher Flèche</string>
|
<string name="pref_show_direction_arrow">Afficher Flèche</string>
|
||||||
<string name="pref_show_ago">Afficher Min Passées</string>
|
<string name="pref_show_ago">Afficher Min Passées</string>
|
||||||
<string name="pref_show_week_number">Afficher numéro semaine</string>
|
<string name="pref_show_week_number">Afficher numéro semaine</string>
|
||||||
|
<string name="pref_show_date">Afficher la date</string>
|
||||||
<string name="default_custom_watchface_comment">Cadran par défaut, vous pouvez cliquer sur le bouton EXPORTER WATCHFACE pour générer un modèle</string>
|
<string name="default_custom_watchface_comment">Cadran par défaut, vous pouvez cliquer sur le bouton EXPORTER WATCHFACE pour générer un modèle</string>
|
||||||
<string name="wear_default_watchface">Cadran par défaut</string>
|
<string name="wear_default_watchface">Cadran par défaut</string>
|
||||||
<string name="cwf_comment_background">Image d\'arrière-plan</string>
|
<string name="cwf_comment_background">Image d\'arrière-plan</string>
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<!-- Maintenance -->
|
|
||||||
<color name="metadataOk">#66BB6A</color>
|
|
||||||
<color name="metadataTextWarning">#FF8C00</color>
|
|
||||||
<color name="metadataTextError">#FF5555</color>
|
|
||||||
|
|
||||||
<!-- Toasts-->
|
|
||||||
<color name="toastBorder">#666666</color>
|
|
||||||
<color name="toastBase">#000000</color>
|
|
||||||
<color name="toastOk">#77dd77</color>
|
|
||||||
<color name="toastError">#ff0400</color>
|
|
||||||
<color name="toastWarn">#FF8C00</color>
|
|
||||||
<color name="toastInfo">#03A9F4</color>
|
|
||||||
|
|
||||||
</resources>
|
|
|
@ -1,4 +1,4 @@
|
||||||
// in order to use internet's versions you'd need to enable Jetifier again
|
// in order to use internet's versions you'd need to enable Jetifier again
|
||||||
// https://github.com/nightscout/iconify.git
|
// https://github.com/nightscout/iconify.git
|
||||||
configurations.create("default")
|
configurations.create("default")
|
||||||
artifacts.add("default", file('libs/iconify.aar'))
|
artifacts.add("default", file("libs/iconify.aar"))
|
|
@ -1,4 +0,0 @@
|
||||||
allOpen {
|
|
||||||
// allows mocking for classes w/o directly opening them for release builds
|
|
||||||
annotation 'app.aaps.annotations.OpenForTesting'
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
android {
|
|
||||||
compileSdk 34
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 28
|
|
||||||
targetSdkVersion 28
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
jniLibs.srcDirs = ['src/main/jniLibs']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
|
|
||||||
lint {
|
|
||||||
checkReleaseBuilds false
|
|
||||||
disable 'MissingTranslation'
|
|
||||||
disable 'ExtraTranslation'
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
android {
|
|
||||||
|
|
||||||
flavorDimensions = ["standard"]
|
|
||||||
productFlavors {
|
|
||||||
full {
|
|
||||||
getIsDefault().set(true)
|
|
||||||
dimension "standard"
|
|
||||||
}
|
|
||||||
pumpcontrol {
|
|
||||||
dimension "standard"
|
|
||||||
}
|
|
||||||
aapsclient {
|
|
||||||
dimension "standard"
|
|
||||||
}
|
|
||||||
aapsclient2 {
|
|
||||||
dimension "standard"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// disable for modules here
|
|
||||||
buildFeatures {
|
|
||||||
buildConfig = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
|
|
||||||
kapt "com.google.dagger:dagger-compiler:$dagger_version"
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-parcelize'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':core:graphview')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
testImplementation project(':shared:impl')
|
|
||||||
|
|
||||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
||||||
|
|
||||||
api "com.google.guava:guava:$guava_version"
|
|
||||||
|
|
||||||
api "androidx.activity:activity-ktx:$activity_version"
|
|
||||||
api "androidx.appcompat:appcompat:$appcompat_version"
|
|
||||||
api "com.google.android.material:material:$material_version"
|
|
||||||
|
|
||||||
api "com.google.dagger:dagger-android:$dagger_version"
|
|
||||||
api "com.google.dagger:dagger-android-support:$dagger_version"
|
|
||||||
|
|
||||||
//WorkManager
|
|
||||||
api "androidx.work:work-runtime-ktx:$work_version" // DataWorkerStorage
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.core.main'
|
|
||||||
}
|
|
40
core/main/build.gradle.kts
Normal file
40
core/main/build.gradle.kts
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("kotlin-parcelize")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("all-open-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.core.main"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":core:graphview"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
testImplementation(project(":shared:impl"))
|
||||||
|
|
||||||
|
api(Libs.Kotlin.stdlibJdk8)
|
||||||
|
api(Libs.Google.Android.material)
|
||||||
|
api(Libs.Google.guava)
|
||||||
|
api(Libs.AndroidX.activity)
|
||||||
|
api(Libs.AndroidX.appCompat)
|
||||||
|
|
||||||
|
api(Libs.Dagger.android)
|
||||||
|
api(Libs.Dagger.androidSupport)
|
||||||
|
|
||||||
|
//WorkManager
|
||||||
|
api(Libs.AndroidX.Work.runtimeKtx) // DataWorkerStorage
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,102 +0,0 @@
|
||||||
project.afterEvaluate { project ->
|
|
||||||
setupAndroidReporting()
|
|
||||||
}
|
|
||||||
|
|
||||||
def setupAndroidReporting() {
|
|
||||||
tasks.withType(Test) {
|
|
||||||
// Whether or not classes without source location should be instrumented
|
|
||||||
jacoco.includeNoLocationClasses = true
|
|
||||||
jacoco.excludes = ['jdk.internal.*']
|
|
||||||
}
|
|
||||||
|
|
||||||
def buildTypes = ["debug", "fullDebug"]
|
|
||||||
|
|
||||||
def productFlavors = android.productFlavors.collect { flavor ->
|
|
||||||
flavor.name
|
|
||||||
}
|
|
||||||
// When no product flavors defined, use empty
|
|
||||||
if (!productFlavors) productFlavors.add('')
|
|
||||||
productFlavors.each { productFlavorName ->
|
|
||||||
buildTypes.each { buildTypeName ->
|
|
||||||
def sourceName, sourcePath
|
|
||||||
if (!productFlavorName) {
|
|
||||||
sourceName = sourcePath = "${buildTypeName}"
|
|
||||||
} else {
|
|
||||||
sourceName = "${productFlavorName}${buildTypeName.capitalize()}"
|
|
||||||
sourcePath = "${productFlavorName}/${buildTypeName}"
|
|
||||||
}
|
|
||||||
def testTaskName = "test${sourceName.capitalize()}UnitTest"
|
|
||||||
// System.out.println("Task -> $testTaskName")
|
|
||||||
|
|
||||||
// Create coverage task of form 'testFlavorTypeCoverage' depending on 'testFlavorTypeUnitTest'
|
|
||||||
task "${testTaskName}Coverage"(type: JacocoReport, dependsOn: "$testTaskName") {
|
|
||||||
group = "Reporting"
|
|
||||||
description = "Generate Jacoco coverage reports on the ${sourceName.capitalize()} build."
|
|
||||||
|
|
||||||
def fileFilter = [
|
|
||||||
// data binding
|
|
||||||
'android/databinding/**/*.class',
|
|
||||||
'**/android/databinding/*Binding.class',
|
|
||||||
'**/android/databinding/*',
|
|
||||||
'**/androidx/databinding/*',
|
|
||||||
'**/BR.*',
|
|
||||||
// android
|
|
||||||
'**/R.class',
|
|
||||||
'**/R$*.class',
|
|
||||||
'**/BuildConfig.*',
|
|
||||||
'**/Manifest*.*',
|
|
||||||
'**/*Test*.*',
|
|
||||||
'android/**/*.*',
|
|
||||||
// kotlin
|
|
||||||
'**/*MapperImpl*.*',
|
|
||||||
'**/*$ViewInjector*.*',
|
|
||||||
'**/*$ViewBinder*.*',
|
|
||||||
'**/BuildConfig.*',
|
|
||||||
'**/*Component*.*',
|
|
||||||
'**/*BR*.*',
|
|
||||||
'**/Manifest*.*',
|
|
||||||
'**/*$Lambda$*.*',
|
|
||||||
'**/*Companion*.*',
|
|
||||||
'**/*Module*.*',
|
|
||||||
'**/*Dagger*.*',
|
|
||||||
'**/*Hilt*.*',
|
|
||||||
'**/*MembersInjector*.*',
|
|
||||||
'**/*_MembersInjector.class',
|
|
||||||
'**/*_Factory*.*',
|
|
||||||
'**/*_Provide*Factory*.*',
|
|
||||||
'**/*Extensions*.*',
|
|
||||||
// sealed and data classes
|
|
||||||
'**/*$Result.*',
|
|
||||||
'**/*$Result$*.*',
|
|
||||||
// adapters generated by moshi
|
|
||||||
'**/*JsonAdapter.*',
|
|
||||||
]
|
|
||||||
|
|
||||||
def javaTree = fileTree(dir: "${project.buildDir}/intermediates/javac/$sourceName/classes", excludes: fileFilter)
|
|
||||||
def kotlinTree = fileTree(dir: "${project.buildDir}/tmp/kotlin-classes/$sourceName", excludes: fileFilter)
|
|
||||||
classDirectories.from = files([javaTree], [kotlinTree])
|
|
||||||
executionData.from = files("${project.buildDir}/jacoco/${testTaskName}.exec")
|
|
||||||
def coverageSourceDirs = ["src/main/java",
|
|
||||||
"src/$productFlavorName/java",
|
|
||||||
"src/$buildTypeName/java"]
|
|
||||||
|
|
||||||
sourceDirectories.setFrom(files(coverageSourceDirs))
|
|
||||||
additionalSourceDirs.setFrom(files(coverageSourceDirs))
|
|
||||||
|
|
||||||
reports {
|
|
||||||
csv.required = false
|
|
||||||
xml.required = true
|
|
||||||
html.required = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
buildTypes {
|
|
||||||
debug {
|
|
||||||
testCoverageEnabled true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
dependencies {
|
|
||||||
//testImplementation "junit:junit:$junit_version"
|
|
||||||
testImplementation 'org.jetbrains.kotlin:kotlin-test:1.9.10'
|
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter:$junit_jupiter_version"
|
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version"
|
|
||||||
testImplementation "org.json:json:$json_version"
|
|
||||||
testImplementation "org.mockito:mockito-junit-jupiter:$mockito_version"
|
|
||||||
testImplementation "org.mockito.kotlin:mockito-kotlin:4.1.0"
|
|
||||||
testImplementation "joda-time:joda-time:$jodatime_version"
|
|
||||||
testImplementation 'com.google.truth:truth:1.1.5'
|
|
||||||
testImplementation "org.skyscreamer:jsonassert:1.5.0"
|
|
||||||
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
||||||
androidTestImplementation "androidx.test.ext:junit-ktx:$androidx_junit_version"
|
|
||||||
androidTestImplementation "androidx.test:rules:$androidx_rules_version"
|
|
||||||
|
|
||||||
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.matching { it instanceof Test }.all {
|
|
||||||
//testLogging.events = ["failed", "skipped", "started"]
|
|
||||||
// use to display stdout in travis
|
|
||||||
testLogging.events = ["failed", "skipped", "started", "standard_out"]
|
|
||||||
testLogging.exceptionFormat = "full"
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
testOptions {
|
|
||||||
unitTests {
|
|
||||||
returnDefaultValues = true
|
|
||||||
includeAndroidResources = true
|
|
||||||
|
|
||||||
all {
|
|
||||||
maxParallelForks = 10
|
|
||||||
forkEvery = 20
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlinx-serialization'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.core.nssdk'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api "com.squareup.retrofit2:retrofit:$retrofit2_version"
|
|
||||||
api "com.squareup.retrofit2:adapter-rxjava3:$retrofit2_version"
|
|
||||||
api "com.squareup.retrofit2:converter-gson:$retrofit2_version"
|
|
||||||
api "com.squareup.okhttp3:okhttp:$okhttp3_version"
|
|
||||||
api "com.squareup.okhttp3:logging-interceptor:$okhttp3_version"
|
|
||||||
|
|
||||||
api "com.google.code.gson:gson:$gson_version"
|
|
||||||
|
|
||||||
api "net.danlew:android.joda:$joda_version"
|
|
||||||
|
|
||||||
api "io.reactivex.rxjava3:rxjava:$rxjava_version"
|
|
||||||
api "io.reactivex.rxjava3:rxandroid:$rxandroid_version"
|
|
||||||
api "io.reactivex.rxjava3:rxkotlin:$rxkotlin_version"
|
|
||||||
|
|
||||||
api "androidx.core:core-ktx:$core_version"
|
|
||||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
||||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
|
||||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
|
||||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-rx3:$coroutines_version"
|
|
||||||
|
|
||||||
api "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinx_serialization_version"
|
|
||||||
}
|
|
32
core/nssdk/build.gradle.kts
Normal file
32
core/nssdk/build.gradle.kts
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlinx-serialization")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.core.nssdk"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api(Libs.Squareup.Retrofit2.retrofit)
|
||||||
|
api(Libs.Squareup.Retrofit2.adapterRxJava3)
|
||||||
|
api(Libs.Squareup.Retrofit2.converterGson)
|
||||||
|
api(Libs.Squareup.Okhttp3.okhttp)
|
||||||
|
api(Libs.Squareup.Okhttp3.loggingInterceptor)
|
||||||
|
api(Libs.Google.gson)
|
||||||
|
api(Libs.jodaTimeAndroid)
|
||||||
|
api(Libs.Rx.rxJava)
|
||||||
|
//api(Libs.Rx.rxAndroid)
|
||||||
|
api(Libs.Rx.rxKotlin)
|
||||||
|
|
||||||
|
api(Libs.AndroidX.core)
|
||||||
|
api(Libs.Kotlin.stdlibJdk8)
|
||||||
|
api(Libs.KotlinX.coroutinesCore)
|
||||||
|
api(Libs.KotlinX.coroutinesAndroid)
|
||||||
|
api(Libs.KotlinX.coroutinesRx3)
|
||||||
|
api(Libs.KotlinX.serializationJson)
|
||||||
|
}
|
|
@ -1,28 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.core.ui'
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
api "androidx.core:core-ktx:$core_version"
|
|
||||||
api "androidx.appcompat:appcompat:$appcompat_version"
|
|
||||||
api "androidx.preference:preference-ktx:$preferencektx_version"
|
|
||||||
|
|
||||||
api "com.google.android.material:material:$material_version"
|
|
||||||
|
|
||||||
api "com.google.dagger:dagger-android:$dagger_version"
|
|
||||||
api "com.google.dagger:dagger-android-support:$dagger_version"
|
|
||||||
}
|
|
20
core/ui/build.gradle.kts
Normal file
20
core/ui/build.gradle.kts
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.core.ui"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api(Libs.AndroidX.core)
|
||||||
|
api(Libs.AndroidX.appCompat)
|
||||||
|
api(Libs.AndroidX.preference)
|
||||||
|
|
||||||
|
api(Libs.Google.Android.material)
|
||||||
|
|
||||||
|
api(Libs.Dagger.android)
|
||||||
|
api(Libs.Dagger.androidSupport)
|
||||||
|
}
|
|
@ -51,6 +51,7 @@
|
||||||
<string name="extended_bolus">Prodloužený bolus</string>
|
<string name="extended_bolus">Prodloužený bolus</string>
|
||||||
<string name="paused">Pozastaveno</string>
|
<string name="paused">Pozastaveno</string>
|
||||||
<string name="tdd_total">CDD celkem</string>
|
<string name="tdd_total">CDD celkem</string>
|
||||||
|
<string name="tdd_old_data">Stará data</string>
|
||||||
<string name="goingtodeliver">Podávání %1$.2f U inzulínu</string>
|
<string name="goingtodeliver">Podávání %1$.2f U inzulínu</string>
|
||||||
<string name="waitingforpump">Čekání na pumpu</string>
|
<string name="waitingforpump">Čekání na pumpu</string>
|
||||||
<string name="androidaps_start">AAPS spuštěno</string>
|
<string name="androidaps_start">AAPS spuštěno</string>
|
||||||
|
@ -167,6 +168,8 @@
|
||||||
<string name="virtualpump_uploadstatus_title">Nahrávat stav pumpy do NS nebo Tidepoolu</string>
|
<string name="virtualpump_uploadstatus_title">Nahrávat stav pumpy do NS nebo Tidepoolu</string>
|
||||||
<string name="suspendloop_label">Zakázaná/pozastavená smyčka</string>
|
<string name="suspendloop_label">Zakázaná/pozastavená smyčka</string>
|
||||||
<string name="iob_label">Aktivní inzulín (IOB)</string>
|
<string name="iob_label">Aktivní inzulín (IOB)</string>
|
||||||
|
<string name="loopstatus_targets">CÍL:</string>
|
||||||
|
<string name="loopstatus_OAPS_result">VÝSLEDEK OAPS:</string>
|
||||||
<!-- Protection-->
|
<!-- Protection-->
|
||||||
<string name="wrongpassword">Chybné heslo</string>
|
<string name="wrongpassword">Chybné heslo</string>
|
||||||
<string name="wrongpin">Nesprávný PIN</string>
|
<string name="wrongpin">Nesprávný PIN</string>
|
||||||
|
@ -462,6 +465,8 @@
|
||||||
<string name="bolus_recorded_only">Bolus nebude pumpou vydán, pouze zaznamenán</string>
|
<string name="bolus_recorded_only">Bolus nebude pumpou vydán, pouze zaznamenán</string>
|
||||||
<string name="advisoralarm">Spustit alarm, když je čas na jídlo</string>
|
<string name="advisoralarm">Spustit alarm, když je čas na jídlo</string>
|
||||||
<string name="no_action_selected">Žádná akce nevybrána, nic se neprovede</string>
|
<string name="no_action_selected">Žádná akce nevybrána, nic se neprovede</string>
|
||||||
|
<string name="carb_equal_zero_no_action">Sacharidy = 0. Žádná akce!</string>
|
||||||
|
<string name="wizard_no_insulin_required">Není vyžadován žádný inzulín!</string>
|
||||||
<string name="wizard_no_actual_bg">Žádná aktuální glykémie k výpočtu!</string>
|
<string name="wizard_no_actual_bg">Žádná aktuální glykémie k výpočtu!</string>
|
||||||
<string name="wizard_no_active_profile">Není nastaven žádný aktivní profil!</string>
|
<string name="wizard_no_active_profile">Není nastaven žádný aktivní profil!</string>
|
||||||
<string name="wizard_no_cob">Neznámý COB! Chybějící glykémie nebo nedávný restart aplikace?</string>
|
<string name="wizard_no_cob">Neznámý COB! Chybějící glykémie nebo nedávný restart aplikace?</string>
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<string name="extended_bolus">Bolo extendido</string>
|
<string name="extended_bolus">Bolo extendido</string>
|
||||||
<string name="paused">Pausado</string>
|
<string name="paused">Pausado</string>
|
||||||
<string name="tdd_total">Total TDD</string>
|
<string name="tdd_total">Total TDD</string>
|
||||||
|
<string name="tdd_old_data">Datos antiguos</string>
|
||||||
<string name="goingtodeliver">Entregando %1$.2f U</string>
|
<string name="goingtodeliver">Entregando %1$.2f U</string>
|
||||||
<string name="waitingforpump">Esperando bomba</string>
|
<string name="waitingforpump">Esperando bomba</string>
|
||||||
<string name="androidaps_start">AAPS iniciado</string>
|
<string name="androidaps_start">AAPS iniciado</string>
|
||||||
|
@ -167,6 +168,8 @@
|
||||||
<string name="virtualpump_uploadstatus_title">Subir estado de la bomba a NS o Tidepool</string>
|
<string name="virtualpump_uploadstatus_title">Subir estado de la bomba a NS o Tidepool</string>
|
||||||
<string name="suspendloop_label">Desactiva/suspende el lazo</string>
|
<string name="suspendloop_label">Desactiva/suspende el lazo</string>
|
||||||
<string name="iob_label">Insulina a bordo (IOB)</string>
|
<string name="iob_label">Insulina a bordo (IOB)</string>
|
||||||
|
<string name="loopstatus_targets">OBJETIVOS:</string>
|
||||||
|
<string name="loopstatus_OAPS_result">RESULTADO OAPS:</string>
|
||||||
<!-- Protection-->
|
<!-- Protection-->
|
||||||
<string name="wrongpassword">Contraseña incorrecta</string>
|
<string name="wrongpassword">Contraseña incorrecta</string>
|
||||||
<string name="wrongpin">Pin erróneo</string>
|
<string name="wrongpin">Pin erróneo</string>
|
||||||
|
@ -462,6 +465,8 @@
|
||||||
<string name="bolus_recorded_only">El bolo sólo se anotará (no será entregado por la bomba)</string>
|
<string name="bolus_recorded_only">El bolo sólo se anotará (no será entregado por la bomba)</string>
|
||||||
<string name="advisoralarm">Ejecutar alarma cuando sea hora de comer</string>
|
<string name="advisoralarm">Ejecutar alarma cuando sea hora de comer</string>
|
||||||
<string name="no_action_selected">No se ha seleccionado ninguna opción, por lo que no se realizará ningún cambio</string>
|
<string name="no_action_selected">No se ha seleccionado ninguna opción, por lo que no se realizará ningún cambio</string>
|
||||||
|
<string name="carb_equal_zero_no_action">Carbs = 0. ¡No se toma ningua acción!</string>
|
||||||
|
<string name="wizard_no_insulin_required">¡No se requiere insulina!</string>
|
||||||
<string name="wizard_no_actual_bg">¡No hay valor de glucosa reciente en el que basar el cálculo!</string>
|
<string name="wizard_no_actual_bg">¡No hay valor de glucosa reciente en el que basar el cálculo!</string>
|
||||||
<string name="wizard_no_active_profile">¡No hay perfil activo!</string>
|
<string name="wizard_no_active_profile">¡No hay perfil activo!</string>
|
||||||
<string name="wizard_no_cob">COB desconocido! ¿Valor de glucosa ausente o reincio reciente de la aplicación?</string>
|
<string name="wizard_no_cob">COB desconocido! ¿Valor de glucosa ausente o reincio reciente de la aplicación?</string>
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<string name="extended_bolus">Bolus étendu</string>
|
<string name="extended_bolus">Bolus étendu</string>
|
||||||
<string name="paused">En pause</string>
|
<string name="paused">En pause</string>
|
||||||
<string name="tdd_total">DTQ Total</string>
|
<string name="tdd_total">DTQ Total</string>
|
||||||
|
<string name="tdd_old_data">Données anciennes</string>
|
||||||
<string name="goingtodeliver">%1$.2f U vont être injectées</string>
|
<string name="goingtodeliver">%1$.2f U vont être injectées</string>
|
||||||
<string name="waitingforpump">Attente connection pompe</string>
|
<string name="waitingforpump">Attente connection pompe</string>
|
||||||
<string name="androidaps_start">AAPS démarré</string>
|
<string name="androidaps_start">AAPS démarré</string>
|
||||||
|
@ -167,6 +168,8 @@
|
||||||
<string name="virtualpump_uploadstatus_title">Télécharger l\'état de la pompe sur NS ou Tidepool</string>
|
<string name="virtualpump_uploadstatus_title">Télécharger l\'état de la pompe sur NS ou Tidepool</string>
|
||||||
<string name="suspendloop_label">Boucle désactivée/suspendue</string>
|
<string name="suspendloop_label">Boucle désactivée/suspendue</string>
|
||||||
<string name="iob_label">Insuline Active (IA)</string>
|
<string name="iob_label">Insuline Active (IA)</string>
|
||||||
|
<string name="loopstatus_targets">CIBLES:</string>
|
||||||
|
<string name="loopstatus_OAPS_result">RÉSULTATS OAPS:</string>
|
||||||
<!-- Protection-->
|
<!-- Protection-->
|
||||||
<string name="wrongpassword">Mot de passe incorrect</string>
|
<string name="wrongpassword">Mot de passe incorrect</string>
|
||||||
<string name="wrongpin">Code PIN incorrect</string>
|
<string name="wrongpin">Code PIN incorrect</string>
|
||||||
|
@ -462,6 +465,8 @@
|
||||||
<string name="bolus_recorded_only">Les bolus seront seulement enregistrés (pas délivrés par la pompe)</string>
|
<string name="bolus_recorded_only">Les bolus seront seulement enregistrés (pas délivrés par la pompe)</string>
|
||||||
<string name="advisoralarm">Alerter quand il est temps de manger</string>
|
<string name="advisoralarm">Alerter quand il est temps de manger</string>
|
||||||
<string name="no_action_selected">Aucune action sélectionnée, rien ne se passera</string>
|
<string name="no_action_selected">Aucune action sélectionnée, rien ne se passera</string>
|
||||||
|
<string name="carb_equal_zero_no_action">Glucides = 0. Aucune action !</string>
|
||||||
|
<string name="wizard_no_insulin_required">Aucune insuline requise !</string>
|
||||||
<string name="wizard_no_actual_bg">Pas de glycémie récente pour calculer !</string>
|
<string name="wizard_no_actual_bg">Pas de glycémie récente pour calculer !</string>
|
||||||
<string name="wizard_no_active_profile">Aucun profil activé !</string>
|
<string name="wizard_no_active_profile">Aucun profil activé !</string>
|
||||||
<string name="wizard_no_cob">GA inconnu! glycémie manquante ou démarrage récent de l\'application ?</string>
|
<string name="wizard_no_cob">GA inconnu! glycémie manquante ou démarrage récent de l\'application ?</string>
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<string name="extended_bolus">Forlenget bolus</string>
|
<string name="extended_bolus">Forlenget bolus</string>
|
||||||
<string name="paused">Pauset</string>
|
<string name="paused">Pauset</string>
|
||||||
<string name="tdd_total">TDD Total</string>
|
<string name="tdd_total">TDD Total</string>
|
||||||
|
<string name="tdd_old_data">Gammel data</string>
|
||||||
<string name="goingtodeliver">Leverer %1$.2f enheter</string>
|
<string name="goingtodeliver">Leverer %1$.2f enheter</string>
|
||||||
<string name="waitingforpump">Venter på pumpen</string>
|
<string name="waitingforpump">Venter på pumpen</string>
|
||||||
<string name="androidaps_start">AAPS startet</string>
|
<string name="androidaps_start">AAPS startet</string>
|
||||||
|
@ -167,6 +168,8 @@
|
||||||
<string name="virtualpump_uploadstatus_title">Last opp pumpestatus til NS eller Tidepool</string>
|
<string name="virtualpump_uploadstatus_title">Last opp pumpestatus til NS eller Tidepool</string>
|
||||||
<string name="suspendloop_label">Deaktivert/pauset loop</string>
|
<string name="suspendloop_label">Deaktivert/pauset loop</string>
|
||||||
<string name="iob_label">Aktivt insulin (IOB)</string>
|
<string name="iob_label">Aktivt insulin (IOB)</string>
|
||||||
|
<string name="loopstatus_targets">MÅLVERDIER:</string>
|
||||||
|
<string name="loopstatus_OAPS_result">OAPS resultat:</string>
|
||||||
<!-- Protection-->
|
<!-- Protection-->
|
||||||
<string name="wrongpassword">Feil passord</string>
|
<string name="wrongpassword">Feil passord</string>
|
||||||
<string name="wrongpin">Feil PIN-kode</string>
|
<string name="wrongpin">Feil PIN-kode</string>
|
||||||
|
@ -462,6 +465,8 @@
|
||||||
<string name="bolus_recorded_only">Bolus vil bare bli loggført (ikke levert av pumpe)</string>
|
<string name="bolus_recorded_only">Bolus vil bare bli loggført (ikke levert av pumpe)</string>
|
||||||
<string name="advisoralarm">Aktiver alarm når det er på tide å spise</string>
|
<string name="advisoralarm">Aktiver alarm når det er på tide å spise</string>
|
||||||
<string name="no_action_selected">Ingen handling valgt. Ingenting endres</string>
|
<string name="no_action_selected">Ingen handling valgt. Ingenting endres</string>
|
||||||
|
<string name="carb_equal_zero_no_action">Karbo = 0. Ingen handling utført!</string>
|
||||||
|
<string name="wizard_no_insulin_required">Insulin er ikke nødvendig!</string>
|
||||||
<string name="wizard_no_actual_bg">Mangler nylige BS-verdier til å gjøre beregninger!</string>
|
<string name="wizard_no_actual_bg">Mangler nylige BS-verdier til å gjøre beregninger!</string>
|
||||||
<string name="wizard_no_active_profile">Det er ikke angitt noen aktiv profil!</string>
|
<string name="wizard_no_active_profile">Det er ikke angitt noen aktiv profil!</string>
|
||||||
<string name="wizard_no_cob">Ukjent COB! BS-verdier mangler eller nylig oppstart av appen?</string>
|
<string name="wizard_no_cob">Ukjent COB! BS-verdier mangler eller nylig oppstart av appen?</string>
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<string name="extended_bolus">Vertraagde bolus</string>
|
<string name="extended_bolus">Vertraagde bolus</string>
|
||||||
<string name="paused">Gepauzeerd</string>
|
<string name="paused">Gepauzeerd</string>
|
||||||
<string name="tdd_total">TDD Totaal</string>
|
<string name="tdd_total">TDD Totaal</string>
|
||||||
|
<string name="tdd_old_data">Oude gegevens</string>
|
||||||
<string name="goingtodeliver">%1$.2f E toedienen</string>
|
<string name="goingtodeliver">%1$.2f E toedienen</string>
|
||||||
<string name="waitingforpump">Wacht op pomp</string>
|
<string name="waitingforpump">Wacht op pomp</string>
|
||||||
<string name="androidaps_start">AAPS gestart</string>
|
<string name="androidaps_start">AAPS gestart</string>
|
||||||
|
@ -167,6 +168,8 @@
|
||||||
<string name="virtualpump_uploadstatus_title">Upload pomp status naar NS of Tidepool</string>
|
<string name="virtualpump_uploadstatus_title">Upload pomp status naar NS of Tidepool</string>
|
||||||
<string name="suspendloop_label">Uitgeschakelde/onderbroken loop</string>
|
<string name="suspendloop_label">Uitgeschakelde/onderbroken loop</string>
|
||||||
<string name="iob_label">Insuline aan boord (IOB)</string>
|
<string name="iob_label">Insuline aan boord (IOB)</string>
|
||||||
|
<string name="loopstatus_targets">DOELWAARDE:</string>
|
||||||
|
<string name="loopstatus_OAPS_result">OAPS RESULTAAT:</string>
|
||||||
<!-- Protection-->
|
<!-- Protection-->
|
||||||
<string name="wrongpassword">Verkeerd wachtwoord</string>
|
<string name="wrongpassword">Verkeerd wachtwoord</string>
|
||||||
<string name="wrongpin">Onjuiste PIN-code</string>
|
<string name="wrongpin">Onjuiste PIN-code</string>
|
||||||
|
@ -462,6 +465,8 @@
|
||||||
<string name="bolus_recorded_only">Bolus wordt alleen geregistreerd (niet toegediend door pomp)</string>
|
<string name="bolus_recorded_only">Bolus wordt alleen geregistreerd (niet toegediend door pomp)</string>
|
||||||
<string name="advisoralarm">Start alarm wanneer het tijd is om te eten</string>
|
<string name="advisoralarm">Start alarm wanneer het tijd is om te eten</string>
|
||||||
<string name="no_action_selected">Geen actie geselecteerd, er zal niets uitgevoerd worden</string>
|
<string name="no_action_selected">Geen actie geselecteerd, er zal niets uitgevoerd worden</string>
|
||||||
|
<string name="carb_equal_zero_no_action">Koolhydraten = 0. Geen actie!</string>
|
||||||
|
<string name="wizard_no_insulin_required">Geen insuline nodig!</string>
|
||||||
<string name="wizard_no_actual_bg">Geen recente BG om de berekening op te baseren!</string>
|
<string name="wizard_no_actual_bg">Geen recente BG om de berekening op te baseren!</string>
|
||||||
<string name="wizard_no_active_profile">Geen actief profiel ingesteld!</string>
|
<string name="wizard_no_active_profile">Geen actief profiel ingesteld!</string>
|
||||||
<string name="wizard_no_cob">Onbekende COB! BG uitlezing ontbreekt of de recente app herstart?</string>
|
<string name="wizard_no_cob">Onbekende COB! BG uitlezing ontbreekt of de recente app herstart?</string>
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<string name="extended_bolus">Bolus Przedłużony</string>
|
<string name="extended_bolus">Bolus Przedłużony</string>
|
||||||
<string name="paused">Wstrzymano</string>
|
<string name="paused">Wstrzymano</string>
|
||||||
<string name="tdd_total">TDD Całkowita</string>
|
<string name="tdd_total">TDD Całkowita</string>
|
||||||
|
<string name="tdd_old_data">Stare dane</string>
|
||||||
<string name="goingtodeliver">Zamierzam podać %1$.2f U</string>
|
<string name="goingtodeliver">Zamierzam podać %1$.2f U</string>
|
||||||
<string name="waitingforpump">Czekam na pompę</string>
|
<string name="waitingforpump">Czekam na pompę</string>
|
||||||
<string name="androidaps_start">AAPS uruchomiony</string>
|
<string name="androidaps_start">AAPS uruchomiony</string>
|
||||||
|
@ -167,6 +168,8 @@
|
||||||
<string name="virtualpump_uploadstatus_title">Prześlij status pompy do NS lub Tidepool</string>
|
<string name="virtualpump_uploadstatus_title">Prześlij status pompy do NS lub Tidepool</string>
|
||||||
<string name="suspendloop_label">Wyłączona/zawieszona pętla</string>
|
<string name="suspendloop_label">Wyłączona/zawieszona pętla</string>
|
||||||
<string name="iob_label">Aktywna insulina (IOB)</string>
|
<string name="iob_label">Aktywna insulina (IOB)</string>
|
||||||
|
<string name="loopstatus_targets">CELE:</string>
|
||||||
|
<string name="loopstatus_OAPS_result">WYNIK OAPS:</string>
|
||||||
<!-- Protection-->
|
<!-- Protection-->
|
||||||
<string name="wrongpassword">Złe hasło</string>
|
<string name="wrongpassword">Złe hasło</string>
|
||||||
<string name="wrongpin">Nieprawidłowy PIN</string>
|
<string name="wrongpin">Nieprawidłowy PIN</string>
|
||||||
|
@ -462,6 +465,8 @@
|
||||||
<string name="bolus_recorded_only">Bolus zostanie jedynie odnotowany (nie będzie podany przez pompę)</string>
|
<string name="bolus_recorded_only">Bolus zostanie jedynie odnotowany (nie będzie podany przez pompę)</string>
|
||||||
<string name="advisoralarm">Uruchom alarm kiedy będzie czas na jedzenie</string>
|
<string name="advisoralarm">Uruchom alarm kiedy będzie czas na jedzenie</string>
|
||||||
<string name="no_action_selected">Nie wybrano żadnej akcji, zdarzenie nie będzie wprowadzone</string>
|
<string name="no_action_selected">Nie wybrano żadnej akcji, zdarzenie nie będzie wprowadzone</string>
|
||||||
|
<string name="carb_equal_zero_no_action">Węglowodany = 0. Nie podjęto żadnych działań!</string>
|
||||||
|
<string name="wizard_no_insulin_required">Insulina nie jest wymagana!</string>
|
||||||
<string name="wizard_no_actual_bg">Brak niezbędnego do obliczeń bieżącego pomiaru glikemi!</string>
|
<string name="wizard_no_actual_bg">Brak niezbędnego do obliczeń bieżącego pomiaru glikemi!</string>
|
||||||
<string name="wizard_no_active_profile">Nie ustawiono aktywnego profilu!</string>
|
<string name="wizard_no_active_profile">Nie ustawiono aktywnego profilu!</string>
|
||||||
<string name="wizard_no_cob">Nieznane COB! Może brakuje odczytu glikemii lub niedawno zrestartowano aplikację?</string>
|
<string name="wizard_no_cob">Nieznane COB! Może brakuje odczytu glikemii lub niedawno zrestartowano aplikację?</string>
|
||||||
|
|
|
@ -360,4 +360,17 @@
|
||||||
<color name="widget_ribbonCritical">#ff0400</color>
|
<color name="widget_ribbonCritical">#ff0400</color>
|
||||||
<color name="widget_basal">#00ffff</color>
|
<color name="widget_basal">#00ffff</color>
|
||||||
|
|
||||||
|
<!-- Maintenance -->
|
||||||
|
<color name="metadataOk">#66BB6A</color>
|
||||||
|
<color name="metadataTextWarning">#FF8C00</color>
|
||||||
|
<color name="metadataTextError">#FF5555</color>
|
||||||
|
|
||||||
|
<!-- Toasts-->
|
||||||
|
<color name="toastBorder">#666666</color>
|
||||||
|
<color name="toastBase">#000000</color>
|
||||||
|
<color name="toastOk">#77dd77</color>
|
||||||
|
<color name="toastError">#ff0400</color>
|
||||||
|
<color name="toastWarn">#FF8C00</color>
|
||||||
|
<color name="toastInfo">#03A9F4</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
|
|
||||||
namespace 'app.aaps.core.utils'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
api "com.google.dagger:dagger-android:$dagger_version"
|
|
||||||
api "com.google.dagger:dagger-android-support:$dagger_version"
|
|
||||||
|
|
||||||
api "net.danlew:android.joda:$joda_version"
|
|
||||||
|
|
||||||
//Firebase
|
|
||||||
api platform('com.google.firebase:firebase-bom:32.4.0')
|
|
||||||
api "com.google.firebase:firebase-analytics-ktx"
|
|
||||||
api "com.google.firebase:firebase-crashlytics-ktx"
|
|
||||||
// StatsActivity not in use now
|
|
||||||
// api "com.google.firebase:firebase-messaging-ktx"
|
|
||||||
// api 'com.google.firebase:firebase-auth-ktx'
|
|
||||||
// api 'com.google.firebase:firebase-database-ktx'
|
|
||||||
|
|
||||||
//CryptoUtil
|
|
||||||
api 'com.madgag.spongycastle:core:1.58.0.0'
|
|
||||||
api "com.google.crypto.tink:tink-android:$tink_version"
|
|
||||||
|
|
||||||
//WorkManager
|
|
||||||
api "androidx.work:work-runtime-ktx:$work_version" // DataWorkerStorage
|
|
||||||
}
|
|
38
core/utils/build.gradle.kts
Normal file
38
core/utils/build.gradle.kts
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("kotlin-allopen")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("all-open-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.core.utils"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
api(Libs.jodaTimeAndroid)
|
||||||
|
|
||||||
|
//Firebase
|
||||||
|
api(platform(Libs.Google.Firebase.firebaseBom))
|
||||||
|
api(Libs.Google.Firebase.analytics)
|
||||||
|
api(Libs.Google.Firebase.crashlytics)
|
||||||
|
// StatsActivity not in use now
|
||||||
|
// api(Libs.Google.Firebase.messaging)
|
||||||
|
// api(Libs.Google.Firebase.auth)
|
||||||
|
// api(Libs.Google.Firebase.database)
|
||||||
|
|
||||||
|
//CryptoUtil
|
||||||
|
api(Libs.spongycastleCore)
|
||||||
|
api(Libs.Google.tinkAndroid)
|
||||||
|
|
||||||
|
//WorkManager
|
||||||
|
api(Libs.AndroidX.Work.runtimeKtx) // DataWorkerStorage
|
||||||
|
|
||||||
|
api(Libs.Dagger.android)
|
||||||
|
api(Libs.Dagger.androidSupport)
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.core.validators'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
|
|
||||||
api "com.google.dagger:dagger-android:$dagger_version"
|
|
||||||
api "com.google.dagger:dagger-android-support:$dagger_version"
|
|
||||||
|
|
||||||
api "com.google.android.material:material:$material_version"
|
|
||||||
}
|
|
24
core/validators/build.gradle.kts
Normal file
24
core/validators/build.gradle.kts
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.core.validators"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
|
||||||
|
api(Libs.Dagger.android)
|
||||||
|
api(Libs.Dagger.androidSupport)
|
||||||
|
api(Libs.Google.Android.material)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,37 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
|
|
||||||
namespace 'app.aaps.database.entities'
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 26 // for wear
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
buildConfig = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
||||||
|
|
||||||
api "androidx.core:core-ktx:$core_version"
|
|
||||||
|
|
||||||
kapt "androidx.room:room-compiler:$room_version"
|
|
||||||
api "androidx.room:room-ktx:$room_version"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
allOpen {
|
|
||||||
// allows mocking for classes w/o directly opening them for release builds
|
|
||||||
annotation 'app.aaps.database.annotations.DbOpenForTesting'
|
|
||||||
}
|
|
24
database/entities/build.gradle.kts
Normal file
24
database/entities/build.gradle.kts
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
|
||||||
|
namespace = "app.aaps.database.entities"
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = Versions.wearMinSdk // for wear
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api(Libs.Kotlin.stdlibJdk8)
|
||||||
|
api(Libs.AndroidX.core)
|
||||||
|
api(Libs.AndroidX.Room.room)
|
||||||
|
|
||||||
|
kapt(Libs.AndroidX.Room.compiler)
|
||||||
|
}
|
|
@ -1,53 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.database.impl'
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
kapt {
|
|
||||||
arguments {
|
|
||||||
arg("room.incremental", "true")
|
|
||||||
arg("room.schemaLocation", "$projectDir/schemas")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sourceSets {
|
|
||||||
androidTest.assets.srcDirs += files("$projectDir/schemas")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':database:entities')
|
|
||||||
|
|
||||||
api "androidx.core:core-ktx:$core_version"
|
|
||||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
||||||
api "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
||||||
|
|
||||||
api "io.reactivex.rxjava3:rxjava:$rxjava_version"
|
|
||||||
api "io.reactivex.rxjava3:rxandroid:$rxandroid_version"
|
|
||||||
api "io.reactivex.rxjava3:rxkotlin:$rxkotlin_version"
|
|
||||||
|
|
||||||
api "com.google.code.gson:gson:$gson_version"
|
|
||||||
|
|
||||||
api "androidx.room:room-runtime:$room_version"
|
|
||||||
kapt "androidx.room:room-compiler:$room_version"
|
|
||||||
/* Database schema export */
|
|
||||||
kapt "androidx.room:room-compiler:$room_version"
|
|
||||||
api "androidx.room:room-ktx:$room_version"
|
|
||||||
api "androidx.room:room-rxjava3:$room_version"
|
|
||||||
|
|
||||||
api "com.google.dagger:dagger-android:$dagger_version"
|
|
||||||
api "com.google.dagger:dagger-android-support:$dagger_version"
|
|
||||||
|
|
||||||
androidTestImplementation "androidx.room:room-testing:$room_version"
|
|
||||||
}
|
|
51
database/impl/build.gradle.kts
Normal file
51
database/impl/build.gradle.kts
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("kotlin-allopen")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.database.impl"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
kapt {
|
||||||
|
arguments {
|
||||||
|
arg("room.incremental", "true")
|
||||||
|
arg("room.schemaLocation", "$projectDir/schemas")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sourceSets {
|
||||||
|
getByName("androidTest").assets.srcDirs("$projectDir/schemas")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
|
||||||
|
api(Libs.Kotlin.stdlibJdk8)
|
||||||
|
api(Libs.Kotlin.reflect)
|
||||||
|
api(Libs.AndroidX.core)
|
||||||
|
|
||||||
|
api(Libs.Rx.rxJava)
|
||||||
|
api(Libs.Rx.rxAndroid)
|
||||||
|
api(Libs.Rx.rxKotlin)
|
||||||
|
|
||||||
|
api(Libs.Google.gson)
|
||||||
|
|
||||||
|
api(Libs.AndroidX.Room.room)
|
||||||
|
api(Libs.AndroidX.Room.runtime)
|
||||||
|
api(Libs.AndroidX.Room.rxJava3)
|
||||||
|
|
||||||
|
api(Libs.Dagger.android)
|
||||||
|
api(Libs.Dagger.androidSupport)
|
||||||
|
|
||||||
|
androidTestImplementation(Libs.AndroidX.Room.testing)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.AndroidX.Room.compiler)
|
||||||
|
}
|
|
@ -1,15 +0,0 @@
|
||||||
package app.aaps.database.annotations
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the actual annotation that makes the class open. Don't use it directly, only through [DbOpenForTesting]
|
|
||||||
* which has a NOOP replacement in production.
|
|
||||||
*/
|
|
||||||
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
|
||||||
annotation class DbOpenClass
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Annotate a class with [DbOpenForTesting] if it should be extendable for testing.
|
|
||||||
*/
|
|
||||||
@DbOpenClass
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
annotation class DbOpenForTesting
|
|
|
@ -1,7 +1,7 @@
|
||||||
package app.aaps.database.impl
|
package app.aaps.database.impl
|
||||||
|
|
||||||
|
import androidx.annotation.OpenForTesting
|
||||||
import app.aaps.database.ValueWrapper
|
import app.aaps.database.ValueWrapper
|
||||||
import app.aaps.database.annotations.DbOpenForTesting
|
|
||||||
import app.aaps.database.entities.Bolus
|
import app.aaps.database.entities.Bolus
|
||||||
import app.aaps.database.entities.BolusCalculatorResult
|
import app.aaps.database.entities.BolusCalculatorResult
|
||||||
import app.aaps.database.entities.Carbs
|
import app.aaps.database.entities.Carbs
|
||||||
|
@ -34,8 +34,9 @@ import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
@DbOpenForTesting
|
@OpenForTesting
|
||||||
@Singleton class AppRepository @Inject internal constructor(
|
@Singleton
|
||||||
|
class AppRepository @Inject internal constructor(
|
||||||
internal val database: AppDatabase
|
internal val database: AppDatabase
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
package app.aaps.database.annotations
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Annotate a class with [DbOpenForTesting] if it should be extendable for testing.
|
|
||||||
* In production the class remains final.
|
|
||||||
*/
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
annotation class DbOpenForTesting
|
|
|
@ -1,32 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.implementation'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':database:impl')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:graphview')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
testImplementation project(':plugins:aps')
|
|
||||||
testImplementation project(':pump:virtual')
|
|
||||||
|
|
||||||
// Protection
|
|
||||||
api 'androidx.biometric:biometric:1.1.0'
|
|
||||||
}
|
|
32
implementation/build.gradle.kts
Normal file
32
implementation/build.gradle.kts
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("all-open-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.implementation"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":database:impl"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:graphview"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
testImplementation(project(":plugins:aps"))
|
||||||
|
testImplementation(project(":pump:virtual"))
|
||||||
|
// Protection
|
||||||
|
api(Libs.AndroidX.biometric)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import app.aaps.core.interfaces.configuration.Constants
|
||||||
import app.aaps.core.interfaces.logging.AAPSLogger
|
import app.aaps.core.interfaces.logging.AAPSLogger
|
||||||
import app.aaps.core.interfaces.logging.LTag
|
import app.aaps.core.interfaces.logging.LTag
|
||||||
import app.aaps.core.interfaces.plugin.ActivePlugin
|
import app.aaps.core.interfaces.plugin.ActivePlugin
|
||||||
|
import app.aaps.core.interfaces.pump.VirtualPump
|
||||||
import app.aaps.core.interfaces.queue.CommandQueue
|
import app.aaps.core.interfaces.queue.CommandQueue
|
||||||
import app.aaps.core.interfaces.resources.ResourceHelper
|
import app.aaps.core.interfaces.resources.ResourceHelper
|
||||||
import app.aaps.core.interfaces.rx.bus.RxBus
|
import app.aaps.core.interfaces.rx.bus.RxBus
|
||||||
|
@ -54,7 +55,7 @@ class QueueThread internal constructor(
|
||||||
val secondsElapsed = (System.currentTimeMillis() - connectionStartTime) / 1000
|
val secondsElapsed = (System.currentTimeMillis() - connectionStartTime) / 1000
|
||||||
val pump = activePlugin.activePump
|
val pump = activePlugin.activePump
|
||||||
// Manifest.permission.BLUETOOTH_CONNECT
|
// Manifest.permission.BLUETOOTH_CONNECT
|
||||||
if (config.PUMPDRIVERS && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
if (config.PUMPDRIVERS && pump !is VirtualPump && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||||
if (androidPermission.permissionNotGranted(context, "android.permission.BLUETOOTH_CONNECT")) {
|
if (androidPermission.permissionNotGranted(context, "android.permission.BLUETOOTH_CONNECT")) {
|
||||||
aapsLogger.debug(LTag.PUMPQUEUE, "no permission")
|
aapsLogger.debug(LTag.PUMPQUEUE, "no permission")
|
||||||
rxBus.send(EventPumpStatusChanged(EventPumpStatusChanged.Status.CONNECTING))
|
rxBus.send(EventPumpStatusChanged(EventPumpStatusChanged.Status.CONNECTING))
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
|
|
||||||
namespace 'info.nightscout.androidaps.insight'
|
|
||||||
defaultConfig {
|
|
||||||
kapt {
|
|
||||||
arguments {
|
|
||||||
arg("room.incremental", "true")
|
|
||||||
arg("room.schemaLocation", "$projectDir/schemas")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':pump:pump-common')
|
|
||||||
|
|
||||||
api "androidx.room:room-ktx:$room_version"
|
|
||||||
api "androidx.room:room-runtime:$room_version"
|
|
||||||
api "androidx.room:room-rxjava3:$room_version"
|
|
||||||
kapt "androidx.room:room-compiler:$room_version"
|
|
||||||
|
|
||||||
api "com.google.android.material:material:$material_version"
|
|
||||||
}
|
|
39
insight/build.gradle.kts
Normal file
39
insight/build.gradle.kts
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
|
||||||
|
namespace = "info.nightscout.androidaps.insight"
|
||||||
|
defaultConfig {
|
||||||
|
kapt {
|
||||||
|
arguments {
|
||||||
|
arg("room.incremental", "true")
|
||||||
|
arg("room.schemaLocation", "$projectDir/schemas")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":pump:pump-common"))
|
||||||
|
|
||||||
|
api(Libs.Google.Android.material)
|
||||||
|
api(Libs.AndroidX.Room.room)
|
||||||
|
api(Libs.AndroidX.Room.runtime)
|
||||||
|
api(Libs.AndroidX.Room.rxJava3)
|
||||||
|
|
||||||
|
kapt(Libs.AndroidX.Room.compiler)
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
91
jacoco_aggregation.gradle.kts
Normal file
91
jacoco_aggregation.gradle.kts
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
apply(plugin = "jacoco")
|
||||||
|
|
||||||
|
project.afterEvaluate {
|
||||||
|
val variants = listOf("fullDebug")
|
||||||
|
|
||||||
|
tasks.register<JacocoReport>(name = "jacocoAllDebugReport") {
|
||||||
|
|
||||||
|
group = "Reporting"
|
||||||
|
description = "Generate overall Jacoco coverage report for the debug build."
|
||||||
|
|
||||||
|
reports {
|
||||||
|
html.required.set(true)
|
||||||
|
xml.required.set(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
val excludes = listOf(
|
||||||
|
"**/di/*Module.class",
|
||||||
|
"**/di/*Component.class",
|
||||||
|
"**/com/jjoe64/**/*.*",
|
||||||
|
"**/R.class",
|
||||||
|
"**/R$*.class",
|
||||||
|
"**/BuildConfig.*",
|
||||||
|
"**/Manifest*.*",
|
||||||
|
"**/*Test*.*",
|
||||||
|
"android/**/*.*",
|
||||||
|
"androidx/**/*.*",
|
||||||
|
"**/*\$ViewInjector*.*",
|
||||||
|
"**/*Dagger*.*",
|
||||||
|
"**/*MembersInjector*.*",
|
||||||
|
"**/*_Factory.*",
|
||||||
|
"**/*_Provide*Factory*.*",
|
||||||
|
"**/*_ViewBinding*.*",
|
||||||
|
"**/AutoValue_*.*",
|
||||||
|
"**/R2.class",
|
||||||
|
"**/R2$*.class",
|
||||||
|
"**/*Directions$*",
|
||||||
|
"**/*Directions.*",
|
||||||
|
"**/*Binding.*",
|
||||||
|
"**/BR.class"
|
||||||
|
)
|
||||||
|
|
||||||
|
val classesDirectories = mutableListOf<String>().also {
|
||||||
|
subprojects.forEach { proj ->
|
||||||
|
variants.forEach { variant ->
|
||||||
|
it.add("${proj.buildDir}/intermediates/javac/$variant/classes")
|
||||||
|
it.add("${proj.buildDir}/tmp/kotlin-classes/$variant")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val classes = HashSet<ConfigurableFileTree>().also {
|
||||||
|
classesDirectories.forEach { path ->
|
||||||
|
it.add(fileTree(path) { exclude(excludes) })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
classDirectories.setFrom(files(listOf(classes)))
|
||||||
|
|
||||||
|
val sources = mutableListOf<String>().also {
|
||||||
|
subprojects.forEach { proj ->
|
||||||
|
variants.forEach { variant ->
|
||||||
|
it.add("${proj.projectDir}/src/main/java")
|
||||||
|
it.add("${proj.projectDir}/src/main/kotlin")
|
||||||
|
it.add("${proj.projectDir}/src/$variant/java")
|
||||||
|
it.add("${proj.projectDir}/src/$variant/kotlin")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sourceDirectories.setFrom(files(sources))
|
||||||
|
|
||||||
|
val executions = mutableListOf<String>().also {
|
||||||
|
subprojects.forEach { proj ->
|
||||||
|
variants.forEach { variant ->
|
||||||
|
val path = "${proj.buildDir}/outputs/unit_test_code_coverage/${variant}UnitTest/test${variant.replaceFirstChar(Char::titlecase)}UnitTest.exec"
|
||||||
|
if ((File(path)).exists()) {
|
||||||
|
it.add(path)
|
||||||
|
println("Collecting execution data from: $path")
|
||||||
|
}
|
||||||
|
val androidPath = "${proj.buildDir}/outputs/code_coverage/${variant}AndroidTest/connected/"
|
||||||
|
val androidFiles = fileTree(androidPath)
|
||||||
|
androidFiles.forEach { file ->
|
||||||
|
it.add(file.path)
|
||||||
|
println("Collecting android execution data from: ${file.path}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
executionData.setFrom(files(executions))
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,84 +0,0 @@
|
||||||
apply plugin: 'jacoco'
|
|
||||||
|
|
||||||
jacoco {
|
|
||||||
toolVersion '0.8.10'
|
|
||||||
}
|
|
||||||
|
|
||||||
project.afterEvaluate {
|
|
||||||
def variants = ["debug", "fullDebug"]
|
|
||||||
|
|
||||||
tasks.create(name: "jacocoAllDebugReport", type: JacocoReport) {
|
|
||||||
|
|
||||||
group = "Reporting"
|
|
||||||
description = "Generate overall Jacoco coverage report for the debug build."
|
|
||||||
|
|
||||||
reports {
|
|
||||||
html.required.set(true)
|
|
||||||
xml.required.set(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
def excludes = [
|
|
||||||
'**/di/*Module.class',
|
|
||||||
'**/di/*Component.class',
|
|
||||||
'**/com/jjoe64/**/*.*',
|
|
||||||
'**/R.class',
|
|
||||||
'**/R$*.class',
|
|
||||||
'**/BuildConfig.*',
|
|
||||||
'**/Manifest*.*',
|
|
||||||
'**/*Test*.*',
|
|
||||||
'android/**/*.*',
|
|
||||||
'androidx/**/*.*',
|
|
||||||
'**/*$ViewInjector*.*',
|
|
||||||
'**/*Dagger*.*',
|
|
||||||
'**/*MembersInjector*.*',
|
|
||||||
'**/*_Factory.*',
|
|
||||||
'**/*_Provide*Factory*.*',
|
|
||||||
'**/*_ViewBinding*.*',
|
|
||||||
'**/AutoValue_*.*',
|
|
||||||
'**/R2.class',
|
|
||||||
'**/R2$*.class',
|
|
||||||
'**/*Directions$*',
|
|
||||||
'**/*Directions.*',
|
|
||||||
'**/*Binding.*',
|
|
||||||
'**/BR.class'
|
|
||||||
]
|
|
||||||
|
|
||||||
def jClasses = subprojects.collect { proj ->
|
|
||||||
variants.collect { variant ->
|
|
||||||
"${proj.buildDir}/intermediates/javac/$variant/classes"
|
|
||||||
}
|
|
||||||
}.flatten()
|
|
||||||
def kClasses = subprojects.collect { proj ->
|
|
||||||
variants.collect { variant ->
|
|
||||||
"${proj.buildDir}/tmp/kotlin-classes/$variant"
|
|
||||||
}
|
|
||||||
}.flatten()
|
|
||||||
|
|
||||||
def javaClasses = jClasses.collect { path ->
|
|
||||||
fileTree(dir: path, excludes: excludes)
|
|
||||||
}
|
|
||||||
def kotlinClasses = kClasses.collect { path ->
|
|
||||||
fileTree(dir: path, excludes: excludes)
|
|
||||||
}
|
|
||||||
|
|
||||||
classDirectories.from = files([javaClasses, kotlinClasses])
|
|
||||||
def sources = subprojects.collect { proj ->
|
|
||||||
variants.collect { variant ->
|
|
||||||
["${proj.projectDir}/src/main/java", "${proj.projectDir}/src/main/kotlin",
|
|
||||||
"${proj.projectDir}/src/$variant/java", "${proj.projectDir}/src/$variant/kotlin"]
|
|
||||||
}.flatten()
|
|
||||||
}.flatten()
|
|
||||||
sourceDirectories.from = files(sources)
|
|
||||||
|
|
||||||
def executions = subprojects.collect { proj ->
|
|
||||||
variants.collect { variant ->
|
|
||||||
def path = "${proj.buildDir}/outputs/unit_test_code_coverage/${variant}UnitTest/test${variant.capitalize()}UnitTest.exec"
|
|
||||||
// printf('Collecting execution data from: %s\n', path)
|
|
||||||
if ((new File(path)).exists()) path else null
|
|
||||||
}
|
|
||||||
}.flatten()
|
|
||||||
executions.removeAll([null])
|
|
||||||
|
|
||||||
executionData.from = files(executions)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.aps'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':database:impl')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:nssdk')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
|
|
||||||
testImplementation project(':pump:virtual')
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
|
|
||||||
api "androidx.appcompat:appcompat:$appcompat_version"
|
|
||||||
api "androidx.swiperefreshlayout:swiperefreshlayout:$swipe_version"
|
|
||||||
api "androidx.gridlayout:gridlayout:$gridlayout_version"
|
|
||||||
|
|
||||||
// APS
|
|
||||||
api 'org.mozilla:rhino:1.7.14'
|
|
||||||
}
|
|
35
plugins/aps/build.gradle.kts
Normal file
35
plugins/aps/build.gradle.kts
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.aps"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":database:impl"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:nssdk"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
|
||||||
|
testImplementation(project(":pump:virtual"))
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
|
||||||
|
api(Libs.AndroidX.appCompat)
|
||||||
|
api(Libs.AndroidX.swipeRefreshLayout)
|
||||||
|
api(Libs.AndroidX.gridLayout)
|
||||||
|
|
||||||
|
// APS
|
||||||
|
api(Libs.Mozilla.rhino)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="dynisf_adjust_sensitivity">Ajustar sensibilidad y glucosa</string>
|
<string name="dynisf_adjust_sensitivity">Ajustar sensibilidad y glucosa</string>
|
||||||
<string name="DynISFAdjust_title" formatted="false">Factor de ajuste de Isf Dinámico %</string>
|
<string name="DynISFAdjust_title" formatted="false">Factor de ajuste de ISF Dinámico %</string>
|
||||||
<string name="DynISFAdjust_summary" formatted="false">Factor de ajuste para el DynamicISF. Establezca más de 100% para una corrección más agresiva, y menos de 100% para correcciones más susves.</string>
|
<string name="DynISFAdjust_summary" formatted="false">Factor de ajuste para ISF Dinámico. Establezca más de 100% para una corrección más agresiva, y menos de 100% para correcciones más susves.</string>
|
||||||
<string name="high_temptarget_raises_sensitivity_title">Objetivo temporal alto aumenta la sensibilidad</string>
|
<string name="high_temptarget_raises_sensitivity_title">Objetivo temporal alto aumenta la sensibilidad</string>
|
||||||
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Aumentar la sensibilidad para objetivos temporales >= 100]]></string>
|
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Aumentar la sensibilidad para objetivos temporales >= 100]]></string>
|
||||||
<string name="low_temptarget_lowers_sensitivity_title">Objetivo temporal bajo reduce la sensibilidad</string>
|
<string name="low_temptarget_lowers_sensitivity_title">Objetivo temporal bajo reduce la sensibilidad</string>
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.automation'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core:graphview')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':database:impl')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
testImplementation project(':shared:impl')
|
|
||||||
testImplementation project(':implementation')
|
|
||||||
testImplementation project(':plugins:main')
|
|
||||||
|
|
||||||
api "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
|
|
||||||
api "com.google.android.gms:play-services-location:$play_services_location_version"
|
|
||||||
}
|
|
34
plugins/automation/build.gradle.kts
Normal file
34
plugins/automation/build.gradle.kts
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.automation"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core:graphview"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":database:impl"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
testImplementation(project(":shared:impl"))
|
||||||
|
testImplementation(project(":implementation"))
|
||||||
|
testImplementation(project(":plugins:main"))
|
||||||
|
|
||||||
|
api(Libs.AndroidX.constraintLayout)
|
||||||
|
api(Libs.Google.Android.PlayServices.location)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -21,7 +21,6 @@ class AutomationEventObject(private val injector: HasAndroidInjector) : Automati
|
||||||
|
|
||||||
override var title: String = ""
|
override var title: String = ""
|
||||||
override var isEnabled = true
|
override var isEnabled = true
|
||||||
var position = -1
|
|
||||||
var systemAction: Boolean = false // true = generated by AAPS, false = entered by user
|
var systemAction: Boolean = false // true = generated by AAPS, false = entered by user
|
||||||
var readOnly: Boolean = false // removing, editing disabled
|
var readOnly: Boolean = false // removing, editing disabled
|
||||||
var autoRemove: Boolean = false // auto-remove once used
|
var autoRemove: Boolean = false // auto-remove once used
|
||||||
|
@ -76,12 +75,11 @@ class AutomationEventObject(private val injector: HasAndroidInjector) : Automati
|
||||||
.toString()
|
.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun fromJSON(data: String, position: Int): AutomationEventObject {
|
fun fromJSON(data: String): AutomationEventObject {
|
||||||
val d = JSONObject(data)
|
val d = JSONObject(data)
|
||||||
title = d.optString("title", "")
|
title = d.optString("title", "")
|
||||||
isEnabled = d.optBoolean("enabled", true)
|
isEnabled = d.optBoolean("enabled", true)
|
||||||
systemAction = d.optBoolean("systemAction", false)
|
systemAction = d.optBoolean("systemAction", false)
|
||||||
this.position = position
|
|
||||||
readOnly = d.optBoolean("readOnly", false)
|
readOnly = d.optBoolean("readOnly", false)
|
||||||
autoRemove = d.optBoolean("autoRemove", false)
|
autoRemove = d.optBoolean("autoRemove", false)
|
||||||
userAction = d.optBoolean("userAction", false)
|
userAction = d.optBoolean("userAction", false)
|
||||||
|
|
|
@ -293,7 +293,7 @@ class AutomationFragment : DaggerFragment(), OnStartDragListener, MenuProvider {
|
||||||
OKDialog.showConfirmation(activity, rh.gs(app.aaps.core.ui.R.string.removerecord), getConfirmationText(selectedItems), Runnable {
|
OKDialog.showConfirmation(activity, rh.gs(app.aaps.core.ui.R.string.removerecord), getConfirmationText(selectedItems), Runnable {
|
||||||
selectedItems.forEach { _, event ->
|
selectedItems.forEach { _, event ->
|
||||||
uel.log(Action.AUTOMATION_REMOVED, Sources.Automation, event.title)
|
uel.log(Action.AUTOMATION_REMOVED, Sources.Automation, event.title)
|
||||||
automationPlugin.removeAt(event.position)
|
automationPlugin.remove(event)
|
||||||
rxBus.send(EventAutomationDataChanged())
|
rxBus.send(EventAutomationDataChanged())
|
||||||
}
|
}
|
||||||
actionHelper.finish()
|
actionHelper.finish()
|
||||||
|
|
|
@ -211,14 +211,14 @@ class AutomationPlugin @Inject constructor(
|
||||||
val array = JSONArray(data)
|
val array = JSONArray(data)
|
||||||
for (i in 0 until array.length()) {
|
for (i in 0 until array.length()) {
|
||||||
val o = array.getJSONObject(i)
|
val o = array.getJSONObject(i)
|
||||||
val event = AutomationEventObject(injector).fromJSON(o.toString(), i)
|
val event = AutomationEventObject(injector).fromJSON(o.toString())
|
||||||
automationEvents.add(event)
|
automationEvents.add(event)
|
||||||
}
|
}
|
||||||
} catch (e: JSONException) {
|
} catch (e: JSONException) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
automationEvents.add(AutomationEventObject(injector).fromJSON(event, 0))
|
automationEvents.add(AutomationEventObject(injector).fromJSON(event))
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun processActions() {
|
internal fun processActions() {
|
||||||
|
@ -309,7 +309,6 @@ class AutomationPlugin @Inject constructor(
|
||||||
@Synchronized
|
@Synchronized
|
||||||
fun add(event: AutomationEventObject) {
|
fun add(event: AutomationEventObject) {
|
||||||
automationEvents.add(event)
|
automationEvents.add(event)
|
||||||
event.position = automationEvents.size - 1
|
|
||||||
rxBus.send(EventAutomationDataChanged())
|
rxBus.send(EventAutomationDataChanged())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,14 +337,6 @@ class AutomationPlugin @Inject constructor(
|
||||||
rxBus.send(EventAutomationDataChanged())
|
rxBus.send(EventAutomationDataChanged())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Synchronized
|
|
||||||
fun removeAt(index: Int) {
|
|
||||||
if (index >= 0 && index < automationEvents.size) {
|
|
||||||
automationEvents.removeAt(index)
|
|
||||||
rxBus.send(EventAutomationDataChanged())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
fun remove(event: AutomationEvent) {
|
fun remove(event: AutomationEvent) {
|
||||||
automationEvents.remove(event)
|
automationEvents.remove(event)
|
||||||
|
|
|
@ -57,7 +57,7 @@ class EditEventDialog : BaseDialog() {
|
||||||
// load data from bundle
|
// load data from bundle
|
||||||
(savedInstanceState ?: arguments)?.let { bundle ->
|
(savedInstanceState ?: arguments)?.let { bundle ->
|
||||||
position = bundle.getInt("position", -1)
|
position = bundle.getInt("position", -1)
|
||||||
bundle.getString("event")?.let { event = AutomationEventObject(injector).fromJSON(it, position) }
|
bundle.getString("event")?.let { event = AutomationEventObject(injector).fromJSON(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
onCreateViewGeneral()
|
onCreateViewGeneral()
|
||||||
|
|
|
@ -54,7 +54,7 @@ class AutomationEventTest : TestBase() {
|
||||||
JSONAssert.assertEquals(eventJsonExpected, event.toJSON(), true)
|
JSONAssert.assertEquals(eventJsonExpected, event.toJSON(), true)
|
||||||
|
|
||||||
// clone
|
// clone
|
||||||
val clone = AutomationEventObject(injector).fromJSON(eventJsonExpected, 1)
|
val clone = AutomationEventObject(injector).fromJSON(eventJsonExpected)
|
||||||
|
|
||||||
// check title
|
// check title
|
||||||
assertThat(clone.title).isEqualTo(event.title)
|
assertThat(clone.title).isEqualTo(event.title)
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
id 'kotlin-parcelize'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.configuration'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:nssdk')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
|
|
||||||
//WorkManager
|
|
||||||
api "androidx.work:work-runtime-ktx:$work_version"
|
|
||||||
// Maintenance
|
|
||||||
api "androidx.gridlayout:gridlayout:$gridlayout_version"
|
|
||||||
}
|
|
34
plugins/configuration/build.gradle.kts
Normal file
34
plugins/configuration/build.gradle.kts
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("kotlin-parcelize")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.configuration"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:nssdk"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
|
||||||
|
//WorkManager
|
||||||
|
api(Libs.AndroidX.Work.runtimeKtx)
|
||||||
|
// Maintenance
|
||||||
|
api(Libs.AndroidX.gridLayout)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -2,10 +2,10 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="units">Unidades</string>
|
<string name="units">Unidades</string>
|
||||||
<string name="setupwizard_units_prompt">Seleccione as unidades em que deseja exibir os valores</string>
|
<string name="setupwizard_units_prompt">Seleccione as unidades em que deseja exibir os valores</string>
|
||||||
<string name="next_button">Seguinte</string>
|
<string name="next_button">Avançar</string>
|
||||||
<string name="previous_button">Anterior</string>
|
<string name="previous_button">Voltar</string>
|
||||||
<string name="nav_setupwizard">Assistente de Configuração</string>
|
<string name="nav_setupwizard">Assistente de Configuração</string>
|
||||||
<string name="setupwizard_finish">TERMINAR</string>
|
<string name="setupwizard_finish">Finalizar Configuração</string>
|
||||||
<string name="welcome">Bem-vindo(a)</string>
|
<string name="welcome">Bem-vindo(a)</string>
|
||||||
<string name="welcometosetupwizard">Bem-vindo ao assistente de configuração. Vai guiá-lo(a) através do processo de instalação\n</string>
|
<string name="welcometosetupwizard">Bem-vindo ao assistente de configuração. Vai guiá-lo(a) através do processo de instalação\n</string>
|
||||||
<string name="end_user_license_agreement">Condições de Utilização</string>
|
<string name="end_user_license_agreement">Condições de Utilização</string>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<string name="diawarning">Lembre-se: novos perfis de insulina requerem diâmetro de pelo menos 5h. DIA 5–6h no novo perfil é igual ao diâmetro 3h nos antigos perfis de insulina.</string>
|
<string name="diawarning">Lembre-se: novos perfis de insulina requerem diâmetro de pelo menos 5h. DIA 5–6h no novo perfil é igual ao diâmetro 3h nos antigos perfis de insulina.</string>
|
||||||
<string name="profile">Perfil</string>
|
<string name="profile">Perfil</string>
|
||||||
<string name="doprofileswitch">Fazer Mudança De Perfil</string>
|
<string name="doprofileswitch">Fazer Mudança De Perfil</string>
|
||||||
<string name="exitwizard">Saltar assistente de configuração</string>
|
<string name="exitwizard">Sair do assistente de configuração</string>
|
||||||
<string name="setupwizard_loop_description">Pressione o botão abaixo para permitir ao AndroidAPS sugerir/fazer alterações na basal.</string>
|
<string name="setupwizard_loop_description">Pressione o botão abaixo para permitir ao AndroidAPS sugerir/fazer alterações na basal.</string>
|
||||||
<string name="setupwizard_sensitivity_description">Plugin de Sensibilidade é usado para detecção de sensibilidade e cálculos COB. Para mais info visite:</string>
|
<string name="setupwizard_sensitivity_description">Plugin de Sensibilidade é usado para detecção de sensibilidade e cálculos COB. Para mais info visite:</string>
|
||||||
<string name="setupwizard_sensitivity_url">https://wiki.aaps.app/en/latest/Configuration/Sensitivity-detection-and-COB.html</string>
|
<string name="setupwizard_sensitivity_url">https://wiki.aaps.app/en/latest/Configuration/Sensitivity-detection-and-COB.html</string>
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.constraints'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
implementation project(':database:entities')
|
|
||||||
|
|
||||||
testImplementation project(':database:impl')
|
|
||||||
testImplementation project(':implementation')
|
|
||||||
testImplementation project(':insight')
|
|
||||||
testImplementation project(':plugins:aps')
|
|
||||||
testImplementation project(':plugins:source')
|
|
||||||
testImplementation project(':pump:combo')
|
|
||||||
testImplementation project(':pump:dana')
|
|
||||||
testImplementation project(':pump:danar')
|
|
||||||
testImplementation project(':pump:danars')
|
|
||||||
testImplementation project(':pump:virtual')
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
|
|
||||||
// Phone checker
|
|
||||||
api 'com.scottyab:rootbeer-lib:0.1.0'
|
|
||||||
}
|
|
40
plugins/constraints/build.gradle.kts
Normal file
40
plugins/constraints/build.gradle.kts
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("all-open-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.constraints"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
|
||||||
|
testImplementation(project(":database:impl"))
|
||||||
|
testImplementation(project(":implementation"))
|
||||||
|
testImplementation(project(":insight"))
|
||||||
|
testImplementation(project(":plugins:aps"))
|
||||||
|
testImplementation(project(":plugins:source"))
|
||||||
|
testImplementation(project(":pump:combo"))
|
||||||
|
testImplementation(project(":pump:dana"))
|
||||||
|
testImplementation(project(":pump:danar"))
|
||||||
|
testImplementation(project(":pump:danars"))
|
||||||
|
testImplementation(project(":pump:virtual"))
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
|
||||||
|
// Phone checker
|
||||||
|
api(Libs.rootBeer)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,29 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.insulin'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core:graphview')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
implementation project(':database:entities')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
testImplementation project(':core:main')
|
|
||||||
}
|
|
29
plugins/insulin/build.gradle.kts
Normal file
29
plugins/insulin/build.gradle.kts
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.insulin"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core:graphview"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
testImplementation(project(":core:main"))
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,48 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.main'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':shared:impl')
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':database:impl')
|
|
||||||
implementation project(':core:graphview')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:nssdk')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
|
|
||||||
testImplementation project(':implementation')
|
|
||||||
testImplementation project(':plugins:insulin')
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
|
|
||||||
api "androidx.appcompat:appcompat:$appcompat_version"
|
|
||||||
api "com.google.android.material:material:$material_version"
|
|
||||||
|
|
||||||
// Actions
|
|
||||||
api "androidx.gridlayout:gridlayout:$gridlayout_version"
|
|
||||||
|
|
||||||
//SmsCommunicator
|
|
||||||
api 'com.eatthepath:java-otp:0.4.0'
|
|
||||||
api 'com.github.kenglxn.QRGen:android:3.0.1'
|
|
||||||
|
|
||||||
// Overview
|
|
||||||
api 'com.google.android.flexbox:flexbox:3.0.0'
|
|
||||||
|
|
||||||
// Food
|
|
||||||
api "androidx.work:work-runtime-ktx:$work_version"
|
|
||||||
}
|
|
48
plugins/main/build.gradle.kts
Normal file
48
plugins/main/build.gradle.kts
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.main"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":shared:impl"))
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":database:impl"))
|
||||||
|
implementation(project(":core:graphview"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:nssdk"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
|
||||||
|
testImplementation(project(":implementation"))
|
||||||
|
testImplementation(project(":plugins:insulin"))
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
|
||||||
|
api(Libs.AndroidX.appCompat)
|
||||||
|
api(Libs.Google.Android.material)
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
api(Libs.AndroidX.gridLayout)
|
||||||
|
|
||||||
|
//SmsCommunicator
|
||||||
|
api(Libs.javaOtp)
|
||||||
|
api(Libs.qrGen)
|
||||||
|
|
||||||
|
// Overview
|
||||||
|
api(Libs.Google.Android.flexbox)
|
||||||
|
|
||||||
|
// Food
|
||||||
|
api(Libs.AndroidX.Work.runtimeKtx)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,28 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.sensitivity'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':database:impl')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
}
|
|
27
plugins/sensitivity/build.gradle.kts
Normal file
27
plugins/sensitivity/build.gradle.kts
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.sensitivity"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":database:impl"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,23 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.smoothing'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
}
|
|
22
plugins/smoothing/build.gradle.kts
Normal file
22
plugins/smoothing/build.gradle.kts
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.smoothing"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,30 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.source'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':shared:impl')
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':database:impl')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:nssdk')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
}
|
|
29
plugins/source/build.gradle.kts
Normal file
29
plugins/source/build.gradle.kts
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.source"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":database:impl"))
|
||||||
|
implementation(project(":shared:impl"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:nssdk"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,55 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'app.aaps.plugins.sync'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':shared:impl')
|
|
||||||
implementation project(':database:entities')
|
|
||||||
implementation project(':database:impl')
|
|
||||||
implementation project(':core:graphview')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:nssdk')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
|
|
||||||
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
|
|
||||||
testImplementation "androidx.work:work-testing:$work_version"
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
testImplementation project(':implementation')
|
|
||||||
testImplementation project(':plugins:aps')
|
|
||||||
|
|
||||||
// OpenHuman
|
|
||||||
api "com.squareup.okhttp3:okhttp:$okhttp3_version"
|
|
||||||
api "com.squareup.retrofit2:retrofit:$retrofit2_version"
|
|
||||||
api "androidx.browser:browser:1.6.0"
|
|
||||||
api "androidx.work:work-runtime-ktx:$work_version"
|
|
||||||
api "com.google.android.material:material:$material_version"
|
|
||||||
|
|
||||||
// NSClient, Tidepool
|
|
||||||
api("io.socket:socket.io-client:2.1.0")
|
|
||||||
api "com.squareup.okhttp3:okhttp:$okhttp3_version"
|
|
||||||
api "com.squareup.okhttp3:logging-interceptor:$okhttp3_version"
|
|
||||||
api "com.squareup.retrofit2:adapter-rxjava3:$retrofit2_version"
|
|
||||||
api "com.squareup.retrofit2:converter-gson:$retrofit2_version"
|
|
||||||
|
|
||||||
api "com.google.code.gson:gson:$gson_version"
|
|
||||||
|
|
||||||
// DataLayerListenerService
|
|
||||||
api "com.google.android.gms:play-services-wearable:$play_services_wearable_version"
|
|
||||||
}
|
|
54
plugins/sync/build.gradle.kts
Normal file
54
plugins/sync/build.gradle.kts
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.aaps.plugins.sync"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":shared:impl"))
|
||||||
|
implementation(project(":database:entities"))
|
||||||
|
implementation(project(":database:impl"))
|
||||||
|
implementation(project(":core:graphview"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:nssdk"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
|
||||||
|
|
||||||
|
testImplementation(Libs.KotlinX.coroutinesTest)
|
||||||
|
testImplementation(Libs.AndroidX.Work.testing)
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
testImplementation(project(":implementation"))
|
||||||
|
testImplementation(project(":plugins:aps"))
|
||||||
|
|
||||||
|
// OpenHuman
|
||||||
|
api(Libs.Squareup.Okhttp3.okhttp)
|
||||||
|
api(Libs.Squareup.Retrofit2.retrofit)
|
||||||
|
api(Libs.AndroidX.browser)
|
||||||
|
api(Libs.AndroidX.Work.runtimeKtx)
|
||||||
|
api(Libs.AndroidX.gridLayout)
|
||||||
|
api(Libs.Google.Android.material)
|
||||||
|
|
||||||
|
// NSClient, Tidepool
|
||||||
|
api(Libs.socketIo)
|
||||||
|
api(Libs.Squareup.Okhttp3.loggingInterceptor)
|
||||||
|
api(Libs.Squareup.Retrofit2.adapterRxJava3)
|
||||||
|
api(Libs.Squareup.Retrofit2.converterGson)
|
||||||
|
api(Libs.Google.gson)
|
||||||
|
|
||||||
|
// DataLayerListenerService
|
||||||
|
api(Libs.Google.Android.PlayServices.wearable)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -116,6 +116,7 @@
|
||||||
<string name="xdrip_local_broadcasts_summary">Envoyer les glycémies et les traitements à xDrip+. La source de données \"xDrip+ Sync Follower\" doit être sélectionnée et l\'acceptation des données doit être activée dans Paramètres - Paramètres Inter-app - Accepter Glycémies/Traitements</string>
|
<string name="xdrip_local_broadcasts_summary">Envoyer les glycémies et les traitements à xDrip+. La source de données \"xDrip+ Sync Follower\" doit être sélectionnée et l\'acceptation des données doit être activée dans Paramètres - Paramètres Inter-app - Accepter Glycémies/Traitements</string>
|
||||||
<string name="xdrip_local_broadcasts_title">Activer les diffusions vers xDrip+.</string>
|
<string name="xdrip_local_broadcasts_title">Activer les diffusions vers xDrip+.</string>
|
||||||
<!-- DataBroadcast-->
|
<!-- DataBroadcast-->
|
||||||
|
<string name="data_broadcaster">Diffusue de données</string>
|
||||||
<string name="data_broadcaster_short">DD</string>
|
<string name="data_broadcaster_short">DD</string>
|
||||||
<string name="data_broadcaster_description">Diffuser des données sur l\'application G-Watch Wear de Garmin</string>
|
<string name="data_broadcaster_description">Diffuser des données sur l\'application G-Watch Wear de Garmin</string>
|
||||||
<!-- GarminPlugin -->
|
<!-- GarminPlugin -->
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
android {
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
aidl true
|
|
||||||
}
|
|
||||||
namespace 'info.nightscout.pump.combo'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core:libraries')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
|
|
||||||
// RuffyScripter
|
|
||||||
api "com.google.guava:guava:$guava_version"
|
|
||||||
}
|
|
32
pump/combo/build.gradle.kts
Normal file
32
pump/combo/build.gradle.kts
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
aidl = true
|
||||||
|
}
|
||||||
|
namespace = "info.nightscout.pump.combo"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core:libraries"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
|
||||||
|
// RuffyScripter
|
||||||
|
api(Libs.Google.guava)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,46 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core:libraries')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation(project(":pump:combov2:comboctl"))
|
|
||||||
|
|
||||||
api "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
|
||||||
api "org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version"
|
|
||||||
|
|
||||||
// This is necessary to avoid errors like these which otherwise come up often at runtime:
|
|
||||||
// "WARNING: Failed to transform class kotlinx/datetime/TimeZone$Companion
|
|
||||||
// java.lang.NoClassDefFoundError: kotlinx/serialization/KSerializer"
|
|
||||||
//
|
|
||||||
// "Rejecting re-init on previously-failed class java.lang.Class<
|
|
||||||
// kotlinx.datetime.serializers.LocalDateTimeIso8601Serializer>:
|
|
||||||
// java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/KSerializer"
|
|
||||||
//
|
|
||||||
// kotlinx-datetime higher than 0.2.0 depends on kotlinx-serialization, but that dependency
|
|
||||||
// is declared as "compileOnly". The runtime dependency on kotlinx-serialization is missing,
|
|
||||||
// causing this error. Solution is to add runtimeOnly here.
|
|
||||||
//
|
|
||||||
// Source: https://github.com/mockk/mockk/issues/685#issuecomment-907076353:
|
|
||||||
// TODO: Revisit this when upgrading kotlinx-datetime
|
|
||||||
runtimeOnly("org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinx_serialization_version")
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'info.nightscout.pump.combov2'
|
|
||||||
buildFeatures {
|
|
||||||
dataBinding true
|
|
||||||
}
|
|
||||||
}
|
|
46
pump/combov2/build.gradle.kts
Normal file
46
pump/combov2/build.gradle.kts
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "info.nightscout.pump.combov2"
|
||||||
|
buildFeatures {
|
||||||
|
dataBinding = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core:libraries"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":pump:combov2:comboctl"))
|
||||||
|
|
||||||
|
api(Libs.AndroidX.lifecycleViewmodel)
|
||||||
|
api(Libs.KotlinX.datetime)
|
||||||
|
|
||||||
|
// This is necessary to avoid errors like these which otherwise come up often at runtime:
|
||||||
|
// "WARNING: Failed to transform class kotlinx/datetime/TimeZone$Companion
|
||||||
|
// java.lang.NoClassDefFoundError: kotlinx/serialization/KSerializer"
|
||||||
|
//
|
||||||
|
// "Rejecting re-init on(previously-failed class java.lang.Class<
|
||||||
|
// kotlinx.datetime.serializers.LocalDateTimeIso8601Serializer>:
|
||||||
|
// java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/KSerializer"
|
||||||
|
//
|
||||||
|
// kotlinx-datetime higher than 0.2.0 depends on kotlinx-serialization, but that dependency
|
||||||
|
// is declared as "compileOnly". The runtime dependency on kotlinx-serialization is missing,
|
||||||
|
// causing this error. Solution is to add runtimeOnly here.
|
||||||
|
//
|
||||||
|
// Source: https://github.com/mockk/mockk/issues/685#issuecomment-907076353:
|
||||||
|
// TODO: Revisit this when upgrading kotlinx-datetime
|
||||||
|
runtimeOnly(Libs.KotlinX.serializationCore)
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,34 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'info.nightscout.comboctl'
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
kotlin.srcDirs += ['src/commonMain/kotlin', 'src/androidMain/kotlin']
|
|
||||||
manifest.srcFile 'src/androidMain/AndroidManifest.xml'
|
|
||||||
}
|
|
||||||
test {
|
|
||||||
kotlin.srcDirs += ['src/jvmTest/kotlin']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation platform("org.jetbrains.kotlin:kotlin-bom")
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version"
|
|
||||||
implementation "androidx.core:core-ktx:$core_version"
|
|
||||||
testImplementation 'org.jetbrains.kotlin:kotlin-test'
|
|
||||||
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
|
|
||||||
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
|
|
||||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_version"
|
|
||||||
}
|
|
30
pump/combov2/comboctl/build.gradle.kts
Normal file
30
pump/combov2/comboctl/build.gradle.kts
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "info.nightscout.comboctl"
|
||||||
|
sourceSets.getByName("main") {
|
||||||
|
kotlin.srcDir("src/commonMain/kotlin")
|
||||||
|
kotlin.srcDir("src/androidMain/kotlin")
|
||||||
|
manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
||||||
|
}
|
||||||
|
sourceSets.getByName("test") {
|
||||||
|
kotlin.srcDir("src/jvmTest/kotlin")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
api(Libs.KotlinX.coroutinesCore)
|
||||||
|
api(Libs.KotlinX.datetime)
|
||||||
|
api(Libs.AndroidX.core)
|
||||||
|
|
||||||
|
testImplementation(kotlin("test"))
|
||||||
|
testImplementation(Libs.kotlinTestRunner)
|
||||||
|
testRuntimeOnly(Libs.JUnit.jupiterEngine)
|
||||||
|
}
|
|
@ -1,41 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
|
|
||||||
android {
|
|
||||||
|
|
||||||
namespace 'info.nightscout.pump.dana'
|
|
||||||
defaultConfig {
|
|
||||||
kapt {
|
|
||||||
arguments {
|
|
||||||
arg("room.incremental", "true")
|
|
||||||
arg("room.schemaLocation", "$projectDir/schemas")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core:libraries')
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
|
|
||||||
api "androidx.room:room-ktx:$room_version"
|
|
||||||
api "androidx.room:room-runtime:$room_version"
|
|
||||||
api "androidx.room:room-rxjava3:$room_version"
|
|
||||||
kapt "androidx.room:room-compiler:$room_version"
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
testImplementation project(':core:main') // create profile from json
|
|
||||||
}
|
|
40
pump/dana/build.gradle.kts
Normal file
40
pump/dana/build.gradle.kts
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
|
||||||
|
namespace = "info.nightscout.pump.dana"
|
||||||
|
defaultConfig {
|
||||||
|
kapt {
|
||||||
|
arguments {
|
||||||
|
arg("room.incremental", "true")
|
||||||
|
arg("room.schemaLocation", "$projectDir/schemas")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core:libraries"))
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
|
||||||
|
api(Libs.AndroidX.Room.room)
|
||||||
|
api(Libs.AndroidX.Room.runtime)
|
||||||
|
api(Libs.AndroidX.Room.rxJava3)
|
||||||
|
kapt(Libs.AndroidX.Room.compiler)
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
testImplementation(project(":core:main")) // create profile from json
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
|
@ -1,29 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'kotlin-allopen'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
||||||
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
|
||||||
android {
|
|
||||||
namespace 'info.nightscout.androidaps.danar'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core:interfaces')
|
|
||||||
implementation project(':core:main')
|
|
||||||
implementation project(':core:utils')
|
|
||||||
implementation project(':core:ui')
|
|
||||||
implementation project(':core:validators')
|
|
||||||
implementation project(':pump:dana')
|
|
||||||
|
|
||||||
api 'androidx.media3:media3-common:1.1.1'
|
|
||||||
|
|
||||||
testImplementation project(':shared:tests')
|
|
||||||
testImplementation project(':core:main')
|
|
||||||
}
|
|
29
pump/danar/build.gradle.kts
Normal file
29
pump/danar/build.gradle.kts
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("android-module-dependencies")
|
||||||
|
id("test-module-dependencies")
|
||||||
|
id("jacoco-module-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "info.nightscout.androidaps.danar"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core:interfaces"))
|
||||||
|
implementation(project(":core:main"))
|
||||||
|
implementation(project(":core:utils"))
|
||||||
|
implementation(project(":core:ui"))
|
||||||
|
implementation(project(":core:validators"))
|
||||||
|
implementation(project(":pump:dana"))
|
||||||
|
|
||||||
|
api(Libs.AndroidX.media3)
|
||||||
|
|
||||||
|
testImplementation(project(":shared:tests"))
|
||||||
|
testImplementation(project(":core:main"))
|
||||||
|
|
||||||
|
kapt(Libs.Dagger.compiler)
|
||||||
|
kapt(Libs.Dagger.androidProcessor)
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue