From f7cfe530825a5bb188b630b719e5e6a1f35033b2 Mon Sep 17 00:00:00 2001 From: hoon Date: Mon, 7 Nov 2022 15:42:13 +0900 Subject: [PATCH 1/9] =?UTF-8?q?docs=20:=20PR=20=ED=85=9C=ED=94=8C=EB=A6=BF?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..2ca45539 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +## 개요 +내용을 적어주세요. + +## 작업사항 +- 내용을 적어주세요. + +## 변경된 부분 +- 내용을 적어주세요. + +## 특이사항 +- 내용을 적어주세요. From a7f01add5cce1453a07e02d7e8f63a8b96e48a7d Mon Sep 17 00:00:00 2001 From: Hoon Date: Mon, 7 Nov 2022 17:54:12 +0900 Subject: [PATCH 2/9] =?UTF-8?q?docs=20:=20PR=20=ED=85=9C=ED=94=8C=EB=A6=BF?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2ca45539..e8c6aa50 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,5 +7,8 @@ ## 변경된 부분 - 내용을 적어주세요. +## 실행 화면 + + ## 특이사항 - 내용을 적어주세요. From 237316a77e26fe75a34ac459551a7c4cf280128c Mon Sep 17 00:00:00 2001 From: minseonglove Date: Mon, 7 Nov 2022 21:30:30 +0900 Subject: [PATCH 3/9] =?UTF-8?q?deploy=20:=20=EB=B9=8C=EB=93=9C=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=ED=99=94=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ucmcCI.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 3 ++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 .github/ucmcCI.yml diff --git a/.github/ucmcCI.yml b/.github/ucmcCI.yml new file mode 100644 index 00000000..34ea450b --- /dev/null +++ b/.github/ucmcCI.yml @@ -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-dev-${{ 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 diff --git a/.gitignore b/.gitignore index 88f599ef..4e50dc50 100644 --- a/.gitignore +++ b/.gitignore @@ -83,4 +83,5 @@ lint/generated/ lint/outputs/ lint/tmp/ # lint/reports/ -/.idea/ \ No newline at end of file +/.idea/ +/app/release/output-metadata.json From 97deac7bf8d144d6f1a699f622d6ee433be8c85f Mon Sep 17 00:00:00 2001 From: minseonglove Date: Mon, 7 Nov 2022 21:33:06 +0900 Subject: [PATCH 4/9] =?UTF-8?q?chore=20:=20ci=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=9D=84=20workflows=20=EB=94=94=EB=A0=89=ED=86=A0=EB=A6=AC?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/{ => workflows}/ucmcCI.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/ucmcCI.yml (100%) diff --git a/.github/ucmcCI.yml b/.github/workflows/ucmcCI.yml similarity index 100% rename from .github/ucmcCI.yml rename to .github/workflows/ucmcCI.yml From 842b5e6a1560373d2aa1fe024789507d6309c49e Mon Sep 17 00:00:00 2001 From: minseonglove Date: Mon, 7 Nov 2022 21:40:11 +0900 Subject: [PATCH 5/9] =?UTF-8?q?chore=20:=20=EB=A6=B4=EB=A6=AC=EC=A6=88=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ucmcCI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ucmcCI.yml b/.github/workflows/ucmcCI.yml index 34ea450b..fa55b0d3 100644 --- a/.github/workflows/ucmcCI.yml +++ b/.github/workflows/ucmcCI.yml @@ -51,7 +51,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} with: tag_name: ${{ steps.date.outputs.date }} - release_name: Release-dev-${{ 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 From 8bd3cce29428e0d6147f70c957fad277d341d753 Mon Sep 17 00:00:00 2001 From: minseonglove Date: Tue, 8 Nov 2022 19:30:10 +0900 Subject: [PATCH 6/9] =?UTF-8?q?build=20:=20ktlint=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 39f39ef0..a3e02d90 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,6 +4,10 @@ plugins { id 'com.google.gms.google-services' } +configurations { + ktlint +} + android { namespace 'com.gta.ucmc' compileSdk 33 @@ -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' @@ -45,3 +50,18 @@ dependencies { implementation platform('com.google.firebase:firebase-bom:31.0.2') implementation 'com.google.firebase:firebase-analytics-ktx' } + +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" +} From 978d72b2d91e4ac68e017009cc796f1203a7645d Mon Sep 17 00:00:00 2001 From: minseonglove Date: Tue, 8 Nov 2022 19:30:51 +0900 Subject: [PATCH 7/9] =?UTF-8?q?build=20:=20ktlint=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/gta/ucmc/ExampleInstrumentedTest.kt | 6 ++---- app/src/main/java/com/gta/ucmc/MainActivity.kt | 2 +- app/src/test/java/com/gta/ucmc/ExampleUnitTest.kt | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/androidTest/java/com/gta/ucmc/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/gta/ucmc/ExampleInstrumentedTest.kt index 657bdaf6..d6c6df9c 100644 --- a/app/src/androidTest/java/com/gta/ucmc/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/gta/ucmc/ExampleInstrumentedTest.kt @@ -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. * diff --git a/app/src/main/java/com/gta/ucmc/MainActivity.kt b/app/src/main/java/com/gta/ucmc/MainActivity.kt index f7a056d4..4f617ba9 100644 --- a/app/src/main/java/com/gta/ucmc/MainActivity.kt +++ b/app/src/main/java/com/gta/ucmc/MainActivity.kt @@ -1,7 +1,7 @@ package com.gta.ucmc -import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/app/src/test/java/com/gta/ucmc/ExampleUnitTest.kt b/app/src/test/java/com/gta/ucmc/ExampleUnitTest.kt index 23931776..30f2da17 100644 --- a/app/src/test/java/com/gta/ucmc/ExampleUnitTest.kt +++ b/app/src/test/java/com/gta/ucmc/ExampleUnitTest.kt @@ -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). * From 9418cddddbb84e2929da0de9fc76b0d0b581485e Mon Sep 17 00:00:00 2001 From: Hoon Date: Wed, 9 Nov 2022 16:13:10 +0900 Subject: [PATCH 8/9] =?UTF-8?q?build=20:=20=EB=A9=80=ED=8B=B0=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=20=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 4 ++ app/src/main/AndroidManifest.xml | 13 +----- .../main/java/com/gta/ucmc/UCMCApplication.kt | 7 +++ build.gradle | 1 + data/.gitignore | 1 + data/build.gradle | 43 ++++++++++++++++++ data/consumer-rules.pro | 0 data/proguard-rules.pro | 21 +++++++++ .../com/gta/data/ExampleInstrumentedTest.kt | 24 ++++++++++ data/src/main/AndroidManifest.xml | 4 ++ .../test/java/com/gta/data/ExampleUnitTest.kt | 17 +++++++ domain/.gitignore | 1 + domain/build.gradle | 9 ++++ .../src/main/java/com/gta/domain/MyClass.kt | 4 ++ presentation/.gitignore | 1 + presentation/build.gradle | 44 +++++++++++++++++++ presentation/consumer-rules.pro | 0 presentation/proguard-rules.pro | 21 +++++++++ .../presentation/ExampleInstrumentedTest.kt | 24 ++++++++++ presentation/src/main/AndroidManifest.xml | 17 +++++++ .../com/gta/presentation}/MainActivity.kt | 6 +-- .../src/main/res/layout/activity_main.xml | 9 ++++ presentation/src/main/res/values/strings.xml | 1 + .../com/gta/presentation/ExampleUnitTest.kt | 17 +++++++ settings.gradle | 5 ++- 25 files changed, 279 insertions(+), 15 deletions(-) create mode 100644 app/src/main/java/com/gta/ucmc/UCMCApplication.kt create mode 100644 data/.gitignore create mode 100644 data/build.gradle create mode 100644 data/consumer-rules.pro create mode 100644 data/proguard-rules.pro create mode 100644 data/src/androidTest/java/com/gta/data/ExampleInstrumentedTest.kt create mode 100644 data/src/main/AndroidManifest.xml create mode 100644 data/src/test/java/com/gta/data/ExampleUnitTest.kt create mode 100644 domain/.gitignore create mode 100644 domain/build.gradle create mode 100644 domain/src/main/java/com/gta/domain/MyClass.kt create mode 100644 presentation/.gitignore create mode 100644 presentation/build.gradle create mode 100644 presentation/consumer-rules.pro create mode 100644 presentation/proguard-rules.pro create mode 100644 presentation/src/androidTest/java/com/gta/presentation/ExampleInstrumentedTest.kt create mode 100644 presentation/src/main/AndroidManifest.xml rename {app/src/main/java/com/gta/ucmc => presentation/src/main/java/com/gta/presentation}/MainActivity.kt (90%) create mode 100644 presentation/src/main/res/layout/activity_main.xml create mode 100644 presentation/src/main/res/values/strings.xml create mode 100644 presentation/src/test/java/com/gta/presentation/ExampleUnitTest.kt diff --git a/app/build.gradle b/app/build.gradle index a3e02d90..0659cf15 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -49,6 +49,10 @@ 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") { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 400b7440..93f4124c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools"> - - - - - - - - + tools:targetApi="33"/> diff --git a/app/src/main/java/com/gta/ucmc/UCMCApplication.kt b/app/src/main/java/com/gta/ucmc/UCMCApplication.kt new file mode 100644 index 00000000..c97213de --- /dev/null +++ b/app/src/main/java/com/gta/ucmc/UCMCApplication.kt @@ -0,0 +1,7 @@ +package com.gta.ucmc + +import android.app.Application + +class UCMCApplication: Application() { + +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 194a9a3c..919f1330 100644 --- a/build.gradle +++ b/build.gradle @@ -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 } \ No newline at end of file diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/data/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/build.gradle b/data/build.gradle new file mode 100644 index 00000000..19e0ae01 --- /dev/null +++ b/data/build.gradle @@ -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") +} \ No newline at end of file diff --git a/data/consumer-rules.pro b/data/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/data/proguard-rules.pro b/data/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/data/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/data/src/androidTest/java/com/gta/data/ExampleInstrumentedTest.kt b/data/src/androidTest/java/com/gta/data/ExampleInstrumentedTest.kt new file mode 100644 index 00000000..7d371764 --- /dev/null +++ b/data/src/androidTest/java/com/gta/data/ExampleInstrumentedTest.kt @@ -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) + } +} \ No newline at end of file diff --git a/data/src/main/AndroidManifest.xml b/data/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a5918e68 --- /dev/null +++ b/data/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/src/test/java/com/gta/data/ExampleUnitTest.kt b/data/src/test/java/com/gta/data/ExampleUnitTest.kt new file mode 100644 index 00000000..ab9bbffd --- /dev/null +++ b/data/src/test/java/com/gta/data/ExampleUnitTest.kt @@ -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) + } +} \ No newline at end of file diff --git a/domain/.gitignore b/domain/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/domain/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/build.gradle b/domain/build.gradle new file mode 100644 index 00000000..fa2872dc --- /dev/null +++ b/domain/build.gradle @@ -0,0 +1,9 @@ +plugins { + id 'java-library' + id 'org.jetbrains.kotlin.jvm' +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_7 + targetCompatibility = JavaVersion.VERSION_1_7 +} \ No newline at end of file diff --git a/domain/src/main/java/com/gta/domain/MyClass.kt b/domain/src/main/java/com/gta/domain/MyClass.kt new file mode 100644 index 00000000..8df7ed65 --- /dev/null +++ b/domain/src/main/java/com/gta/domain/MyClass.kt @@ -0,0 +1,4 @@ +package com.gta.domain + +class MyClass { +} \ No newline at end of file diff --git a/presentation/.gitignore b/presentation/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/presentation/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/presentation/build.gradle b/presentation/build.gradle new file mode 100644 index 00000000..eb1f1fe0 --- /dev/null +++ b/presentation/build.gradle @@ -0,0 +1,44 @@ +plugins { + id 'com.android.library' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.gta.presentation' + 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' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + 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") +} \ No newline at end of file diff --git a/presentation/consumer-rules.pro b/presentation/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/presentation/proguard-rules.pro b/presentation/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/presentation/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/presentation/src/androidTest/java/com/gta/presentation/ExampleInstrumentedTest.kt b/presentation/src/androidTest/java/com/gta/presentation/ExampleInstrumentedTest.kt new file mode 100644 index 00000000..15ab5776 --- /dev/null +++ b/presentation/src/androidTest/java/com/gta/presentation/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.gta.presentation + +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.presentation.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/presentation/src/main/AndroidManifest.xml b/presentation/src/main/AndroidManifest.xml new file mode 100644 index 00000000..4fd2b30c --- /dev/null +++ b/presentation/src/main/AndroidManifest.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/gta/ucmc/MainActivity.kt b/presentation/src/main/java/com/gta/presentation/MainActivity.kt similarity index 90% rename from app/src/main/java/com/gta/ucmc/MainActivity.kt rename to presentation/src/main/java/com/gta/presentation/MainActivity.kt index 4f617ba9..612996de 100644 --- a/app/src/main/java/com/gta/ucmc/MainActivity.kt +++ b/presentation/src/main/java/com/gta/presentation/MainActivity.kt @@ -1,11 +1,11 @@ -package com.gta.ucmc +package com.gta.presentation -import android.os.Bundle import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) } -} +} \ No newline at end of file diff --git a/presentation/src/main/res/layout/activity_main.xml b/presentation/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..0b15a209 --- /dev/null +++ b/presentation/src/main/res/layout/activity_main.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml new file mode 100644 index 00000000..73862c41 --- /dev/null +++ b/presentation/src/main/res/values/strings.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/presentation/src/test/java/com/gta/presentation/ExampleUnitTest.kt b/presentation/src/test/java/com/gta/presentation/ExampleUnitTest.kt new file mode 100644 index 00000000..b84bafc4 --- /dev/null +++ b/presentation/src/test/java/com/gta/presentation/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.gta.presentation + +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) + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index a9f6be5b..ebefda42 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,4 +13,7 @@ dependencyResolutionManagement { } } rootProject.name = "UCMC" -include ':app' \ No newline at end of file +include ':app' +include ':data' +include ':presentation' +include ':domain' From d4382b83487c31c0e6414482f22ddde40ef16491 Mon Sep 17 00:00:00 2001 From: Hoon Date: Wed, 9 Nov 2022 17:05:48 +0900 Subject: [PATCH 9/9] =?UTF-8?q?feature=20:=20=ED=8C=A8=ED=82=A4=EC=A7=80?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/gta/ucmc/UCMCApplication.kt | 4 +--- data/src/main/java/com/gta/data/di/FirebaseModule.kt | 4 ++++ data/src/main/java/com/gta/data/model/EmptyModule.kt | 4 ++++ .../java/com/gta/data/repository/EmptyRepositoryImpl.kt | 6 ++++++ data/src/main/java/com/gta/data/source/EmptyDataSource.kt | 4 ++++ data/src/main/java/com/gta/data/util/EmptyUtil.kt | 4 ++++ domain/src/main/java/com/gta/domain/MyClass.kt | 4 ---- domain/src/main/java/com/gta/domain/model/EmptyModel.kt | 4 ++++ .../main/java/com/gta/domain/repository/EmptyRepository.kt | 4 ++++ domain/src/main/java/com/gta/domain/usecase/EmptyUseCase.kt | 4 ++++ presentation/src/main/AndroidManifest.xml | 2 +- .../src/main/java/com/gta/presentation/model/EmptyModel.kt | 4 ++++ .../src/main/java/com/gta/presentation/ui/BindingAdapter.kt | 2 ++ .../main/java/com/gta/presentation/{ => ui}/MainActivity.kt | 3 ++- .../src/main/java/com/gta/presentation/util/EmptyUtil.kt | 4 ++++ presentation/src/main/res/layout/activity_main.xml | 2 +- 16 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 data/src/main/java/com/gta/data/di/FirebaseModule.kt create mode 100644 data/src/main/java/com/gta/data/model/EmptyModule.kt create mode 100644 data/src/main/java/com/gta/data/repository/EmptyRepositoryImpl.kt create mode 100644 data/src/main/java/com/gta/data/source/EmptyDataSource.kt create mode 100644 data/src/main/java/com/gta/data/util/EmptyUtil.kt delete mode 100644 domain/src/main/java/com/gta/domain/MyClass.kt create mode 100644 domain/src/main/java/com/gta/domain/model/EmptyModel.kt create mode 100644 domain/src/main/java/com/gta/domain/repository/EmptyRepository.kt create mode 100644 domain/src/main/java/com/gta/domain/usecase/EmptyUseCase.kt create mode 100644 presentation/src/main/java/com/gta/presentation/model/EmptyModel.kt create mode 100644 presentation/src/main/java/com/gta/presentation/ui/BindingAdapter.kt rename presentation/src/main/java/com/gta/presentation/{ => ui}/MainActivity.kt (81%) create mode 100644 presentation/src/main/java/com/gta/presentation/util/EmptyUtil.kt diff --git a/app/src/main/java/com/gta/ucmc/UCMCApplication.kt b/app/src/main/java/com/gta/ucmc/UCMCApplication.kt index c97213de..277b1ad4 100644 --- a/app/src/main/java/com/gta/ucmc/UCMCApplication.kt +++ b/app/src/main/java/com/gta/ucmc/UCMCApplication.kt @@ -2,6 +2,4 @@ package com.gta.ucmc import android.app.Application -class UCMCApplication: Application() { - -} \ No newline at end of file +class UCMCApplication : Application() diff --git a/data/src/main/java/com/gta/data/di/FirebaseModule.kt b/data/src/main/java/com/gta/data/di/FirebaseModule.kt new file mode 100644 index 00000000..c8f9f158 --- /dev/null +++ b/data/src/main/java/com/gta/data/di/FirebaseModule.kt @@ -0,0 +1,4 @@ +package com.gta.data.di + +object FirebaseModule { +} \ No newline at end of file diff --git a/data/src/main/java/com/gta/data/model/EmptyModule.kt b/data/src/main/java/com/gta/data/model/EmptyModule.kt new file mode 100644 index 00000000..f20f5448 --- /dev/null +++ b/data/src/main/java/com/gta/data/model/EmptyModule.kt @@ -0,0 +1,4 @@ +package com.gta.data.model + +class EmptyModule { +} \ No newline at end of file diff --git a/data/src/main/java/com/gta/data/repository/EmptyRepositoryImpl.kt b/data/src/main/java/com/gta/data/repository/EmptyRepositoryImpl.kt new file mode 100644 index 00000000..eaf312d9 --- /dev/null +++ b/data/src/main/java/com/gta/data/repository/EmptyRepositoryImpl.kt @@ -0,0 +1,6 @@ +package com.gta.data.repository + +import com.gta.domain.repository.EmptyRepository + +class EmptyRepositoryImpl: EmptyRepository { +} \ No newline at end of file diff --git a/data/src/main/java/com/gta/data/source/EmptyDataSource.kt b/data/src/main/java/com/gta/data/source/EmptyDataSource.kt new file mode 100644 index 00000000..748af912 --- /dev/null +++ b/data/src/main/java/com/gta/data/source/EmptyDataSource.kt @@ -0,0 +1,4 @@ +package com.gta.data.source + +class EmptyDataSource { +} \ No newline at end of file diff --git a/data/src/main/java/com/gta/data/util/EmptyUtil.kt b/data/src/main/java/com/gta/data/util/EmptyUtil.kt new file mode 100644 index 00000000..9af3944a --- /dev/null +++ b/data/src/main/java/com/gta/data/util/EmptyUtil.kt @@ -0,0 +1,4 @@ +package com.gta.data.util + +class EmptyUtil { +} \ No newline at end of file diff --git a/domain/src/main/java/com/gta/domain/MyClass.kt b/domain/src/main/java/com/gta/domain/MyClass.kt deleted file mode 100644 index 8df7ed65..00000000 --- a/domain/src/main/java/com/gta/domain/MyClass.kt +++ /dev/null @@ -1,4 +0,0 @@ -package com.gta.domain - -class MyClass { -} \ No newline at end of file diff --git a/domain/src/main/java/com/gta/domain/model/EmptyModel.kt b/domain/src/main/java/com/gta/domain/model/EmptyModel.kt new file mode 100644 index 00000000..a7e7722f --- /dev/null +++ b/domain/src/main/java/com/gta/domain/model/EmptyModel.kt @@ -0,0 +1,4 @@ +package com.gta.domain.model + +class EmptyModel { +} \ No newline at end of file diff --git a/domain/src/main/java/com/gta/domain/repository/EmptyRepository.kt b/domain/src/main/java/com/gta/domain/repository/EmptyRepository.kt new file mode 100644 index 00000000..c18ea59d --- /dev/null +++ b/domain/src/main/java/com/gta/domain/repository/EmptyRepository.kt @@ -0,0 +1,4 @@ +package com.gta.domain.repository + +interface EmptyRepository { +} \ No newline at end of file diff --git a/domain/src/main/java/com/gta/domain/usecase/EmptyUseCase.kt b/domain/src/main/java/com/gta/domain/usecase/EmptyUseCase.kt new file mode 100644 index 00000000..b656c9a4 --- /dev/null +++ b/domain/src/main/java/com/gta/domain/usecase/EmptyUseCase.kt @@ -0,0 +1,4 @@ +package com.gta.domain.usecase + +class EmptyUseCase { +} \ No newline at end of file diff --git a/presentation/src/main/AndroidManifest.xml b/presentation/src/main/AndroidManifest.xml index 4fd2b30c..15a72e99 100644 --- a/presentation/src/main/AndroidManifest.xml +++ b/presentation/src/main/AndroidManifest.xml @@ -2,7 +2,7 @@ diff --git a/presentation/src/main/java/com/gta/presentation/model/EmptyModel.kt b/presentation/src/main/java/com/gta/presentation/model/EmptyModel.kt new file mode 100644 index 00000000..4015741d --- /dev/null +++ b/presentation/src/main/java/com/gta/presentation/model/EmptyModel.kt @@ -0,0 +1,4 @@ +package com.gta.presentation.model + +class EmptyModel { +} \ No newline at end of file diff --git a/presentation/src/main/java/com/gta/presentation/ui/BindingAdapter.kt b/presentation/src/main/java/com/gta/presentation/ui/BindingAdapter.kt new file mode 100644 index 00000000..c06d96ab --- /dev/null +++ b/presentation/src/main/java/com/gta/presentation/ui/BindingAdapter.kt @@ -0,0 +1,2 @@ +package com.gta.presentation.ui + diff --git a/presentation/src/main/java/com/gta/presentation/MainActivity.kt b/presentation/src/main/java/com/gta/presentation/ui/MainActivity.kt similarity index 81% rename from presentation/src/main/java/com/gta/presentation/MainActivity.kt rename to presentation/src/main/java/com/gta/presentation/ui/MainActivity.kt index 612996de..d97f1628 100644 --- a/presentation/src/main/java/com/gta/presentation/MainActivity.kt +++ b/presentation/src/main/java/com/gta/presentation/ui/MainActivity.kt @@ -1,7 +1,8 @@ -package com.gta.presentation +package com.gta.presentation.ui import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import com.gta.presentation.R class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/presentation/src/main/java/com/gta/presentation/util/EmptyUtil.kt b/presentation/src/main/java/com/gta/presentation/util/EmptyUtil.kt new file mode 100644 index 00000000..25cbae7f --- /dev/null +++ b/presentation/src/main/java/com/gta/presentation/util/EmptyUtil.kt @@ -0,0 +1,4 @@ +package com.gta.presentation.util + +class EmptyUtil { +} \ No newline at end of file diff --git a/presentation/src/main/res/layout/activity_main.xml b/presentation/src/main/res/layout/activity_main.xml index 0b15a209..86e547a7 100644 --- a/presentation/src/main/res/layout/activity_main.xml +++ b/presentation/src/main/res/layout/activity_main.xml @@ -4,6 +4,6 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".MainActivity"> + tools:context=".ui.MainActivity"> \ No newline at end of file