Skip to content

Commit

Permalink
Merge branch 'feature/module-setting' into sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
ldh019 committed Nov 9, 2022
2 parents d128440 + d4382b8 commit 325bffd
Show file tree
Hide file tree
Showing 40 changed files with 420 additions and 21 deletions.
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## 개요
내용을 적어주세요.

## 작업사항
- 내용을 적어주세요.

## 변경된 부분
- 내용을 적어주세요.

## 실행 화면


## 특이사항
- 내용을 적어주세요.
64 changes: 64 additions & 0 deletions .github/workflows/ucmcCI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: ucmc CI

on:
push:
branches: [ develop, sandbox ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create google-service
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: Build with Gradle
run: ./gradlew build
- name: Build Signed APK
uses: victorbnl/build-signed-apk@main
with:
keystore_b64: ${{ secrets.SIGN_KEY }}
keystore_password: ${{ secrets.KEY_STORE_PASSWORD }}
key_alias: ${{ secrets.ALIAS }}
key_password: ${{ secrets.KEY_STORE_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "30.0.2"
- name: signed app bundle
uses: actions/upload-artifact@v3
with:
path: ./app/build/outputs/apk/release/app-release.apk
- name: Download APK from build
uses: actions/download-artifact@v3
with:
name: artifact
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M')"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
with:
tag_name: ${{ steps.date.outputs.date }}
release_name: Release-prod-${{ steps.date.outputs.date }}
- name: Upload Release APK
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./app/build/outputs/apk/release/app-release.apk
asset_name: UCMC.apk
asset_content_type: application/zip
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
/.idea/
/.idea/
/app/release/output-metadata.json
24 changes: 24 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ plugins {
id 'com.google.gms.google-services'
}

configurations {
ktlint
}

android {
namespace 'com.gta.ucmc'
compileSdk 33
Expand Down Expand Up @@ -34,6 +38,7 @@ android {
}

dependencies {
ktlint 'com.pinterest:ktlint:0.47.1'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
Expand All @@ -44,4 +49,23 @@ dependencies {

implementation platform('com.google.firebase:firebase-bom:31.0.2')
implementation 'com.google.firebase:firebase-analytics-ktx'

implementation project(":data")
implementation project(":domain")
implementation project(":presentation")
}

task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
mainClass.set("com.pinterest.ktlint.Main")
classpath = configurations.ktlint
args "src/**/*.kt"
}
check.dependsOn ktlint

task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
mainClass.set("com.pinterest.ktlint.Main")
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.gta.ucmc

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand Down
13 changes: 2 additions & 11 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">

<application
android:name=".UCMCApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand All @@ -11,16 +12,6 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.UCMC"
tools:targetApi="33">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
tools:targetApi="33"/>

</manifest>
5 changes: 5 additions & 0 deletions app/src/main/java/com/gta/ucmc/UCMCApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.gta.ucmc

import android.app.Application

class UCMCApplication : Application()
3 changes: 1 addition & 2 deletions app/src/test/java/com/gta/ucmc/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.gta.ucmc

import org.junit.Assert.assertEquals
import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
id 'org.jetbrains.kotlin.jvm' version '1.7.10' apply false
}
1 change: 1 addition & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
43 changes: 43 additions & 0 deletions data/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}

android {
namespace 'com.gta.data'
compileSdk 33

defaultConfig {
minSdk 23
targetSdk 33

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation project(":domain")
}
Empty file added data/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions data/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
24 changes: 24 additions & 0 deletions data/src/androidTest/java/com/gta/data/ExampleInstrumentedTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.gta.data

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.gta.data.test", appContext.packageName)
}
}
4 changes: 4 additions & 0 deletions data/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
4 changes: 4 additions & 0 deletions data/src/main/java/com/gta/data/di/FirebaseModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.gta.data.di

object FirebaseModule {
}
4 changes: 4 additions & 0 deletions data/src/main/java/com/gta/data/model/EmptyModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.gta.data.model

class EmptyModule {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.gta.data.repository

import com.gta.domain.repository.EmptyRepository

class EmptyRepositoryImpl: EmptyRepository {
}
4 changes: 4 additions & 0 deletions data/src/main/java/com/gta/data/source/EmptyDataSource.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.gta.data.source

class EmptyDataSource {
}
4 changes: 4 additions & 0 deletions data/src/main/java/com/gta/data/util/EmptyUtil.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.gta.data.util

class EmptyUtil {
}
17 changes: 17 additions & 0 deletions data/src/test/java/com/gta/data/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.gta.data

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
1 change: 1 addition & 0 deletions domain/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
9 changes: 9 additions & 0 deletions domain/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm'
}

java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
4 changes: 4 additions & 0 deletions domain/src/main/java/com/gta/domain/model/EmptyModel.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.gta.domain.model

class EmptyModel {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.gta.domain.repository

interface EmptyRepository {
}
4 changes: 4 additions & 0 deletions domain/src/main/java/com/gta/domain/usecase/EmptyUseCase.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.gta.domain.usecase

class EmptyUseCase {
}
1 change: 1 addition & 0 deletions presentation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading

0 comments on commit 325bffd

Please sign in to comment.