Skip to content

Commit

Permalink
Merge pull request #60 from nazirjonmakhmadkulov/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
nazirjonmakhmadkulov authored Nov 25, 2024
2 parents 75d1207 + 47a3b2e commit 65f5b79
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
.externalNativeBuild
/.idea


### Store key ###
*.jks

### Android ###
# Built application files
*.apk
Expand Down
83 changes: 75 additions & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

import java.io.FileInputStream
import java.util.Properties
import kotlin.apply

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
Expand All @@ -14,12 +19,24 @@ android {
applicationId = "com.developer.valyutaapp"
minSdk = 21
targetSdk = 34
versionCode = 20
versionName = "2.5.9"
versionCode = 21
versionName = "2.6.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
}

val prop = Properties().apply {
load(FileInputStream(File(rootProject.rootDir, "local.properties")))
}

signingConfigs.create("release") {
storeFile = file("store_key.jks")
storePassword = prop.getProperty("KEYSTORE_PASSWORD")
keyAlias = prop.getProperty("KEY_ALIAS")
keyPassword = prop.getProperty("KEY_PASSWORD")
}

buildTypes {
debug {
isMinifyEnabled = false
Expand All @@ -28,15 +45,65 @@ android {
}
release {
isMinifyEnabled = false
signingConfig = signingConfigs.getByName("release")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

val googlePlay = "https://play.google.com/store/apps/dev?id=5402022606902660683"
val appGallery =
"https://appgallery.huawei.ru/#/tab/appdetailCommon%7CC109579467%7Cautomore%7Cdoublecolumncardwithstar%7C903547"
val ruStore = "https://www.rustore.ru/catalog/developer/ktgto9"

sourceSets {
named("main") {
java.srcDir("src/main/java")
java.srcDir("src/huawei/java")
java.srcDir("src/rustore/java")
}
create("google").manifest.srcFile("src/google/AndroidManifest.xml")
create("huawei").manifest.srcFile("src/huawei/AndroidManifest.xml")
create("rustore").manifest.srcFile("src/rustore/AndroidManifest.xml")
}

flavorDimensions += listOf("bundle", "type", "store")

productFlavors {
// Bundles:
create("currency") {
dimension = "bundle"
applicationId = "com.developer.valyutaapp"
}

// Types:
create("prod") {
dimension = "type"
}

create("google") {
dimension = "store"
buildConfigField("String", "MARKET_URL", "\"$googlePlay\"")
}
create("huawei") {
versionNameSuffix = ".hms"
dimension = "store"
buildConfigField("String", "MARKET_URL", "\"$appGallery\"")
}
create("rustore") {
versionNameSuffix = ".ru"
dimension = "store"
buildConfigField("String", "MARKET_URL", "\"$ruStore\"")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}

kotlin.jvmToolchain(19)
kotlinOptions.jvmTarget = "19"

buildFeatures.viewBinding = true
buildFeatures.buildConfig = true
namespace = "com.developer.currency"
Expand All @@ -58,8 +125,8 @@ dependencies {

implementation("com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.5.9")

implementation("androidx.navigation:navigation-fragment-ktx:2.8.3")
implementation("androidx.navigation:navigation-ui-ktx:2.8.3")
implementation("androidx.navigation:navigation-fragment-ktx:2.8.4")
implementation("androidx.navigation:navigation-ui-ktx:2.8.4")

// Logging:
api("com.jakewharton.timber:timber:5.0.1")
Expand Down Expand Up @@ -97,9 +164,9 @@ dependencies {

implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")

implementation("com.yandex.android:mobileads:7.6.0")
implementation("com.yandex.android:mobileads:7.7.0")

implementation(platform("com.google.firebase:firebase-bom:33.5.1"))
implementation(platform("com.google.firebase:firebase-bom:33.6.0"))
implementation("com.google.firebase:firebase-crashlytics-ktx:19.2.1")
implementation("com.google.firebase:firebase-analytics-ktx:22.1.2")
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ class BaseAdapter(private val bases: List<ItemBase<*, *>>) :
}

override fun onBindViewHolder(
holder: BaseViewHolder<ViewBinding, Item>,
position: Int,
payloads: MutableList<Any>
holder: BaseViewHolder<ViewBinding, Item>, position: Int, payloads: MutableList<Any>
) {
if (payloads.isEmpty()) {
super.onBindViewHolder(holder, position, payloads)
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/java/com/developer/currency/di/modules/Module.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import org.koin.android.ext.koin.androidApplication
import org.koin.android.ext.koin.androidContext
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.core.module.dsl.viewModelOf
import org.koin.dsl.module
import retrofit2.Retrofit
import retrofit2.converter.simplexml.SimpleXmlConverterFactory
import java.util.concurrent.TimeUnit

val viewModelModule = module {
viewModel { MainViewModel(get()) }
viewModel { HomeViewModel(get()) }
viewModel { ConverterViewModel(get()) }
viewModel { AllValutesViewModel(get()) }
viewModel { NetworkStatusViewModel() }
viewModel { ChartViewModel(get(), get()) }
viewModel { WidgetViewModel(get()) }
viewModel { SettingsViewModel() }
viewModelOf(::MainViewModel)
viewModelOf(::HomeViewModel)
viewModelOf(::ConverterViewModel)
viewModelOf(::AllValutesViewModel)
viewModelOf(::NetworkStatusViewModel)
viewModelOf(::ChartViewModel)
viewModelOf(::WidgetViewModel)
viewModelOf(::SettingsViewModel)
}

val sharedPreference = module {
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.7.2" apply false
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
id("com.google.devtools.ksp") version "2.0.20-1.0.24" apply false
id("androidx.navigation.safeargs") version "2.8.3" apply false
id("org.jetbrains.kotlin.android") version "2.0.21" apply false
id("com.google.devtools.ksp") version "2.0.21-1.0.28" apply false
id("androidx.navigation.safeargs") version "2.8.4" apply false
id("com.google.gms.google-services") version "4.4.2" apply false
id("com.google.firebase.crashlytics") version "3.0.2" apply false
id("org.jlleitschuh.gradle.ktlint") version "12.1.1" apply false
Expand Down
Binary file added docs/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/33.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/55.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 65f5b79

Please sign in to comment.