Skip to content

Commit 756ee2b

Browse files
authored
Merge pull request #10 from shinhyo/refactoring
refactoring
2 parents 0d33862 + 3185142 commit 756ee2b

File tree

119 files changed

+1163
-1336
lines changed

Some content is hidden

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

119 files changed

+1163
-1336
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://pinterest.github.io/ktlint/latest/rules/standard
2+
3+
root = true
4+
5+
[*.{kt, kts}]
6+
ktlint_code_style = ktlint_official
7+
indent_size = 4
8+
indent_style = space
9+
ij_kotlin_allow_trailing_comma = false
10+
ij_kotlin_allow_trailing_comma_on_call_site = false
11+
12+
# enabled, disabled
13+
ktlint_standard = enabled
14+
ktlint_experimental = disabled
15+
ktlint_custom-rule-set = disabled
16+
17+
max_line_length = off
18+
insert_final_newline = false
19+
20+
# ktlint_standard_multiline-expression-wrapping = disabled
21+
# ktlint_standard_import-ordering = disabled
22+
# ktlint_standard_trailing-comma-on-declaration-site = disabled

.github/workflows/Build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
- name: Copy CI gradle.properties
2626
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
2727

28-
- name: Set up JDK 11
28+
- name: Set up JDK 17
2929
uses: actions/setup-java@v3
3030
with:
3131
distribution: 'zulu'
32-
java-version: 11
32+
java-version: 17
3333

3434
- name: chmod cache key
3535
run: chmod +x ./scripts/checksum.sh

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Breaking Bad - Jetpack Compose
22
<a href='https://developer.android.com'><img src='http://img.shields.io/badge/platform-android-green.svg'/></a>
3-
<a href="https://kotlinlang.org/docs/whatsnew1720.html"><img src = "https://shields.io/badge/kotlin-1.7.20-blue" /></a>
4-
<a href="https://developer.android.com/jetpack/androidx/releases/compose#versions"><img src = "https://img.shields.io/badge/jetpack%20compose-1.2.1-brightgreen" /></a>
3+
<a href="https://kotlinlang.org/docs/whatsnew1920.html"><img src = "https://shields.io/badge/kotlin-1.9.20-blue" /></a>
4+
<a href="https://developer.android.com/jetpack/compose/bom"><img src = "https://img.shields.io/badge/jetpack%20compose-2023.10.01-brightgreen" /></a>
55
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg"/></a>
66
[![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/)
77

@@ -24,11 +24,10 @@
2424
- Clean Architecture (nowinandroid)
2525
- MVVM pattern
2626
- Kotlin Coroutines & Flows
27-
- Material Design
27+
- Material Design3
2828
- Single Activity
2929
- StaggeredVerticalGrid
3030
- [Gradle Version Catalog](https://docs.gradle.org/7.4/userguide/platforms.html)
31-
- [Accompanist](https://google.github.io/accompanist)
3231
- [Retrofit2](https://github.com/square/retrofit)
3332
- [Coil-Compose](https://coil-kt.github.io/coil/compose)
3433
- [Timber](https://github.com/JakeWharton/timber)

app/build.gradle.kts

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
plugins {
22
id("brba.android.application")
3-
id("brba.android.application.compose")
4-
id("brba.android.hilt")
53
}
64

75
android {
@@ -13,28 +11,54 @@ android {
1311
versionName = "1.0"
1412
}
1513

14+
signingConfigs {
15+
getByName("debug") {
16+
storeFile = rootProject.file("debug.keystore")
17+
storePassword = "android"
18+
keyAlias = "androiddebugkey"
19+
keyPassword = "android"
20+
}
21+
}
22+
1623
buildTypes {
24+
getByName("debug") {
25+
isDebuggable = false
26+
}
27+
1728
getByName("release") {
18-
isMinifyEnabled = false
29+
isDebuggable = false
30+
isShrinkResources = true
31+
isMinifyEnabled = true
1932
proguardFiles(
2033
getDefaultProguardFile("proguard-android-optimize.txt"),
2134
"proguard-rules.pro"
2235
)
36+
signingConfig = signingConfigs.getByName("debug")
2337
}
2438
}
39+
40+
buildFeatures {
41+
buildConfig = true
42+
}
2543
}
2644

2745
dependencies {
2846

47+
implementation(project(":core:data"))
2948
implementation(project(":core:designsystem"))
3049

31-
implementation(project(":feature:main"))
50+
implementation(project(":feature:list"))
51+
implementation(project(":feature:favorite"))
3252
implementation(project(":feature:detail"))
3353

34-
implementation(libs.material)
3554
implementation(libs.androidx.startup)
55+
implementation(libs.androidx.appcompat)
3656
implementation(libs.androidx.activity.compose)
57+
58+
implementation(libs.androidx.navigation.compose)
3759
implementation(libs.androidx.hilt.navigation.compose)
3860

61+
implementation(libs.androidx.compose.material3)
62+
3963
implementation(libs.timber)
40-
}
64+
}

app/proguard-rules.pro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile
22+
23+
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
24+
-keep,allowobfuscation,allowshrinking class retrofit2.Response
25+
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
android:label="@string/app_name"
1313
android:largeHeap="true"
1414
android:supportsRtl="true"
15+
android:enableOnBackInvokedCallback="true"
1516
android:theme="@style/Theme.BrBaCompose">
1617
<activity
1718
android:name=".app.MainActivity"

app/src/main/java/io/github/shinhyo/brba/app/BrBaApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ import android.app.Application
1919
import dagger.hilt.android.HiltAndroidApp
2020

2121
@HiltAndroidApp
22-
class BrBaApplication : Application()
22+
class BrBaApplication : Application()

app/src/main/java/io/github/shinhyo/brba/app/MainActivity.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class MainActivity : AppCompatActivity() {
2828

2929
override fun onCreate(savedInstanceState: Bundle?) {
3030
super.onCreate(savedInstanceState)
31+
3132
WindowCompat.setDecorFitsSystemWindows(window, false)
3233

3334
setContent {
@@ -36,4 +37,4 @@ class MainActivity : AppCompatActivity() {
3637
}
3738
}
3839
}
39-
}
40+
}

app/src/main/java/io/github/shinhyo/brba/app/di/CoroutinesModule.kt

Lines changed: 0 additions & 40 deletions
This file was deleted.

app/src/main/java/io/github/shinhyo/brba/app/initializer/TimberInitializer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ class TimberInitializer : Initializer<Unit> {
2727
}
2828

2929
override fun dependencies(): MutableList<Class<out Initializer<*>>> = mutableListOf()
30-
}
30+
}

0 commit comments

Comments
 (0)