Skip to content

Commit

Permalink
Merge pull request #19 from eshc123/feature/#1-home-module
Browse files Browse the repository at this point in the history
[FEATURE] #1 홈 화면 Module 추가
  • Loading branch information
eshc123 committed Sep 16, 2022
2 parents 26625e5 + 4f98e47 commit 82ed2d4
Show file tree
Hide file tree
Showing 14 changed files with 162 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ dependencies {
implementation(project(":core-ui"))
implementation(project(":data"))
implementation(project(":domain"))
implementation(project(":feature-home"))
implementation(project(":feature-login"))
implementation(project(":feature-issue"))
implementation(project(":feature-notification"))
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
android:scheme="repo-app" />
</intent-filter>
</activity>

<activity
android:name="com.eshc.feature.home.HomeActivity"
android:exported="false" />
</application>

</manifest>
1 change: 1 addition & 0 deletions feature-home/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
59 changes: 59 additions & 0 deletions feature-home/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}

android {
compileSdk 32

defaultConfig {
minSdk 21
targetSdk 32

testInstrumentationRunner "android.support.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'
}
buildFeatures {
dataBinding = true
viewBinding = true
}
}

dependencies {
implementation(project(":domain"))

implementation AndroidX.CORE_KTX
implementation AndroidX.CONSTRAINT
implementation AndroidX.APP_COMPAT
implementation AndroidX.LIFECYCLE_VIEWMODEL_KTX
implementation AndroidX.FRAGMENT_KTX
implementation AndroidX.ACTIVITY_KTX

implementation Google.MATERIAL

implementation Google.HILT_ANDROID
kapt Google.HILT_ANDROID_COMPILER

implementation Libraries.RX_JAVA
implementation Libraries.RX_ANDROID

testImplementation UnitTest.JUNIT
androidTestImplementation AndroidTest.ANDROID_JUNIT
androidTestImplementation AndroidTest.ESPRESSO_CORE
}
Empty file added feature-home/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions feature-home/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
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.eshc.feature.home

import android.support.test.InstrumentationRegistry
import android.support.test.runner.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.eshc.feature.home.test", appContext.packageName)
}
}
11 changes: 11 additions & 0 deletions feature-home/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eshc.feature.home">

<application>
<activity
android:name=".HomeActivity"
android:exported="false" />
</application>

</manifest>
12 changes: 12 additions & 0 deletions feature-home/src/main/java/com/eshc/feature/home/HomeActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.eshc.feature.home


import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

class HomeActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home)
}
}
9 changes: 9 additions & 0 deletions feature-home/src/main/res/layout/activity_home.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HomeActivity">

</androidx.constraintlayout.widget.ConstraintLayout>
1 change: 1 addition & 0 deletions feature-home/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<resources></resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.eshc.feature.home

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 feature-login/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ android {

dependencies {
implementation(project(":domain"))
implementation(project(":feature-home"))

implementation AndroidX.CORE_KTX
implementation AndroidX.CONSTRAINT
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ include ':feature-notification'
include ':feature-repository'
include ':feature-profile'
include ':domain'
include ':feature-home'

0 comments on commit 82ed2d4

Please sign in to comment.