Readme and screenshot (#35)

- atlas weather notification fix (only for lower versions)
 - Minor lint fixes
 - Upgrade gradle dependencies to versions accepted by android 33
 - upgrade android gradle to 8.5
 - upgrade application to android 34
 - upgraded all library dependencies
 - readme.md added
 - Snapshot tests added for readme.md
 - UI corrections during snapshots
This commit is contained in:
2024-07-02 19:36:36 +01:00
committed by GitHub
parent 9df83eb083
commit 3bb2ce70fa
85 changed files with 1402 additions and 746 deletions

View File

@@ -1,7 +1,6 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'androidx.navigation.safeargs'
}
@@ -13,14 +12,12 @@ def relKeyAlias = System.getenv("RELEASE_KEY_ALIAS")
def keystorePath = System.getenv('PWD') + "/app/keystore.jks"
def keystore = file(keystorePath).exists() ? file(keystorePath) : null
android {
lintOptions {
abortOnError false
}
namespace 'com.appttude.h_mal.atlas_weather'
compileSdk = Integer.parseInt(TARGET_SDK_VERSION)
defaultConfig {
applicationId "com.appttude.h_mal.atlas_weather"
compileSdk 33
minSdkVersion 26
targetSdkVersion 33
minSdkVersion MIN_SDK_VERSION
targetSdkVersion TARGET_SDK_VERSION
versionCode 5
versionName "3.0"
testInstrumentationRunner "com.appttude.h_mal.atlas_weather.application.TestRunner"
@@ -78,20 +75,23 @@ android {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
'-Xjvm-default=enable'
'-Xjvm-default=all-compatibility'
]
}
flavorDimensions "default"
buildFeatures {
flavorDimensions = ["version"]
}
productFlavors {
atlasWeather {
dimension "version"
applicationId "com.appttude.h_mal.atlas_weather"
versionCode 5
versionName "3.0.0"
}
monoWeather {
dimension "version"
applicationId "com.appttude.h_mal.monoWeather"
versionCode 7
versionName "4.2.0"
}
@@ -108,105 +108,113 @@ android {
}
}
}
lint {
abortOnError false
}
testBuildType "debug"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.fragment:fragment:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation "com.google.android.gms:play-services-location:21.0.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
implementation 'androidx.preference:preference:1.2.1'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.1'
implementation "androidx.appcompat:appcompat:$APP_COMPAT"
implementation "com.google.android.material:material:$MATERIAL_VERSION"
implementation "androidx.constraintlayout:constraintlayout:$CONSTR_LAYOUT_VERSION"
implementation "androidx.fragment:fragment:$FRAGMENT_VERSION"
implementation "androidx.fragment:fragment-ktx:$FRAGMENT_VERSION"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
implementation "androidx.preference:preference:$PREFERENCES_VERSION"
implementation "androidx.core:core:$ANDROID_CORE"
implementation "androidx.customview:customview:$CUSTOM_VIEW"
implementation "androidx.cardview:cardview:$CARD_VIEW"
implementation "androidx.lifecycle:lifecycle-common:$ANDROID_LIFECYCLE"
implementation "androidx.lifecycle:lifecycle-livedata-core:$ANDROID_LIFECYCLE"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$ANDROID_LIFECYCLE"
implementation "androidx.lifecycle:lifecycle-viewmodel:$ANDROID_LIFECYCLE"
implementation "androidx.recyclerview:recyclerview:$RECYCLER_VIEW"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$SWIPE_REFRESH"
implementation "com.google.code.gson:gson:$GSON"
implementation "com.google.guava:guava:$GUAVA"
implementation 'io.reactivex.rxjava2:rxjava:2.2.0'
// force upgrade to 1.1.0 because its required by androidTestImplementation,
// and without this statement AGP will silently downgrade to tracing:1.0.0
implementation "androidx.tracing:tracing:1.1.0"
/ * Google play services * /
implementation "com.google.android.gms:play-services-location:$GOOGLE_PLAY_SERVICE"
/ * Unit testing * /
testImplementation 'junit:junit:4.13.2'
androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
/ * Fragment Navigation * /
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.2'
testImplementation "junit:junit:$JUNIT_VERSION"
androidTestImplementation project(path: ':app')
testRuntimeOnly "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN_VERSION"
testImplementation "org.jetbrains.kotlin:kotlin-test:$KOTLIN_VERSION"
androidTestImplementation "junit:junit:$JUNIT_VERSION"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$KOTLINX_COROUTINES"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$KOTLINX_COROUTINES"
testImplementation "androidx.cardview:cardview:$CARD_VIEW"
testImplementation "com.tomtom.online:sdk-maps-ui-extensions:$TOMTOM_MAP"
/ * Navigation * /
implementation "androidx.navigation:navigation-common:$NAVIGATION_VERSION"
implementation "androidx.navigation:navigation-fragment:$NAVIGATION_VERSION"
implementation "androidx.navigation:navigation-runtime:$NAVIGATION_VERSION"
implementation "androidx.navigation:navigation-ui:$NAVIGATION_VERSION"
/ * android unit testing and espresso * /
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation "androidx.test:core:1.5.0"
/ * Android Espresso * /
def testJunitVersion = "1.1.5"
def testRunnerVersion = "1.5.2"
def espressoVersion = "3.5.1"
androidTestImplementation "androidx.test.ext:junit:$testJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espressoVersion"
implementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion"
androidTestImplementation "androidx.test:runner:$testRunnerVersion"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
androidTestImplementation "org.hamcrest:hamcrest:2.2"
androidTestImplementation "androidx.test:rules:$ANDROIDX_TEST"
androidTestImplementation "androidx.test:core:$ANDROIDX_TEST"
androidTestImplementation "androidx.test:monitor:$TEST_MONITOR"
androidTestImplementation "androidx.test.ext:junit:$TEST_JUNIT_VERSION"
androidTestRuntimeOnly "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN_VERSION"
androidTestImplementation "androidx.test.espresso:espresso-core:$ESPRESSO_VERSION"
androidTestImplementation "androidx.test.espresso:espresso-idling-resource:$ESPRESSO_VERSION"
androidTestImplementation "androidx.test:runner:$TEST_RUNNER_VERSION"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$ESPRESSO_VERSION"
androidTestImplementation "org.hamcrest:hamcrest:$HAMCREST_VERSION"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$KOTLINX_COROUTINES"
androidTestImplementation "androidx.cardview:cardview:$CARD_VIEW"
androidTestImplementation 'com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:3.1.2'
androidTestImplementation "com.tomtom.online:sdk-maps-ui-extensions:$TOMTOM_MAP"
androidTestImplementation "org.jetbrains.kotlin:kotlin-test:$KOTLIN_VERSION"
atlasWeatherImplementation "androidx.cardview:cardview:$CARD_VIEW"
/ * mock websever for testing retrofit responses * /
testImplementation "com.squareup.okhttp3:mockwebserver:4.6.0"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
/ * mockito and livedata testing * /
testImplementation 'org.mockito:mockito-inline:2.13.0'
implementation 'androidx.arch.core:core-testing:2.2.0'
testImplementation "org.mockito:mockito-inline:$MOKITO_INLINE_VERSION"
testImplementation "androidx.arch.core:core-testing:$CORE_TEST_VERSION"
androidTestImplementation "androidx.arch.core:core-testing:$CORE_TEST_VERSION"
/ * MockK * /
def mockk_ver = "1.10.5"
testImplementation "io.mockk:mockk:$mockk_ver"
androidTestImplementation "io.mockk:mockk-android:$mockk_ver"
/ * Retrofit * /
def retrofit_ver = "2.9.0"
implementation "com.squareup.retrofit2:retrofit:$retrofit_ver"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_ver"
implementation "com.squareup.okhttp3:logging-interceptor:4.9.0"
/ * Shared prefs * /
def prefs_ver = "1.2.0"
implementation "androidx.preference:preference-ktx:$prefs_ver"
/ *Kodein Dependency Injection * /
def kodein_version = "6.2.1"
implementation "org.kodein.di:kodein-di-generic-jvm:$kodein_version"
implementation "org.kodein.di:kodein-di-framework-android-x:$kodein_version"
testImplementation "io.mockk:mockk:$MOCKK_VERSION"
androidTestImplementation "io.mockk:mockk-android:$MOCKK_VERSION"
/ * Retrofit & Okhttp * /
implementation "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION"
implementation "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION"
implementation "com.squareup.okhttp3:logging-interceptor:$OKHTTP_VERSION"
implementation "com.squareup.okhttp3:okhttp:$OKHTTP_VERSION"
/ * Kodein Dependency Injection * /
implementation "org.kodein.di:kodein-di-generic-jvm:$KODEIN_VERSION"
implementation "org.kodein.di:kodein-di-framework-android-x:$KODEIN_VERSION"
implementation "org.kodein.di:kodein-di-core-jvm:$KODEIN_VERSION"
implementation "org.kodein.di:kodein-di-framework-android-core:$KODEIN_VERSION"
/ * Room database * /
def room_version = "2.4.3"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
runtimeOnly "androidx.room:room-runtime:$ROOM_VERSION"
kapt "androidx.room:room-compiler:$ROOM_VERSION"
implementation "androidx.room:room-ktx:$ROOM_VERSION"
implementation "androidx.room:room-common:$ROOM_VERSION"
implementation 'androidx.sqlite:sqlite:2.2.0'
/ * Picasso * /
implementation 'com.squareup.picasso:picasso:2.71828'
/ * coroutine * /
def coroutine_version = "1.3.9"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version"
runtimeOnly "org.jetbrains.kotlinx:kotlinx-coroutines-android:$KOTLINX_COROUTINES"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$KOTLINX_COROUTINES"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$KOTLINX_COROUTINES"
/ * tomtom search * /
def tomtom_version = "2.4771"
implementation "com.tomtom.online:sdk-search:$tomtom_version"
implementation "com.tomtom.online:sdk-maps:2.4807"
/ * coroutines support for firebase operations * /
def coroutines_google_ver = "1.6.4"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutines_google_ver"
implementation "com.tomtom.online:sdk-search:$TOMTOM_SEARCH"
implementation "com.tomtom.online:sdk-maps:$TOMTOM_MAP"
implementation "com.tomtom.online:sdk-search-core:$TOMTOM_SEARCH"
monoWeatherImplementation "com.tomtom.online:sdk-maps-ui-extensions:$TOMTOM_MAP"
implementation "com.tomtom.online:sdk-search-core:$TOMTOM_SEARCH"
/ * Picasso * /
implementation 'com.squareup.picasso:picasso:2.71828'
/ * screenshot library * /
androidTestImplementation 'tools.fastlane:screengrab:2.1.1'
/ * Permissions dispatcher * /
def dispatcher_ver = "4.9.2"
implementation "com.github.permissions-dispatcher:permissionsdispatcher:${dispatcher_ver}"
kapt "com.github.permissions-dispatcher:permissionsdispatcher-processor:${dispatcher_ver}"
implementation "com.github.permissions-dispatcher:permissionsdispatcher:$PERMISSIONS_DISPATCHER"
kapt "com.github.permissions-dispatcher:permissionsdispatcher-processor:$PERMISSIONS_DISPATCHER"
implementation "com.github.permissions-dispatcher:permissionsdispatcher-annotation:$PERMISSIONS_DISPATCHER"
}