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

update main #668

Merged
merged 73 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
6b0fe93
chore: change padding 16.dp to 32.dp
kosenda Jun 2, 2024
c3e5bda
Merge pull request #639 from kosenda/chore/change-transition-button-p…
kosenda Jun 2, 2024
fb49faa
feature: add lint job
kosenda Jun 2, 2024
e0868b0
test
kosenda Jun 2, 2024
28669dc
fix: config
kosenda Jun 2, 2024
72f5a59
chore: delete --path vendor/bundle
kosenda Jun 2, 2024
e057fbd
fix: add -
kosenda Jun 2, 2024
2fdb31d
fix: danger command options
kosenda Jun 2, 2024
7c3a007
chore: delete jacoco report
kosenda Jun 2, 2024
3026e0a
chore: change path
kosenda Jun 2, 2024
f66917d
test: add lint xmlReport = true
kosenda Jun 2, 2024
213fef3
test: remove inline_mode
kosenda Jun 2, 2024
62d0aa6
test
kosenda Jun 2, 2024
4fe57b8
chore: restore comment option
kosenda Jun 2, 2024
af40d9a
Merge pull request #640 from kosenda/feature/add-lint-job
kosenda Jun 2, 2024
3547483
chore: remove AndroidApplicationPlugin
kosenda Jun 2, 2024
b9e523c
Merge pull request #641 from kosenda/chore/remove-android-application…
kosenda Jun 2, 2024
744796d
feature: versionUp 2.1.0
kosenda Jun 3, 2024
e23873c
Merge pull request #642 from kosenda/feature/versionUp-LazyColumnScro…
kosenda Jun 3, 2024
8975dca
fix(deps): update dependency com.airbnb.android:showkase-annotation t…
renovate[bot] Jun 4, 2024
e298fd2
Merge pull request #643 from kosenda/renovate/showkase
kosenda Jun 4, 2024
8f0e44d
feature: apply edge to edge
kosenda Jun 4, 2024
c709747
Merge pull request #644 from kosenda/feature/license-licensedetail-ch…
kosenda Jun 4, 2024
70df416
fix(deps): update dependency com.pinterest.ktlint:ktlint-cli to v1.3.0
renovate[bot] Jun 5, 2024
7477fdf
fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-serializat…
renovate[bot] Jun 6, 2024
276d0de
Merge pull request #645 from kosenda/renovate/ktlint
kosenda Jun 6, 2024
df36132
chore(deps): update dependency com.google.devtools.ksp to v2.0.0-1.0.22
renovate[bot] Jun 6, 2024
650f208
Merge pull request #646 from kosenda/renovate/ksp
kosenda Jun 7, 2024
7939333
Merge pull request #647 from kosenda/renovate/kotlinxserializationjson
kosenda Jun 8, 2024
e00c12d
refactor: following NIA
kosenda Jun 9, 2024
399e67e
Merge pull request #650 from kosenda/refactor/settings-gradle-kts
kosenda Jun 9, 2024
452f092
refactor: move mock data and use preview parameter
kosenda Jun 9, 2024
1f5ec20
chore: fix add a line
kosenda Jun 9, 2024
fbdb291
Merge pull request #651 from kosenda/refactor/mock-convert-history-da…
kosenda Jun 9, 2024
a6a4512
Update README.md
kosenda Jun 9, 2024
d1ace69
feature: use ColumnScrollbar in ConvertHistoryDetailDialog
kosenda Jun 9, 2024
10ba931
Merge pull request #652 from kosenda/feature/convert-history-detail-d…
kosenda Jun 9, 2024
7b1c583
feature: add MoveTopButton in ConvertHistoryDetailDialog
kosenda Jun 10, 2024
23dc56f
chore(deps): update androidgradleplugin to v8.4.2
renovate[bot] Jun 10, 2024
cf626b6
Merge pull request #653 from kosenda/feature/convert-history-detail-d…
kosenda Jun 11, 2024
3fe8dc9
Merge pull request #654 from kosenda/renovate/androidgradleplugin
kosenda Jun 11, 2024
d9d693f
fix(deps): update androidxcompose to v1.6.8
renovate[bot] Jun 12, 2024
49cedc7
fix(deps): update androidxlifecycle to v2.8.2
renovate[bot] Jun 12, 2024
c662c61
chore(deps): update androidgradleplugin to v8.5.0
renovate[bot] Jun 13, 2024
9c10738
Merge pull request #655 from kosenda/renovate/androidxcompose
kosenda Jun 14, 2024
7ea5a54
Merge pull request #657 from kosenda/renovate/androidgradleplugin
kosenda Jun 14, 2024
5ecda5b
Merge pull request #656 from kosenda/renovate/androidxlifecycle
kosenda Jun 14, 2024
63e6281
chore: change log priority
kosenda Jun 17, 2024
6048f54
Merge pull request #658 from kosenda/chore/timber-restrict-error-type
kosenda Jun 17, 2024
34024a3
feature: add animation in ConvertButton
kosenda Jun 17, 2024
d9eb052
Merge pull request #659 from kosenda/feature/change-convert-button-an…
kosenda Jun 17, 2024
77170b1
fix(deps): update dependency com.google.firebase:firebase-bom to v33.1.1
renovate[bot] Jun 20, 2024
b8b664c
Merge pull request #661 from kosenda/renovate/firebasebom
kosenda Jun 23, 2024
4dcf279
chore(deps): update dependency com.google.firebase.crashlytics to v3.0.2
renovate[bot] Jun 23, 2024
dac92c5
feature: add 2 konsist test
kosenda Jun 24, 2024
3f8341e
chore: delete test code
kosenda Jun 24, 2024
1341baa
chore: fix bot warn
kosenda Jun 24, 2024
9c225ff
fix: add without
kosenda Jun 24, 2024
8c1562f
chore: add a last newline
kosenda Jun 24, 2024
31fc57c
Merge pull request #662 from kosenda/feature/apply-konsist
kosenda Jun 24, 2024
950932d
fix(deps): update dependency androidx.test:core to v1.6.0
renovate[bot] Jun 24, 2024
de3eac5
Merge pull request #663 from kosenda/renovate/androidxtestcore
kosenda Jun 25, 2024
52ff244
fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-serializat…
renovate[bot] Jun 25, 2024
00c1d65
fix(deps): update dependency androidx.test:core to v1.6.1
renovate[bot] Jun 27, 2024
e7bd9df
fix(deps): update dependency com.google.truth:truth to v1.4.3
renovate[bot] Jun 27, 2024
2dd6abb
Merge pull request #666 from kosenda/renovate/truth
kosenda Jun 28, 2024
a70450f
Merge pull request #660 from kosenda/renovate/firebasecrashlyticsplugin
kosenda Jun 29, 2024
e636afc
Merge pull request #665 from kosenda/renovate/androidxtestcore
kosenda Jun 29, 2024
1fa39dd
fix(deps): update dependency androidx.navigation:navigation-compose t…
renovate[bot] Jun 29, 2024
041eed3
Merge pull request #664 from kosenda/renovate/kotlinxserializationjson
kosenda Jun 29, 2024
28831bc
Merge pull request #628 from kosenda/renovate/androidxnavigation
kosenda Jun 29, 2024
af2fbb4
feature: versionUp v1.32(43)
kosenda Jun 29, 2024
af8563a
Merge pull request #667 from kosenda/feature/versionup-v1-32
kosenda Jun 29, 2024
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
30 changes: 26 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,25 +308,42 @@ jobs:
- set_locale_properties
- restore_and_save_gradle_cache

unit_test:
lint:
executor: android
steps:
- checkout
- check_is_skipping_vrt
- get_screenshots
- set_locale_properties
- restore_and_save_gradle_cache
- setup_bundle
- run:
name: Android lint
command: ./gradlew lint --parallel --max-workers=4
- run:
name: Ktlint check
command: ./gradlew ktlintCheck --continue --parallel --max-workers=4
- run:
name: Run danger file
command: bundle exec danger --verbose --dangerfile="Dangerfile-lint"
- slack/notify:
event: fail
template: basic_fail_1

unit_test:
executor: android
steps:
- checkout
- check_is_skipping_vrt
- get_screenshots
- set_locale_properties
- restore_and_save_gradle_cache
- setup_bundle
- unit_test:
build_variant: ProdDebug
- save_test_result
- report_jacoco
- run:
name: Run danger file
command: bundle exec danger --verbose
command: bundle exec danger --verbose --dangerfile="Dangerfile-test"
- push_compare_branch
- comment_screenshot_diff
- slack/notify:
Expand Down Expand Up @@ -381,6 +398,10 @@ workflows:
test:
jobs:
- dependencies
- lint:
context: slack-secrets
requires:
- dependencies
- unit_test:
context: slack-secrets
requires:
Expand All @@ -401,6 +422,7 @@ workflows:
- app_distribution:
context: slack-secrets
requires:
- lint
- unit_test
filters:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows_disable/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
with:
plugins_file: Gemfile
install_path: vendor/bundle
danger_file: Dangerfile
danger_file: Dangerfile-test
danger_id: danger-pr
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .idea/dictionaries/dictionary.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions Dangerfile

This file was deleted.

17 changes: 17 additions & 0 deletions Dangerfile-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"

# Warn when there is a big PR
warn("Big PR") if git.lines_of_code > 500

# Do not show out of range issues, not caused by the current PR
github.dismiss_out_of_range_messages

checkstyle_format.base_path = Dir.pwd
checkstyle_format.report 'build/reports/ktlint/ktlint-result.xml'

Dir["**/build/reports/lint-results*.xml"].each do |file_name|
android_lint.skip_gradle_task = true
android_lint.report_file = file_name
android_lint.lint(inline_mode: true)
end
5 changes: 5 additions & 0 deletions Dangerfile-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Don't let testing shortcuts get into master by accident
fail("fdescribe left in tests") if `grep -r fdescribe specs/ `.length > 1
fail("fit left in tests") if `grep -r fit specs/ `.length > 1

jacoco.report("build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml", fail_no_coverage_data_found: false)
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ source "https://rubygems.org"
git_source(:github) { |repo_name| "https://github.com/kosenda/SimpleCompoundInterestCalculation" }
gem 'danger', '~> 9.4.0'
gem "danger-checkstyle_format"
gem "danger-jacoco"
gem "danger-jacoco"
gem 'danger-android_lint'
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ https://github.com/kosenda/hiragana-converter/blob/develop/REFERENCE.md
## Image
|Conversion screen(Light)|Conversion screen(Dark)|
|:-:|:-:|
|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/af920334-fd73-40b4-803c-525d0cc64f21">|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/9a67591f-cd1e-4184-9d79-79a3f69f69af">|
|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/5ac9e2e0-461f-4401-bd13-934459f7941a">|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/f82f2f13-f117-48fd-83dc-eee19aa1318c">|

|Setting screen(Light)|Setting screen(Dark)|
|:-:|:-:|
|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/2ad5a49f-eaed-425d-8b66-83ec84223582">|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/d8d47e0e-06ea-4131-be83-cb11c2e5dcc3">|
|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/e46a5c3d-a84d-493c-88c1-21a26dfc8d2d">|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/c467a50e-f4b9-4311-bc6a-de196587de0f">|

|History screen(Light)|History screen(Dark)|
|:-:|:-:|
|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/24908a61-184b-4768-adfa-c3361d365549">|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/a7a3ef8f-cbdd-4b27-b17e-c8f7f2a3af79">|
|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/c61537ae-3733-4392-9fa8-240f6b4a659e">|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/dea7436c-3617-433c-b5fb-4310e660c69b">|

|Info screen(Light)|Info screen(Dark)|
|:-:|:-:|
|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/708f10fb-d93c-4d28-91d1-7b5a25c543ec">|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/718a2722-3ab9-48f7-95be-65efe6a9112c">|
|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/2abd8765-8db6-4df3-b558-637b90f99ed1">|<img width="280" alt="convert_screen" src="https://github.com/kosenda/hiragana-converter/assets/60963155/34326658-e6e8-479c-9e8f-584cce36cbc2">|
47 changes: 31 additions & 16 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import com.google.firebase.perf.plugin.FirebasePerfExtension
import ksnd.hiraganaconverter.kotlinOptions
import java.io.FileInputStream
import java.util.Properties

plugins {
id("hiraganaconverter.android.application")
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
id("hiraganaconverter.android.application.jacoco")
id("hiraganaconverter.android.hilt")
alias(libs.plugins.kotlin.serialization)
Expand All @@ -19,14 +22,28 @@ plugins {

android {
namespace = "ksnd.hiraganaconverter"

compileSdk = 34
defaultConfig {
applicationId = "ksnd.hiraganaconverter"
minSdk = 26
targetSdk = 34
versionCode = 43
versionName = "1.32"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
androidResources {
generateLocaleConfig = true
}

// ref: https://github.com/DroidKaigi/conference-app-2023/blob/main/app-android/build.gradle.kts
val keystorePropertiesFile = file("keystore.properties")

signingConfigs {
if (keystorePropertiesFile.exists()) {
val keystoreProperties = Properties()
Expand All @@ -39,7 +56,6 @@ android {
}
}
}

buildTypes {
release {
isShrinkResources = true
Expand All @@ -60,7 +76,6 @@ android {
}
}
}

flavorDimensions += "env"
productFlavors {
create("prod") {
Expand Down Expand Up @@ -91,17 +106,17 @@ android {
}

dependencies {
implementation(project(":feature:converter"))
implementation(project(":feature:history"))
implementation(project(":feature:info"))
implementation(project(":feature:setting"))
implementation(project(":core:analytics"))
implementation(project(":core:model"))
implementation(project(":core:resource"))
implementation(project(":core:domain"))
implementation(project(":core:data"))
implementation(project(":core:ui"))
testImplementation(project(":core:testing"))
implementation(projects.feature.converter)
implementation(projects.feature.history)
implementation(projects.feature.info)
implementation(projects.feature.setting)
implementation(projects.core.analytics)
implementation(projects.core.model)
implementation(projects.core.resource)
implementation(projects.core.domain)
implementation(projects.core.data)
implementation(projects.core.ui)
testImplementation(projects.core.testing)

implementation(libs.androidx.activity)
implementation(libs.androidx.appcompat)
Expand Down
13 changes: 5 additions & 8 deletions app/src/main/java/ksnd/hiraganaconverter/view/Application.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ private class ReleaseTree : Timber.Tree() {
message: String,
t: Throwable?,
) {
val priorityStr =
when (priority) {
Log.ERROR -> "E/"
Log.WARN -> "W/"
Log.INFO -> "I/"
Log.DEBUG -> "D/"
else -> return
}
val priorityStr = when (priority) {
Log.ERROR -> "E/"
Log.WARN -> "W/"
else -> return // Ignore other log levels
}
Firebase.crashlytics.log(
"%s%s%s".format(
priorityStr,
Expand Down
29 changes: 29 additions & 0 deletions app/src/test/java/ksnd/hiraganaconverter/KonsistTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package ksnd.hiraganaconverter

import com.lemonappdev.konsist.api.Konsist
import com.lemonappdev.konsist.api.ext.list.withNameMatching
import com.lemonappdev.konsist.api.ext.list.withoutAnnotationNamed
import com.lemonappdev.konsist.api.verify.assertFalse
import com.lemonappdev.konsist.api.verify.assertTrue
import org.junit.Test

class KonsistTest {
// ref: https://docs.konsist.lemonappdev.com/inspiration/snippets/general-snippets#id-10.-no-empty-files-allowed
@Test
fun `no empty files allowed`() {
Konsist
.scopeFromProject()
.files
.assertFalse { it.text.isEmpty() }
}

@Test
fun `functions containing 'Preview' must start with 'Preview'`() {
Konsist
.scopeFromProject()
.functions()
.withNameMatching(Regex(".*Preview.*"))
.withoutAnnotationNamed("Test")
.assertTrue { it.hasNameStartingWith("Preview") }
}
}
4 changes: 0 additions & 4 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ dependencies {

gradlePlugin {
plugins {
register("androidApplication") {
id = "hiraganaconverter.android.application"
implementationClass = "ksnd.hiraganaconverter.AndroidApplicationPlugin"
}
register("androidApplicationJacoco") {
id = "hiraganaconverter.android.application.jacoco"
implementationClass = "ksnd.hiraganaconverter.AndroidApplicationJacocoPlugin"
Expand Down

This file was deleted.

15 changes: 7 additions & 8 deletions core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ android {
}

dependencies {
implementation(project(":core:resource"))
implementation(project(":core:model"))
implementation(project(":core:domain"))
implementation(project(":core:network"))
testImplementation(project(":core:testing"))
implementation(projects.core.resource)
implementation(projects.core.model)
implementation(projects.core.domain)
implementation(projects.core.network)
implementation(projects.core.analytics)
testImplementation(projects.core.testing)

implementation(libs.androidx.dataStore.preferences)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.timber)
Expand All @@ -44,7 +46,4 @@ dependencies {
// App Review
implementation(libs.app.review)
implementation(libs.app.review.ktx)

// Analytics
implementation(project(":core:analytics"))
}
9 changes: 5 additions & 4 deletions core/domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ android {
}

dependencies {
implementation(project(":core:analytics"))
implementation(project(":core:model"))
implementation(project(":core:resource"))
testImplementation(project(":core:testing"))
implementation(projects.core.analytics)
implementation(projects.core.model)
implementation(projects.core.resource)
testImplementation(projects.core.testing)

implementation(libs.kotlinx.coroutines.android)
implementation(libs.retrofit)
implementation(libs.okhttp3)
Expand Down
Loading