Skip to content

Commit fca8bcb

Browse files
authored
Merge pull request #51 from HeyPouya/refactor/improve-code-quality
There has been many various improvements in the codebase introduced with this commit such as: * Extended modularity and modules * Added unit tests covering more than 85% of the app's code * Adaption of clean arch for future extendability * Improved image quality of stores * Made the api easier to be consumed for integrators * Fixed many minor bugs
2 parents cd27c6a + ac18adc commit fca8bcb

File tree

256 files changed

+5649
-2885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+5649
-2885
lines changed

.editorconfig

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
[*]
2-
charset=utf-8
3-
end_of_line=lf
4-
insert_final_newline=true
5-
indent_style=space
6-
indent_size=4
2+
charset = utf-8
3+
end_of_line = lf
4+
insert_final_newline = true
5+
indent_style = space
6+
indent_size = 4
77

88
[*.{kt,kts}]
9-
max_line_length = 180
9+
max_line_length = 180
10+
ktlint_function_naming_ignore_when_annotated_with = Composable
11+
ktlint_standard_string-template-indent = disabled
12+
ktlint_standard_multiline-expression-wrapping = disabled
13+
ktlint_standard_blank-line-before-declaration = disabled
14+
ktlint_standard_function-signature = disabled
15+
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
16+
ktlint_function_signature_body_expression_wrapping = default
17+
ktlint_standard_backing-property-naming = disabled

.github/workflows/android.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
- name: Grant execute permission for gradlew
2424
run: chmod +x gradlew
2525
- name: Run tests
26-
run: ./gradlew test
26+
run: ./gradlew testDebugUnitTest

README.md

+120-193
Large diffs are not rendered by default.

app/build.gradle.kts

+19-16
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
plugins {
2-
id("com.android.application")
3-
id("kotlin-android")
2+
alias(libs.plugins.androidApplication)
3+
alias(libs.plugins.jetbrainsKotlinAndroid)
4+
alias(libs.plugins.compose.compiler)
45
}
56

67
android {
78
compileSdk = libs.versions.compileSdkVersion.get().toInt()
89
defaultConfig {
9-
applicationId = "com.pouyaheydari.androidappupdater"
10-
minSdk = libs.versions.composeMinSdkVersion.get().toInt()
10+
applicationId = "com.pouyaheydari.appupdater.demo"
11+
minSdk = libs.versions.minSdkVersion.get().toInt()
1112
targetSdk = libs.versions.targetSdkVersion.get().toInt()
1213
versionCode = libs.versions.appVersion.get().toInt()
1314
versionName = libs.versions.appVersion.get()
@@ -16,17 +17,19 @@ android {
1617
useSupportLibrary = true
1718
}
1819
}
19-
namespace = "com.pouyaheydari.androidappupdater"
20+
namespace = "com.pouyaheydari.appupdater.demo"
21+
22+
compileOptions {
23+
sourceCompatibility = JavaVersion.VERSION_17
24+
targetCompatibility = JavaVersion.VERSION_17
25+
}
2026

2127
kotlinOptions {
22-
jvmTarget = "1.8"
28+
jvmTarget = JavaVersion.VERSION_17.toString()
2329
}
2430
buildFeatures {
2531
compose = true
2632
}
27-
composeOptions {
28-
kotlinCompilerExtensionVersion = libs.versions.compose.get()
29-
}
3033
packaging {
3134
resources {
3235
excludes += "/META-INF/{AL2.0,LGPL2.1}"
@@ -37,12 +40,12 @@ android {
3740
dependencies {
3841

3942
// library dependency
40-
implementation(project(":appupdater"))
41-
implementation(project(":compose"))
43+
implementation(projects.appupdater)
44+
implementation(projects.compose)
4245

4346
// support dependency
44-
implementation(libs.appcompat)
45-
implementation(libs.constraintLayout)
47+
implementation(libs.androidx.appcompat)
48+
implementation(libs.androidx.constraintLayout)
4649

4750
// compose
4851
val composeBom = platform(libs.androidx.compose.bom)
@@ -55,8 +58,8 @@ dependencies {
5558

5659
// testing dependency
5760
testImplementation(libs.junit4)
58-
androidTestImplementation(libs.androidTestJUnit)
59-
androidTestImplementation(libs.androidTestRules)
60-
androidTestImplementation(libs.androidTestEspresso)
61+
androidTestImplementation(libs.androidx.test.junit)
62+
androidTestImplementation(libs.androidx.test.rules)
63+
androidTestImplementation(libs.androidx.test.ui.espresso.core)
6164
androidTestImplementation(composeBom)
6265
}

app/src/androidTest/java/com/pouyaheydari/androidappupdater/ExampleInstrumentedTest.kt

-26
This file was deleted.

app/src/main/java/com/pouyaheydari/androidappupdater/ui/compose/theme/Color.kt

-6
This file was deleted.

app/src/main/java/com/pouyaheydari/androidappupdater/ui/compose/theme/Theme.kt

-49
This file was deleted.

app/src/main/java/com/pouyaheydari/androidappupdater/utils/GetUpdaterDSLStoreList.kt

-137
This file was deleted.

0 commit comments

Comments
 (0)