From 9604a25585dde7c26b83cfc1172c89cc08989b0c Mon Sep 17 00:00:00 2001 From: Avior Date: Sun, 8 Jan 2023 00:27:30 +0100 Subject: [PATCH] misc: Comments and cleanup --- README.md | 10 +++--- app/build.gradle.kts | 34 ++++++++---------- app/src/main/AndroidManifest.xml | 55 +++++------------------------ build.gradle.kts | 6 ++++ charts/src/main/AndroidManifest.xml | 4 +-- 5 files changed, 36 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index 3c0c900..8cf4091 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,13 @@ No Ads, no tracking. Permissions requests are for specifics usage and are only requests the first time they are needed: -| Permission | Why is it requested | -|:----------------------:|:-----------------------------------------------------------------| -| ACTIVITY_RECOGNITION | Device Steps Usage | +| Permission | Why is it requested | +|:--------------------:|:-----------------------------------------------------------| +| ACTIVITY_RECOGNITION | Device Steps Usage | + | INTERNET | Food fetching from OpenFoodFact | +| POST_NOTIFICATIONS | send notifications for water intake and device steps usage | -No other permissions are used (even the internet permission ;)). +No other permissions are used. ## Build diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d272414..70f4dc3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,8 +1,13 @@ import java.util.Properties plugins { + // Android Application? id("com.android.application") + + // Support for kotlin in Android kotlin("android") + + // Data Injection id("dagger.hilt.android.plugin") // Safe Navigation @@ -15,12 +20,16 @@ plugins { kotlin("kapt") } +// The application ID val appID = "com.dzeio.openhealth" -// Languages +// the application supported languages val locales = listOf("en", "fr") +// minimum application required SDK version to run val sdkMin = 21 + +// target SDK version val sdkTarget = 33 android { @@ -122,8 +131,8 @@ android { dependencies { // Dzeio Charts implementation(project(":charts")) -// implementation(project(":CrashHandler")) + // Dzeio Crash Handler implementation("com.dzeio:crashhandler:1.0.1") // Core dependencies @@ -135,8 +144,6 @@ dependencies { implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.1") implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1") -// implementation("com.github.Aviortheking:crashhandler:0.2.3") - // Coroutines implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4") @@ -154,34 +161,21 @@ dependencies { implementation("androidx.paging:paging-runtime:3.1.1") implementation("androidx.paging:paging-runtime-ktx:3.1.1") - // Services implementation("androidx.work:work-runtime-ktx:2.7.1") // Tests testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.4") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0") + androidTestImplementation("androidx.test.ext:junit:1.1.5") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") // Graph implementation("com.github.PhilJay:MPAndroidChart:v3.1.0") - // Graphs test 2 - implementation("com.github.HackPlan:AndroidCharts:1.0.4") - // Hilt implementation("com.google.dagger:hilt-android:2.44.2") kapt("com.google.dagger:hilt-compiler:2.44.2") - // Google Fit -// implementation("com.google.android.gms:play-services-fitness:21.1.0") -// implementation("com.google.android.gms:play-services-auth:20.4.0") -// implementation("androidx.health.connect:connect-client:1.0.0-alpha08") - - // Samsung Health -// implementation(files("libs/samsung-health-data-1.5.0.aar")) -// implementation("com.google.code.gson:gson:2.9.1") - // ROOM implementation("androidx.room:room-runtime:2.4.3") kapt("androidx.room:room-compiler:2.4.3") @@ -196,7 +190,7 @@ dependencies { // OSS Licenses implementation("com.google.android.gms:play-services-oss-licenses:17.0.0") - // Open Food Fact + // Retrofit (Open Food Fact) implementation("com.squareup.retrofit2:retrofit:2.9.0") implementation("com.squareup.retrofit2:converter-gson:2.9.0") implementation("com.squareup.okhttp3:logging-interceptor:4.9.1") diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e0cbd1e..6b22022 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,24 +1,14 @@ - + + - + - - - - - + - - - - - - - - - - - - + + + @@ -61,26 +44,12 @@ android:name="com.google.android.gms.oss.licenses.OssLicensesActivity" android:theme="@style/Theme.OpenHealth" /> - - - - - - - - - - - + + - - - - - - diff --git a/build.gradle.kts b/build.gradle.kts index 6e93feb..42f8c76 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { dependencies { + // Data Injection classpath("com.google.dagger:hilt-android-gradle-plugin:2.40.5") // Safe Navigation @@ -12,11 +13,16 @@ buildscript { } plugins { + // android app plugin ? (tbh idk what thoses "plugins" does) id("com.android.application") version "7.3.1" apply false + // is it a lib? no, do I need it? IDK id("com.android.library") version "7.3.1" apply false + + // add kotlin compatibility :> id("org.jetbrains.kotlin.android") version "1.6.21" apply false } +// Cleanup the build directories task("clean") { delete(rootProject.buildDir) delete(project.buildDir) diff --git a/charts/src/main/AndroidManifest.xml b/charts/src/main/AndroidManifest.xml index 8bdb7e1..78c3e85 100644 --- a/charts/src/main/AndroidManifest.xml +++ b/charts/src/main/AndroidManifest.xml @@ -1,4 +1,2 @@ - - - +