Skip to content
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

#137 add detekt reviewDog test1 #138

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 17 additions & 2 deletions .github/workflows/build_on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,20 @@ jobs:
- name: Run All Unit Tests
run: ./gradlew :app:testCafeBazaarDebugUnitTest

- name: Run Detekt
run: ./gradlew detekt
detekt:
name: Check Code Quality
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@v2
with:
fetch-depth: 1
ref: ${{ github.head_ref }}

- name: detekt
uses: alaegin/Detekt-Action@v1.23.5
with:
github_token: ${{ secrets.github_token }}
detekt_config: detekt.yml
reviewdog_reporter: github-pr-review
25 changes: 14 additions & 11 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import org.jetbrains.kotlin.konan.properties.Properties
plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlin)
alias(libs.plugins.kapt)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.protobuf)
alias(libs.plugins.detekt)
Expand All @@ -23,9 +22,9 @@ android {
val properties = Properties()
val propertiesExist = rootProject.file("properties/authorization.properties").exists()
if (propertiesExist) {
properties.load(
project.rootProject.file("properties/authorization.properties").inputStream()
)
project.rootProject.file("properties/authorization.properties").inputStream().use {
properties.load(it)
}
}

defaultConfig {
Expand Down Expand Up @@ -54,9 +53,10 @@ android {
val urlProperties = Properties()
val urlsPropertiesExist = rootProject.file("properties/urls.properties").exists()
if (urlsPropertiesExist) {
urlProperties.load(
project.rootProject.file("properties/urls.properties").inputStream()
)
project.rootProject.file("properties/urls.properties").inputStream().use {
urlProperties.load(it)
}

}
val serverUrl = if (urlsPropertiesExist) {
urlProperties.getProperty("main")
Expand Down Expand Up @@ -96,9 +96,10 @@ android {
val securityPropertiesExist = rootProject.file("properties/security.properties").exists()
val keyStoreFileExist = rootProject.file("Backgroundable.jks").exists()
if (securityPropertiesExist && keyStoreFileExist) {
securityProperties.load(
project.rootProject.file("properties/security.properties").inputStream()
)
project.rootProject.file("properties/security.properties").inputStream().use {
securityProperties.load(it)
}


signingConfigs {
create("release") {
Expand Down Expand Up @@ -172,6 +173,7 @@ android {
}
buildFeatures {
compose = true
buildConfig = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
Expand Down Expand Up @@ -228,7 +230,7 @@ dependencies {

/*dagger*/
implementation(libs.dagger)
kapt(libs.daggerCompiler)
ksp(libs.daggerCompiler)

/*room*/
implementation(libs.bundles.room)
Expand Down Expand Up @@ -264,6 +266,7 @@ dependencies {

implementation(libs.appMetrica)
implementation(libs.caoc)
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

kover {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/local_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/Theme.App.Starting"
android:usesCleartextTraffic="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,7 @@ private fun SearchScreen(
if (medias.itemCount == 0 && !pagingIsLoading && medias.loadState.append.endOfPaginationReached) {
Text(
modifier = Modifier.align(Alignment.Center),
text = stringResource(
R.string.label_nothing_found_with_keyword,
queryString
)
text = stringResource(R.string.label_nothing_found_with_keyword)
)
}

Expand Down
5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion app/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<string name="label_setting">تنظیمات</string>
<string name="search_text_field_place_holder">جستجو پس زمینه</string>
<string name="label_nothing_found_with_keyword">چیزی پیدا نشد. :(</string>
<string name="label_looking_for_wallpapers_start_here">دنبال پس زمینه میگردی؟ از اینجا شروع کن</string>
<string name="label_grid_count">تعداد ستون</string>
<string name="label_theme">تم برنامه</string>
<string name="label_about_us">درباره ما</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<string name="label_search">Search</string>
<string name="label_setting">Settings</string>
<string name="search_text_field_place_holder">Search Wallpaper</string>
<string name="label_nothing_found_with_keyword">Nothing found with keyword %1$s</string>
<string name="label_looking_for_wallpapers_start_here">Looking for wallpapers? Start here</string>
<string name="label_nothing_found_with_keyword">Nothing found!</string>
<string name="label_grid_count">Grid Count</string>
<string name="label_theme">Theme</string>
<string name="label_about_us">About us</string>
Expand Down
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ org.gradle.caching=true
org.gradle.parallel=true
#Enable configuration cache
org.gradle.configuration-cache=true
org.gradle.configuration-cache-problems=warn
#Enable build config
android.defaults.buildfeatures.buildconfig=true
org.gradle.configuration-cache-problems=warn
37 changes: 18 additions & 19 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
[versions]
accompanist = "0.32.0"
accompanist = "0.34.0"
activityCompose = "1.8.2"
agp = "8.1.2"
agp = "8.3.0"
androidxJunit = "1.1.5"
appMetrica = "5.3.0"
appcompat = "1.6.1"
caoc = "2.4.0"
chucker = "4.0.0"
coilCompose = "2.5.0"
composeAnimation = "1.5.4"
composeCompiler = "1.5.8"
composeRuntime = "1.5.4"
composeUi = "1.5.4"
compsoeFoundation = "1.5.4"
coilCompose = "2.6.0"
composeAnimation = "1.6.3"
composeCompiler = "1.5.10"
composeRuntime = "1.6.3"
composeUi = "1.6.3"
compsoeFoundation = "1.6.3"
coreKtx = "1.12.0"
coroutine = "1.7.3"
dagger = "2.50"
coroutine = "1.8.0"
dagger = "2.51"
datastore = "1.0.0"
detekt = "1.23.4"
detekt = "1.23.5"
espressoCore = "3.5.1"
jacoco = "0.8.11"
javalite = "3.23.0"
junit = "5.10.1"
kotestAssertion = "5.8.0"
kotlin = "1.9.22"
kotlinxSerialization = "1.6.2"
kotlinxSerialization = "1.6.3"
kover = "0.7.4"
ksp = "1.9.22-1.0.16"
lifecycleRuntime = "2.6.2"
material3 = "1.2.0-beta02"
mockK = "1.13.8"
navigationCompose = "2.7.6"
ksp = "1.9.22-1.0.17"
lifecycleRuntime = "2.7.0"
material3 = "1.2.1"
mockK = "1.13.10"
navigationCompose = "2.7.7"
okhttp = "4.12.0"
paging = "3.2.1"
protobuf = "0.9.4"
Expand All @@ -39,7 +39,7 @@ retrofitKotlinxSerializationConverter = "1.0.0"
room = "2.6.1"
splashscreen = "1.0.1"
turbine = "1.0.0"
zoomableImageCoil = "0.7.1"
zoomableImageCoil = "0.8.0"

[libraries]
accompanistNavigationMaterial = { module = "com.google.accompanist:accompanist-navigation-material", version.ref = "accompanist" }
Expand Down Expand Up @@ -96,7 +96,6 @@ zoomableImageCoil = { module = "me.saket.telephoto:zoomable-image-coil", version
[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri May 19 10:42:08 IRST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading