Skip to content

Commit

Permalink
Merge pull request #86 from Nexters/release/1.0.0
Browse files Browse the repository at this point in the history
[Release] 1.0.0 배포 - master
  • Loading branch information
ham2174 authored Feb 22, 2024
2 parents 6116b41 + 733ed01 commit ed11285
Show file tree
Hide file tree
Showing 273 changed files with 11,856 additions and 83 deletions.
22 changes: 18 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# https://editorconfig.org/
# This configuration is used by ktlint when spotless invokes it
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = unset
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
tab_width = unset

[*.{yaml,yml}]
tab_width = 2
indent_size = 2

[*.{kt,kts}]
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
indent_size = 4
tab_width = 4
ktlint_code_style = android_studio
ktlint_function_naming_ignore_when_annotated_with=Composable, Test
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Issue Template
about: 이슈 템플릿
title: "[Type] 이슈 내용"
labels: ''
assignees: ''

---

## ISSUE
-

## To-Do
- [ ] 작업할 내용
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## 관련 이슈
- closed #이슈넘버

## 작업한 내용
-

## PR 포인트
-

## 🚀Next Feature
72 changes: 72 additions & 0 deletions .github/workflows/PR_Builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Hous PR Builder

on:
pull_request:
branches: [ develop, master ]

jobs:
build:
name: PR Checker
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Gradle cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

# - name: Create Google-Services.json
# env:
# GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }}
# run: |
# touch ./app/google-services.json
# echo $GOOGLE_SERVICES >> ./app/google-services.json
# cat ./app/google-services.json
#
- name: Create Local Properties
run: touch local.properties

- name: Access Local Properties
env:
FUNCH_DEBUG_BASE_URL: ${{ secrets.FUNCH_DEBUG_BASE_URL }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
STORE_FILE: ${{ secrets.STORE_FILE }}
run: |
echo FUNCH_DEBUG_BASE_URL=\"FUNCH_DEBUG_BASE_URL\" >> local.properties
echo STORE_PASSWORD= $STORE_PASSWORD >> local.properties
echo KEY_PASSWORD= $KEY_PASSWORD >> local.properties
echo KEY_ALIAS= $KEY_ALIAS >> local.properties
echo STORE_FILE= $STORE_FILE >> local.properties
- name: Create Key Store
env:
KEY_STORE_BASE_64: ${{secrets.KEY_STORE_BASE_64}}
run: |
echo "$KEY_STORE_BASE_64" | base64 -d > ./funch_key_store.jks
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Lint Check
run: ./gradlew ktlintCheck

- name: run rest
run: ./gradlew test

- name: Build with Gradle
run: ./gradlew build
91 changes: 66 additions & 25 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
import java.io.FileInputStream
import org.jetbrains.kotlin.konan.properties.Properties

plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.funch.application)
alias(libs.plugins.funch.compose)
// alias(libs.plugins.google.services)
// alias(libs.plugins.app.distribution)
// alias(libs.plugins.crashlytics)
}

android {
namespace = "com.moya.punch"
compileSdk = 34
namespace = "com.moya.funch"

packaging {
resources.excludes.add("META-INF/LICENSE*")
}

defaultConfig {
applicationId = "com.moya.punch"
minSdk = 28
targetSdk = 34
versionCode = 1
versionName = "1.0"
applicationId = "com.moya.funch"
versionCode = libs.versions.versionCode.get().toInt()
versionName = libs.versions.appVersion.get()
}

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
signingConfigs {
create("release") {
Properties().apply {
load(FileInputStream(rootProject.file("local.properties")))
storeFile = rootProject.file(this["STORE_FILE"] as String)
keyAlias = this["KEY_ALIAS"] as String
keyPassword = this["KEY_PASSWORD"] as String
storePassword = this["STORE_PASSWORD"] as String
}
}
}

buildTypes {
Expand All @@ -25,23 +41,48 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
// core
implementation(projects.core.designsystem)
implementation(projects.core.domain)
implementation(projects.core.data)
implementation(projects.core.datastore)
// feature
implementation(projects.feature.profile)
implementation(projects.feature.home)
implementation(projects.feature.match)
implementation(projects.feature.onboarding)
// implementation(libs.coil.core)
implementation(libs.startup)
// implementation(libs.security)
implementation(libs.splash.screen)

// Google
// implementation(libs.google.android.gms)

implementation(libs.core.ktx)
implementation(libs.appcompat)
implementation(libs.material)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
}
// Third Party
implementation(libs.compose.lottie)
implementation(libs.coil.core)
// implementation(libs.kakao.login)
implementation(libs.bundles.retrofit)
implementation(libs.lifecycle)
implementation(libs.activity.compose)
implementation(platform(libs.compose.bom))
implementation(libs.ui)
implementation(libs.ui.graphics)
implementation(libs.ui.tooling.preview)
implementation(libs.material3.compose)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(libs.ui.test.junit4)
debugImplementation(libs.ui.tooling)
debugImplementation(libs.ui.test.manifest)

// Firebase
// implementation(platform(libs.firebase))
// implementation(libs.bundles.firebase)
}
26 changes: 21 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,31 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".FunchApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/ic_funch_logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/ic_funch_logo_round"
android:supportsRtl="true"
android:theme="@style/Theme.PunchAOS"
tools:targetApi="31" />
android:theme="@style/Theme.FunchAOS.Splash"
android:usesCleartextTraffic="true"
tools:targetApi="34">
<activity
android:name=".MainActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.FunchAOS.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
</manifest>
Binary file added app/src/main/ic_funch_logo-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions app/src/main/java/com/moya/funch/FunchApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.moya.funch

import android.app.Application
import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber

@HiltAndroidApp
class FunchApplication : Application() {
override fun onCreate() {
super.onCreate()
initTimber()
}

private fun initTimber() {
if (BuildConfig.DEBUG) {
Timber.plant(
object : Timber.DebugTree() {
override fun createStackElementTag(element: StackTraceElement): String {
return "${element.fileName} : ${element.lineNumber} - ${element.methodName}"
}
}
)
}
}
}
46 changes: 46 additions & 0 deletions app/src/main/java/com/moya/funch/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.moya.funch

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import com.moya.funch.datastore.UserDataStore
import com.moya.funch.splash.LoadingScreen
import com.moya.funch.theme.FunchTheme
import com.moya.funch.ui.FunchApp
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
import kotlinx.coroutines.delay

@AndroidEntryPoint
class MainActivity : ComponentActivity() {

@Inject
lateinit var dataStore: UserDataStore

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
installSplashScreen()
setContent {
FunchTheme {
var showLoading by remember { mutableStateOf(true) }

LaunchedEffect(Unit) {
delay(1500)
showLoading = false
}

if (showLoading) {
LoadingScreen()
} else {
FunchApp(dataStore = dataStore)
}
}
}
}
}
38 changes: 38 additions & 0 deletions app/src/main/java/com/moya/funch/di/MatchModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.moya.funch.di

import com.moya.funch.repository.MatchingRepository
import com.moya.funch.repository.MatchingRepositoryImpl
import com.moya.funch.usecase.CanMatchProfileUseCase
import com.moya.funch.usecase.CanMatchProfileUseCaseImpl
import com.moya.funch.usecase.MatchProfileUseCase
import com.moya.funch.usecase.MatchProfileUseCaseImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object MatchModule {

@Module
@InstallIn(SingletonComponent::class)
interface UseCaseBinder {
@Binds
@Singleton
fun bindCanMatchUseCase(useCase: CanMatchProfileUseCaseImpl): CanMatchProfileUseCase

@Binds
@Singleton
fun bindMatchProfileUseCase(useCase: MatchProfileUseCaseImpl): MatchProfileUseCase
}

@Module
@InstallIn(SingletonComponent::class)
interface RepositoryBinder {
@Binds
@Singleton
fun bindMatchingRepository(repository: MatchingRepositoryImpl): MatchingRepository
}
}
Loading

0 comments on commit ed11285

Please sign in to comment.