Skip to content

Commit

Permalink
#215 [feat] todo 모듈 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
KWY0218 committed May 29, 2023
1 parent e582c03 commit 8c22aaf
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 0 deletions.
1 change: 1 addition & 0 deletions feature/todo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
85 changes: 85 additions & 0 deletions feature/todo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
plugins {
id("com.android.library")
kotlin("android")
kotlin("kapt")
id("org.jlleitschuh.gradle.ktlint") version ktlintVersion
}

tasks.withType<Test> {
useJUnitPlatform()
}

android {
namespace = "hous.release.feature.todo"
compileSdk = AppConfig.compileSdkVersion

defaultConfig {
minSdk = AppConfig.minSdkVersion
targetSdk = AppConfig.targetSdkVersion

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments["runnerBuilder"] =
"de.mannodermaus.junit5.AndroidJUnit5Builder"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = 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 {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = AppConfig.kotlinCompilerExtensionVersion
}
}

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

Deps.AndroidX.Compose.run {
implementation(activity)
implementation(material)
implementation(animations)
implementation(tool)
implementation(viewModel)
implementation(mdcTheme)
implementation(appCompatTheme)
}

Deps.Coroutines.run {
implementation(core)
implementation(android)
}

testImplementation()
androidTestImplementation()
}

ktlint {
android.set(true)
coloredOutput.set(true)
verbose.set(true)
outputToConsole.set(true)
disabledRules.set(setOf("max-line-length", "no-wildcard-imports", "import-ordering"))
reporters {
reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.PLAIN)
reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE)
}
}
Empty file added feature/todo/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions feature/todo/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 hous.release.feature.todo

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("hous.release.feature.todo.test", appContext.packageName)
}
}
4 changes: 4 additions & 0 deletions feature/todo/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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package hous.release.feature.todo

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 settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ include(":data")
include(":domain")
include(":designsystem")
include(":testing")
include(":feature:todo")

0 comments on commit 8c22aaf

Please sign in to comment.