Skip to content

Commit a275b26

Browse files
authored
Merge pull request #4 from Nexters/feature/add-main-module
main 모듈을 추가합니다.
2 parents 3eb6628 + 157f9f1 commit a275b26

File tree

16 files changed

+141
-54
lines changed

16 files changed

+141
-54
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ android {
88
}
99

1010
dependencies {
11+
implementation(project(":feature:main"))
1112
testImplementation(libs.junit)
1213
}

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns:tools="http://schemas.android.com/tools">
44

55
<application
6+
android:name=".TukAndroidApp"
67
android:allowBackup="true"
78
android:dataExtractionRules="@xml/data_extraction_rules"
89
android:fullBackupContent="@xml/backup_rules"
@@ -12,7 +13,7 @@
1213
android:supportsRtl="true"
1314
android:theme="@style/Theme.Tuk">
1415
<activity
15-
android:name=".MainActivity"
16+
android:name="com.plottwist.feature.main.MainActivity"
1617
android:exported="true"
1718
android:label="@string/app_name"
1819
android:theme="@style/Theme.Tuk">

app/src/main/java/com/plottwist/tuk/MainActivity.kt

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.plottwist.tuk
2+
3+
import android.app.Application
4+
5+
class TukAndroidApp : Application()

feature/main/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

feature/main/build.gradle.kts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
plugins {
2+
alias(libs.plugins.tuk.android.library)
3+
alias(libs.plugins.tuk.feature)
4+
}
5+
6+
android {
7+
namespace = "com.plottwist.feature.main"
8+
}
9+
10+
dependencies {
11+
testImplementation(libs.junit)
12+
androidTestImplementation(libs.androidx.test.ext.junit)
13+
androidTestImplementation(libs.espresso.core)
14+
}

feature/main/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.plottwist.feature.main
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.plottwist.feature.main.test", appContext.packageName)
23+
}
24+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
</manifest>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.plottwist.feature.main
2+
3+
import android.os.Bundle
4+
import androidx.activity.ComponentActivity
5+
import androidx.activity.compose.setContent
6+
import androidx.activity.enableEdgeToEdge
7+
import com.plottwist.feature.main.ui.theme.TukTheme
8+
9+
class MainActivity : ComponentActivity() {
10+
override fun onCreate(savedInstanceState: Bundle?) {
11+
super.onCreate(savedInstanceState)
12+
enableEdgeToEdge()
13+
14+
setComposeContent()
15+
}
16+
17+
private fun setComposeContent() {
18+
setContent {
19+
TukTheme {
20+
TukApp()
21+
}
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)