Skip to content

Improve code quality #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 117 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
abf6236
Removed the redundant when condition
Jan 5, 2024
ad7a91c
Added EMPTY state to the dialog
Jan 5, 2024
47e474f
Fixed dialog getting dismissed after configuration changed in the dem…
Jan 5, 2024
c789098
Disabled some ktlint rules after upgrading to the latest version
Jan 5, 2024
007768c
Added app theme to all compose preview functions
Jan 5, 2024
afafd19
Added DialogHeaderModel
Jan 5, 2024
6a8b9d8
Used ViewModelFactory to inject dependencies into the ViewModel
Jan 7, 2024
4f423a0
migrated compose module to MVI structure
Jan 10, 2024
6c9d901
hoisted onStoreClickListener and onDirectLinkClickListener
Jan 10, 2024
58fa3c6
Removed usages of StoreListItem in inner compose components
Jan 10, 2024
7c2833d
Moved DialogStates to appupdater module
Jan 11, 2024
ae51927
Used Composition for AppStores and moved the app store object creatio…
Jan 13, 2024
1a00572
Moved intent creation to a builder
Jan 14, 2024
19cc321
improved intent builder
Jan 14, 2024
9443da6
Added mockito dependency
Jan 14, 2024
459c265
Upgraded dependencies
Feb 5, 2024
7552913
Changed object creation to kotlin reflect
Feb 5, 2024
08b6fc9
Added StoreIntentProviderTest.kt
Feb 5, 2024
733d93c
Separated store and directdownload modules
Mar 2, 2024
2d3242d
Divided direct download and store list items into 2 different propert…
Mar 17, 2024
45e2c74
Added error callback when opening a store encounters error
Apr 10, 2024
d9aa1ef
Removed redundant comments
Apr 11, 2024
de9efc5
Updated stores test according to new changes
Apr 11, 2024
4f35bea
Moved stores to domain package
Apr 11, 2024
d0a26c4
Fixed packaging in androidTest according to the source packaging
Apr 11, 2024
d10a02e
Added tests for StoreFactory
Apr 11, 2024
b6f3906
Added tests for StoreManager
Apr 11, 2024
ac1b37b
Updated agp version
Apr 11, 2024
d7d1883
Updated mockito version
Apr 11, 2024
7d0d3b5
Updated agp version
Apr 11, 2024
6e5ac12
Updated coroutines version
Apr 11, 2024
102bb74
Updated compose and kotlin version
Apr 11, 2024
fa174b5
Removed kotlin reflect dependency
Apr 11, 2024
05cf299
Updated mockito kotlin version
Apr 11, 2024
802e5f1
Moved utils package inside ui package
Apr 15, 2024
743e742
Updated compose previews
Apr 15, 2024
df6760e
Added UI test for DividerComponent
Apr 15, 2024
8f4f91b
Upgraded min sdk version to 23
Apr 15, 2024
e0d09b6
Removed redundant manifest files
Apr 15, 2024
f2883f4
Added ui test for DirectDownloadLinkComponent
Apr 15, 2024
0fa55a3
Added padding to store list items
Apr 15, 2024
0ed3f5e
Added a 80dp fixed size for store images and max 1 lines with ellipsis
Apr 15, 2024
65c8ef8
Replaced myket png image with svg
Apr 15, 2024
2226eb5
Changed image size to 64dp
Apr 15, 2024
ca3e883
Replaced google play png image with svg
Apr 15, 2024
a83cfaf
Fixed lenovo app center icon in the preview
Apr 15, 2024
0047b44
Replaced Huawei app gallery png image with svg
Apr 15, 2024
b202657
Replaced aptoide png image with svg
Apr 15, 2024
d5b89fe
Changed ImageView size to 64dp fixed size
Apr 15, 2024
1efaf75
Added Ui tests for SquareStoreItemComponent
Apr 16, 2024
d24fd69
Added assertTextEqual to the test
Apr 16, 2024
5275087
Added @PreviewLightDark to previews
Apr 16, 2024
80e9352
Added roboelectric and moved compose component tests to test package
Apr 16, 2024
aa4ba72
Made Divider text available to set by other components
Apr 16, 2024
8d50425
Made classes internal
Apr 16, 2024
451e2e8
Converted including android resources into a single line
Apr 16, 2024
d33acec
Changed running tests on ci to testDebugUnitTest
Apr 16, 2024
04bc32c
Made dialog title and description available to be set from higher lev…
Apr 16, 2024
7106032
Added unit tests for UpdateInProgressDialogComponent
Apr 16, 2024
b329c7a
Added typeface to DialogHeaderComponent and extracted the icon to be …
Apr 16, 2024
afc506b
Added typeface to components
Apr 16, 2024
acb491e
Added unit tests for DialogHeaderComponent
Apr 16, 2024
0b73a17
Added @PreviewLightDark
Apr 16, 2024
8ee1932
Removed throwing exception
Apr 16, 2024
2c0ee69
Upgraded dependencies
Apr 21, 2024
ba5bda0
Started using version catalog for plugin dependencies
Apr 21, 2024
6a68753
Renamed AppUpdaterDialog to AppUpdaterDialogComponent
Apr 21, 2024
01f7115
Moved out the divider text to be set by the user explicitly
Apr 21, 2024
f524849
Added tests for AppUpdaterDialogComponent
Apr 23, 2024
f1e6906
added viewModel as compose function's argument to be able to inject a…
Apr 23, 2024
f845fb9
Started using TYPESAFE_PROJECT_ACCESSORS in gradle files
Apr 25, 2024
85423e6
Changed core module to a pure kotlin library
Apr 25, 2024
e48a355
Changed build to assemble in jitpack.yml to prevent running roboelect…
Apr 25, 2024
e923c73
Removed sealed to prevent this error while deploying the library: Per…
Apr 25, 2024
e535175
Used constants for the kotlin java version compatibility
Apr 25, 2024
be6cd8e
Added store and directdownload modules to jitpack.yml
Apr 25, 2024
dc3e868
Upgraded all dependencies including Kotlin to version 2.0
May 23, 2024
c4f02c6
Moved handling errors while opening a store from core to higher level…
Jun 10, 2024
ab093e8
Fixed unit test
Jun 10, 2024
05060f0
Moved StoreIntentBuilderTest too unit test package
Jun 10, 2024
ec53a20
Upgraded dependencies to the latest version
HeyPouya Jul 11, 2024
b143e1c
Removed passing viewModel into the AndroidAppUpdater compose function…
HeyPouya Jul 11, 2024
edd07bd
Upgraded dependencies
HeyPouya Jul 12, 2024
bdb4e50
Added maven publish gradle dependency and added usage for core
HeyPouya Jul 12, 2024
c61b19f
Removed publish to maven for core
HeyPouya Jul 12, 2024
65bf37d
Added maven publish gradle plugin to compose module
HeyPouya Jul 12, 2024
d010734
Added maven publish gradle plugin to main module
HeyPouya Jul 12, 2024
b4075f7
Added maven publish gradle plugin to directdownload module
HeyPouya Jul 12, 2024
85a5303
Added maven publish gradle plugin to store module
HeyPouya Jul 12, 2024
8c3eae3
Upgraded dependencies
HeyPouya Jul 29, 2024
4913141
Added tests for AndroidAppUpdaterScreen
HeyPouya Jul 29, 2024
411a28f
Upgraded dependencies
HeyPouya Oct 8, 2024
7cfe124
Fixed an issue with the direct download which was not showing the pro…
HeyPouya Nov 15, 2024
aaa39e3
Upgraded dependencies and added support for sdk v35
HeyPouya Nov 15, 2024
a394810
Cleaned up appupdater module
HeyPouya Dec 6, 2024
65466ec
Upgraded dependencies to the latest version
HeyPouya Dec 6, 2024
2297404
Moved colors out of directdownload package and changed domain layer t…
HeyPouya Dec 27, 2024
1eaf8b9
Added unit tests for usecases and repository in directdownload module
HeyPouya Dec 29, 2024
fa13379
Upgraded dependency versions
HeyPouya Dec 29, 2024
829345a
Refactored directdownload to return download state instead of a plain…
HeyPouya Dec 29, 2024
6d6bc68
Refactored directdownload module to add unit tests
HeyPouya Jan 2, 2025
1250b88
Suppressed deprecation warning in unit tests
HeyPouya Jan 2, 2025
93f6bac
Removed commented out codes
HeyPouya Jan 2, 2025
57c02ea
Refactored getting permission for downloading the apk and added unit …
HeyPouya Jan 4, 2025
9a8f0aa
Fix issue where multiple clicks on a non-available store in the dialo…
HeyPouya Jan 4, 2025
02b0b17
Upgraded dependencies to the latest version
HeyPouya Mar 20, 2025
bf59f3a
Refactored directdownload completely and added unit test for all classes
HeyPouya Mar 20, 2025
1c3081d
Updated dependency versions
HeyPouya Mar 29, 2025
a3d77ff
Fixed AndroidAppUpdaterScreenTest
HeyPouya Mar 29, 2025
354153f
Completed unit tests for compose module
HeyPouya Mar 30, 2025
55db9dc
Updated Kotlin version to 2.1.20
HeyPouya Mar 30, 2025
eca026f
Added unit tests for appupdater module
HeyPouya Mar 30, 2025
5bd9939
Fixed deprecated status bar color attribute in the demo app's theme file
HeyPouya Mar 30, 2025
24836ab
Updated styles for the demo app
HeyPouya Mar 30, 2025
eb66036
Updated the readme file
HeyPouya Apr 1, 2025
250d15b
Updated the readme file
HeyPouya Apr 4, 2025
ac18adc
Updated mockito to the latest version
HeyPouya Apr 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=4
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

[*.{kt,kts}]
max_line_length = 180
max_line_length = 180
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_string-template-indent = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_blank-line-before-declaration = disabled
ktlint_standard_function-signature = disabled
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
ktlint_function_signature_body_expression_wrapping = default
ktlint_standard_backing-property-naming = disabled
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests
run: ./gradlew test
run: ./gradlew testDebugUnitTest
313 changes: 120 additions & 193 deletions README.md

Large diffs are not rendered by default.

35 changes: 19 additions & 16 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
plugins {
id("com.android.application")
id("kotlin-android")
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.compose.compiler)
}

android {
compileSdk = libs.versions.compileSdkVersion.get().toInt()
defaultConfig {
applicationId = "com.pouyaheydari.androidappupdater"
minSdk = libs.versions.composeMinSdkVersion.get().toInt()
applicationId = "com.pouyaheydari.appupdater.demo"
minSdk = libs.versions.minSdkVersion.get().toInt()
targetSdk = libs.versions.targetSdkVersion.get().toInt()
versionCode = libs.versions.appVersion.get().toInt()
versionName = libs.versions.appVersion.get()
Expand All @@ -16,17 +17,19 @@ android {
useSupportLibrary = true
}
}
namespace = "com.pouyaheydari.androidappupdater"
namespace = "com.pouyaheydari.appupdater.demo"

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.get()
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand All @@ -37,12 +40,12 @@ android {
dependencies {

// library dependency
implementation(project(":appupdater"))
implementation(project(":compose"))
implementation(projects.appupdater)
implementation(projects.compose)

// support dependency
implementation(libs.appcompat)
implementation(libs.constraintLayout)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintLayout)

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

// testing dependency
testImplementation(libs.junit4)
androidTestImplementation(libs.androidTestJUnit)
androidTestImplementation(libs.androidTestRules)
androidTestImplementation(libs.androidTestEspresso)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.androidx.test.ui.espresso.core)
androidTestImplementation(composeBom)
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading