Skip to content

Commit

Permalink
Publish to 1.0.0 Version
Browse files Browse the repository at this point in the history
  • Loading branch information
limsaehyun authored Dec 25, 2022
2 parents 5e94b02 + f3861b2 commit 56b1b3d
Show file tree
Hide file tree
Showing 149 changed files with 2,646 additions and 1,045 deletions.
5 changes: 5 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id(BuildPlugins.KOTLIN_KAPT)
id(BuildPlugins.FIREBASE_DISTRIBUTION)
id(BuildPlugins.GOOGLE_SERVICE)
id(BuildPlugins.FIREBASE_CRASHLYTICS)
}
android {
compileSdk = ProjectProperties.COMPILE_SDK_VERSION
Expand Down Expand Up @@ -61,12 +62,16 @@ dependencies {
implementation(projects.feature.featureHome)
implementation(projects.coreDesignSystem)
implementation(projects.commonCompose)
implementation(projects.commonUtil)

implementation(Dependency.Logger.TIMBER)

implementation(Dependency.Hilt.HILT_ANDROID)
kapt(Dependency.Hilt.HILT_ANDROID_COMPILER)

implementation(Dependency.FIREBASE.FIREBASE_CRASHLYTICS)
implementation(Dependency.FIREBASE.FIREBASE_ANALYTICS)

implementation(Dependency.Kotlin.COROUTINES_CORE)
implementation(Dependency.Kotlin.COROUTINES_ANDROID)
implementation(Dependency.Kotlin.KOTLIN_STDLIB)
Expand Down
5 changes: 4 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

-keepattributes SourceFile,LineNumberTable # Keep file names and line numbers.
-keep public class * extends java.lang.Exception # Optional: Keep custom exceptions.
2 changes: 1 addition & 1 deletion app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "0.0.1-alpha",
"versionName": "0.0.2-alpha",
"outputFile": "app-release.apk"
}
],
Expand Down
12 changes: 7 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,29 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.comit.simtong">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true"
android:name=".SimTongApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@drawable/ic_logo"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.SimTongAndroid"
android:usesCleartextTraffic="true"
tools:targetApi="32">
<activity
android:name=".root.MainActivity"
android:configChanges="colorMode|uiMode|orientation|screenSize|screenLayout|keyboardHidden|locale|layoutDirection"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
Expand Down
77 changes: 0 additions & 77 deletions app/src/main/java/com/comit/simtong/handler/NetworkConnection.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Context
import android.widget.Toast
import androidx.navigation.NavController
import com.comit.domain.exception.NeedLoginException
import com.comit.domain.exception.NoConnectivityException
import com.comit.domain.exception.NoInternetException
import com.comit.domain.exception.UnknownException
import com.comit.feature_auth.utils.AuthDeepLinkKeyUtil
Expand All @@ -22,10 +23,17 @@ class SimTongExceptionHandler(
is NoInternetException -> {
Toast.makeText(context, InternetErrorMessage, Toast.LENGTH_SHORT).show()
}

is NoConnectivityException -> {
Toast.makeText(context, InternetErrorMessage, Toast.LENGTH_SHORT).show()
}

is NeedLoginException -> {
navController.navigate(
route = SimTongScreen.Auth.SIGN_IN,
)
) {
popUpTo(0)
}
}
is UnknownException -> {
navController.navigate(
Expand All @@ -34,6 +42,7 @@ class SimTongExceptionHandler(
launchSingleTop = true
}
}

else -> {
exitProcess(2)
}
Expand Down
42 changes: 26 additions & 16 deletions app/src/main/java/com/comit/simtong/root/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
package com.comit.simtong.root

import android.os.Bundle
import android.view.View
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.padding
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.luminance
import androidx.compose.ui.graphics.toArgb
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.rememberNavController
import com.comit.common.systemBarPaddings
import com.comit.common.systemBarPadding
import com.comit.core_design_system.theme.SimTongTheme
import com.comit.feature_auth.navigation.authNavigation
import com.comit.feature_home.navigation.homeNavigation
import com.comit.feature_mypage.navigation.myPageNavigation
import com.comit.navigator.SimTongRoute
import com.comit.simtong.handler.NetworkConnection
import com.comit.simtong.handler.SimTongExceptionHandler
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class MainActivity : ComponentActivity() {

private val networkCheck: NetworkConnection by lazy {
NetworkConnection(this)
}

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

WindowCompat.setDecorFitsSystemWindows(window, false)

installSplashScreen()

networkCheck.register()
super.onCreate(savedInstanceState)

setContent {
setWindowInset()

val navController = rememberNavController()

Thread.setDefaultUncaughtExceptionHandler(
Expand All @@ -50,7 +47,7 @@ class MainActivity : ComponentActivity() {
) {
NavHost(
modifier = Modifier
.padding(systemBarPaddings),
.systemBarPadding(),
navController = navController,
startDestination = SimTongRoute.Auth.name,
) {
Expand All @@ -70,9 +67,22 @@ class MainActivity : ComponentActivity() {
}
}

override fun onDestroy() {
super.onDestroy()
@Suppress("MagicNumber")
@Composable
private fun setWindowInset() {
window.statusBarColor = MaterialTheme.colors.surface.toArgb()
window.navigationBarColor = MaterialTheme.colors.surface.toArgb()

networkCheck.unregister()
@Suppress("DEPRECATION")
if (MaterialTheme.colors.surface.luminance() > 0.5f) {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
}

@Suppress("DEPRECATION")
if (MaterialTheme.colors.surface.luminance() > 0.5f) {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
}
}
}
2 changes: 2 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>

<color name="simtong_red">#FFE84045</color>
</resources>
26 changes: 10 additions & 16 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.SimTongAndroid" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:enforceNavigationBarContrast" tools:targetApi="q">false</item>
<item name="android:enforceStatusBarContrast" tools:targetApi="q">false</item>
<!-- Customize your theme here. -->

<style name="Theme.SimTongAndroid" parent="android:Theme.Material.NoActionBar" />

<style name="Theme.SimTongAndroid.Splash" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/white</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_logo</item>
<item name="postSplashScreenTheme">@style/Theme.SimTongAndroid</item>

<item name="android:statusBarColor">@color/simtong_red</item>
<item name="android:navigationBarColor">@color/simtong_red</item>
</style>
</resources>
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id(BuildPlugins.KT_LINT) version Versions.KT_LINT
id("io.gitlab.arturbosch.detekt") version "1.21.0"
id("com.android.library") version "7.2.1" apply false
id("com.android.library") version "7.3.0" apply false
id("org.jetbrains.kotlin.android") version ProjectProperties.KOTLIN_VERSION apply false
}

Expand Down Expand Up @@ -37,6 +37,7 @@ buildscript {
classpath(Dependency.GradlePlugin.GRADLE_HILT)
classpath(Dependency.GradlePlugin.GOOGLE_SERVICE)
classpath(Dependency.GradlePlugin.FIREBASE_DISTRIBUTION)
classpath(Dependency.GradlePlugin.FIREBASE_CRASHLYTICS)
}
}

Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/java/BuildPlugins.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ object BuildPlugins {
const val KT_LINT = "org.jlleitschuh.gradle.ktlint"

const val FIREBASE_DISTRIBUTION = "com.google.firebase.appdistribution"
const val FIREBASE_CRASHLYTICS = "com.google.firebase.crashlytics"
const val GOOGLE_SERVICE = "com.google.gms.google-services"

}
6 changes: 6 additions & 0 deletions buildSrc/src/main/java/Dependency.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ object Dependency {
const val GRADLE_HILT = "com.google.dagger:hilt-android-gradle-plugin:${Versions.HILT}"
const val GOOGLE_SERVICE = "com.google.gms:google-services:${Versions.GOOGLE_SERVICE}"
const val FIREBASE_DISTRIBUTION = "com.google.firebase:firebase-appdistribution-gradle:${Versions.FIREBASE_DISTRIBUTION}"
const val FIREBASE_CRASHLYTICS = "com.google.firebase:firebase-crashlytics-gradle:${Versions.GRADLE_FIREBASE_CRASHLYTICS}"
}

object FIREBASE {
const val FIREBASE_CRASHLYTICS = "com.google.firebase:firebase-crashlytics-ktx:${Versions.FIREBASE_CRASHLYTICS}"
const val FIREBASE_ANALYTICS = "com.google.firebase:firebase-analytics-ktx:${Versions.FIREBASE_ANALYTICS}"
}

object Kotlin {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/ProjectProperties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.gradle.api.JavaVersion

object ProjectProperties{
const val VERSION_CODE = 1
const val VERSION_NAME = "0.0.2-alpha"
const val VERSION_NAME = "1.0.0"

const val APPLICATION_ID = "com.comit.simtong"

Expand Down
4 changes: 4 additions & 0 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
object Versions {
const val GOOGLE_SERVICE = "4.3.10"

const val FIREBASE_DISTRIBUTION = "3.0.1"
const val GRADLE_FIREBASE_CRASHLYTICS = "2.9.2"
const val FIREBASE_CRASHLYTICS = "18.3.2"
const val FIREBASE_ANALYTICS = "21.2.0"

const val KT_LINT = "10.2.0"

Expand Down
Loading

0 comments on commit 56b1b3d

Please sign in to comment.