Skip to content

Commit

Permalink
2.0.8(21) (#22)
Browse files Browse the repository at this point in the history
* changed home background

* add datastore to save if user signed in

* add ExpandableSearchBar.kt to TravellersActivity.kt

* fix fab on travellers activity

* Fix uploading photo to firestore and set sdk_version = 32

* update CI/CD

* update CI/CD

* update gradle and README.md

* update gradle and dependencies

* remove deprecated on back pressed and replaced with a new approach

* remove deprecated on back pressed and replaced with a new approach

* replaced deprecated getParcelable and getPackageInfo methods

* upgraded koin and okhttp version

* upgraded firebase_bom_version

* Fix updating the the number of visited countries

* upgrade koin version

* add org.gradle.unsafe.configuration-cache-problems=warn

* increment version to 2.0.8(21)

* increment java version to 17 in ci/cd

* Update dependencies
  • Loading branch information
Turskyi authored May 22, 2023
1 parent 94aba58 commit c633e29
Show file tree
Hide file tree
Showing 32 changed files with 150 additions and 113 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up JDK environment(JDK 11)
uses: actions/setup-java@v1.4.3
with:
java-version: 11
java-version: 17

- name: Generate Release APK
run: ./gradlew assembleRelease
Expand All @@ -27,5 +27,5 @@ jobs:
appId: ${{secrets.FIREBASE_ANDROID_APPID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: testers
releaseNotes: "App Build"
releaseNotes: "Travelling Pro App Build"
file: presentation/build/outputs/apk/release/presentation-release.apk
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ after every push to the **dev** branch,
[Visual Studio App Center](https://docs.microsoft.com/en-us/appcenter/) is used to deliver new
release app bundle to **Google Play** after every push to **master** branch;

• Architectural pattern: [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel)
and
[Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html);
• Architectural pattern: [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel);

• Architecture Components:
[Paging](https://developer.android.com/topic/libraries/architecture/paging),
Expand Down Expand Up @@ -62,14 +60,19 @@ and

• Api: https://restcountries.com/#api-endpoints-v2-all;

**Code Readability:** code is easily readable such that a fellow programmer can understand the
purpose of the app, all variables, methods, and resource IDs are descriptively named such that
another developer reading the code can easily understand their function, no unnecessary blank lines,
no unused variables or methods, no commented out code.

• Screenshots:
<img src="/screenshots/device-2020-06-05-085243.png?raw=true" width="200" >
<img src="/screenshots/device-2020-06-05-085456.png?raw=true" width="200" >
<img src="/screenshots/device-2020-06-05-090524.png?raw=true" width="200" >
<img src="/screenshots/device-2020-06-28-164528.png?raw=true" width="300" >
<img src="/screenshots/device-2020-10-18-103522.png?raw=true" width="200" >
<img src="/screenshots/device-2020-10-18-103111.png?raw=true" width="200" >
<img src="/screenshots/device-2020-06-05-090129.png?raw=true" width="200" >
<img src="/screenshots/device-2020-06-05-091508.png?raw=true" width="200" >
<img src="/screenshots/device-2020-06-05-094730.png?raw=true" width="300" >
<img src="/screenshots/device-2020-06-28-162902.png?raw=true" width="400" >
<img src="screenshots/device-2020-06-05-085243.png" width="200" >
<img src="screenshots/device-2020-06-05-085456.png" width="200" >
<img src="screenshots/device-2020-06-05-090524.png" width="200" >
<img src="screenshots/device-2020-06-28-164528.png" width="300" >
<img src="screenshots/device-2020-10-18-103522.png" width="200" >
<img src="screenshots/device-2020-10-18-103111.png" width="200" >
<img src="screenshots/device-2020-06-05-090129.png" width="200" >
<img src="screenshots/device-2020-06-05-091508.png" width="200" >
<img src="screenshots/device-2020-06-05-094730.png" width="300" >
<img src="screenshots/device-2020-06-28-162902.png" width="400" >
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ buildscript {
ext {
// sdk versions
compile_sdk_version = 33
skd_preview = "UpsideDownCake"
build_tools_version = "30.0.3"
min_sdk_version = 21
target_sdk_version = 33
// last version is here [https://play.google.com/console/u/0/developers/6867856033872987263/app/4972072127034375090/releases/overview]
version_code = 20
version_name = "2.0.7"
version_code = 21
version_name = "2.0.8"
}
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:8.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21"
// Google Services plugin (used with firebase)
classpath "com.google.gms:google-services:$google_services_version"
// Crashlytics Gradle plugin
Expand Down
9 changes: 5 additions & 4 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'org.jetbrains.kotlin.android'
}

android {
Expand All @@ -16,7 +17,6 @@ android {
defaultConfig {
minSdkVersion rootProject.min_sdk_version
targetSdkVersion rootProject.target_sdk_version

buildConfigField "String", "HOST_URL", "\"${rootProject.HOST_URL}\""

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -34,11 +34,11 @@ android {
//noinspection GroovyAssignabilityCheck
//noinspection GroovyMissingReturnStatement
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
namespace 'io.github.turskyi.data'
}
Expand All @@ -65,6 +65,7 @@ dependencies {

// Preferences DataStore (SharedPreferences like APIs)
implementation("androidx.datastore:datastore-preferences:1.0.0")
implementation 'androidx.core:core-ktx:1.10.1'

// test
testImplementation "junit:junit:$junit_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ data class CountryEntity(
val shortName: String,
val name: String,
val flag: String,
// parameter to use on the "all countries" page, to show if the country was already visited
/** parameter to use on the "all countries" page, to show if the country was already visited*/
@field:JvmField
val isVisited: Boolean,
){
) {
// required empty constructor for firestore serialization
constructor() : this(0, "", "", "", false)
}
2 changes: 2 additions & 0 deletions di/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'org.jetbrains.kotlin.android'
}

android {
Expand Down Expand Up @@ -49,6 +50,7 @@ dependencies {

// Koin core features
api "io.insert-koin:koin-core:$koin_core_version"
implementation 'androidx.core:core-ktx:1.10.1'

// test
testImplementation "junit:junit:$junit_version"
Expand Down
17 changes: 0 additions & 17 deletions domain/src/main/java/io/github/turskyi/domain/models/Result.kt

This file was deleted.

39 changes: 21 additions & 18 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# global dependency versions
activity_version=1.6.1
appcompat_version=1.5.1
multidexVersion=2.0.1
koin_android_version=3.3.2
koin_core_version=3.3.2
activity_version=1.7.1
appcompat_version=1.6.1
coroutines_version=1.4.0
kotlin_version=1.7.20
retrofit_version=2.9.0
paging_version=2.1.2
material_version=1.7.0
fragment_version=1.5.5
okhttp_version=4.10.0
junit_version=4.13.2
ext_junit_version=1.1.4
espresso_version=3.5.0
gson_version=2.10
jwt_version=4.2.1
ext_junit_version=1.1.5
espresso_version=3.5.1
fragment_version=1.5.7
# The latest Firebase BoM version contains the latest versions of each Firebase Android library.
firebase_bom_version=31.1.1
firebase_ui_auth_version=8.0.2
play_services_basement_version=17.6.0
firebase_crashlytics_gradle_version=2.7.0
firebase_perf_version=1.4.1
gson_version=2.10.1
google_services_version=4.3.8
junit_version=4.13.2
jwt_version=4.4.0
koin_android_version=3.4.0
koin_core_version=3.4.0
kotlin_version=1.7.20
multidexVersion=2.0.1
material_version=1.9.0
okhttp_version=4.10.0
paging_version=2.1.2
play_services_basement_version=17.6.0
retrofit_version=2.9.0
# envirement variables
env.HOST_URL=https://restcountries.com/
env.SIGNING_KEY_DEBUG_PATH=../keystore/travelling_debug.keystore
Expand All @@ -56,4 +56,7 @@ env.SIGNING_KEY_RELEASE_KEY=travelling_release
env.SIGNING_KEY_RELEASE_KEY_PASSWORD=travelling
#configuration-cache
org.gradle.unsafe.configuration-cache=true
org.gradle.unsafe.configuration-cache-problems=warn
org.gradle.unsafe.configuration-cache-problems=warn
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
35 changes: 20 additions & 15 deletions presentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
id 'com.google.firebase.crashlytics'
id 'com.google.firebase.firebase-perf'
id 'kotlin-parcelize'
id 'org.jetbrains.kotlin.android'
}

android {
Expand All @@ -28,7 +29,7 @@ android {

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// to ensure that the translations of Firebase library are relevant to the application
resConfigs 'en'
resourceConfigurations += ['en']
}
//noinspection GroovyAssignabilityCheck
signingConfigs {
Expand Down Expand Up @@ -74,11 +75,11 @@ android {
//noinspection GroovyAssignabilityCheck
//noinspection GroovyMissingReturnStatement
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
namespace 'io.github.turskyi.travellingpro'
}
Expand All @@ -89,6 +90,8 @@ dependencies {
implementation project(":domain")
implementation project(":di")

implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.21"))

// design components
implementation "com.google.android.material:material:$material_version"

Expand All @@ -97,11 +100,11 @@ dependencies {

// android
implementation "androidx.appcompat:appcompat:$appcompat_version"
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.10.1'

// firebase
implementation 'com.google.firebase:firebase-crashlytics:18.3.2'
implementation('com.google.firebase:firebase-analytics:21.2.0') {
implementation 'com.google.firebase:firebase-crashlytics:18.3.7'
implementation('com.google.firebase:firebase-analytics:21.2.2') {
// remove advertising dependency
exclude module: "play-services-ads-identifier"
exclude module: "play-services-measurement"
Expand All @@ -110,18 +113,20 @@ dependencies {
// To show authentication page with pre-implemented authentication
implementation "com.firebaseui:firebase-ui-auth:$firebase_ui_auth_version"
// performance tracing
implementation 'com.google.firebase:firebase-perf:20.3.0'
implementation 'com.google.firebase:firebase-perf:20.3.2'
// to send notifications across devices from firebase console
implementation 'com.google.firebase:firebase-messaging:23.1.1'
implementation 'com.google.android.gms:play-services-cast-framework:21.2.0'
implementation 'com.google.firebase:firebase-messaging:23.1.2'
implementation 'com.google.android.gms:play-services-cast-framework:21.3.0'
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'

// Glide (Image caching and management)
def glideVersion = "4.14.2"
def glideVersion = "4.15.1"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
implementation "com.github.bumptech.glide:glide:$glideVersion"

// ViewModel and LiveData
def lifecycle_version = "2.5.1"
def lifecycle_version = "2.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
Expand All @@ -134,7 +139,7 @@ dependencies {
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.7'

// Recyclerview
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.0'

// CardView
implementation 'androidx.cardview:cardview:1.0.0'
Expand All @@ -152,14 +157,14 @@ dependencies {
implementation "com.google.android.gms:play-services-location:21.0.1"

// Facebook SDK
def facebookVersion = "15.2.0"
def facebookVersion = "16.0.1"
implementation "com.facebook.android:facebook-android-sdk:$facebookVersion"
implementation "com.facebook.android:facebook-share:$facebookVersion"
implementation "com.facebook.android:facebook-applinks:$facebookVersion"
implementation "com.facebook.android:facebook-login:$facebookVersion"

// used for animation
def lottieVersion = "5.2.0"
def lottieVersion = "6.0.0"
implementation "com.airbnb.android:lottie:$lottieVersion"

// Koin for Android
Expand Down
6 changes: 4 additions & 2 deletions presentation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
Expand Down Expand Up @@ -56,7 +58,7 @@
</activity>

<activity
android:name=".features.allcountries.view.ui.AllCountriesActivity"
android:name=".features.countries.view.ui.AllCountriesActivity"
android:parentActivityName=".features.home.view.ui.HomeActivity"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package io.github.turskyi.travellingpro.common.di
import io.github.turskyi.domain.interactors.CountriesInteractor
import io.github.turskyi.domain.interactors.PreferenceInteractor
import io.github.turskyi.domain.interactors.TravellersInteractor
import io.github.turskyi.travellingpro.features.allcountries.view.adapter.AllCountriesAdapter
import io.github.turskyi.travellingpro.features.allcountries.viewmodel.AllCountriesActivityViewModel
import io.github.turskyi.travellingpro.features.countries.view.adapter.AllCountriesAdapter
import io.github.turskyi.travellingpro.features.countries.viewmodel.AllCountriesActivityViewModel
import io.github.turskyi.travellingpro.features.flags.viewmodel.FlagsFragmentViewModel
import io.github.turskyi.travellingpro.features.flags.viewmodel.FriendFlagsFragmentViewModel
import io.github.turskyi.travellingpro.features.home.view.HomeAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.turskyi.travellingpro.features.allcountries.view.adapter
package io.github.turskyi.travellingpro.features.countries.view.adapter

import android.graphics.Color
import android.graphics.Paint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package io.github.turskyi.travellingpro.features.allcountries.view.adapter
package io.github.turskyi.travellingpro.features.countries.view.adapter

import android.view.View.GONE
import androidx.lifecycle.MutableLiveData
import androidx.paging.PositionalDataSource
import io.github.turskyi.domain.interactors.CountriesInteractor
import io.github.turskyi.travellingpro.utils.extensions.mapModelListToCountryList
import io.github.turskyi.travellingpro.entities.Country
import io.github.turskyi.travellingpro.utils.extensions.mapModelListToCountryList
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import java.util.*
import java.util.Timer
import kotlin.concurrent.schedule

internal class CountriesPositionalDataSource(
Expand Down
Loading

0 comments on commit c633e29

Please sign in to comment.