Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies {
implementation(projects.feature.mission)
implementation(projects.feature.setting)
implementation(projects.feature.webview)
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
implementation(libs.firebase.crashlytics)
implementation(libs.play.services.ads)
Expand Down
24 changes: 16 additions & 8 deletions build-logic/src/main/java/com/yapp/convention/TestAndroid.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.yapp.convention
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies


internal fun Project.configureTestAndroid() {
// feature 모듈에만 테스트 관련 설정 적용
configureJUnitAndroid()
// feature 모듈에만 UI 테스트 관련 설정 적용
if (path.startsWith(":feature:")) {
configureComposeUiTest()
}
Expand All @@ -14,13 +14,21 @@ internal fun Project.configureTestAndroid() {
internal fun Project.configureComposeUiTest() {
val libs = extensions.libs
dependencies {
// Jetpack Compose UI 테스트용
"androidTestImplementation"(libs.findLibrary("compose-ui-test-junit4").get())
// 테스트용 AndroidManifest 제공해주는 거 (debug 빌드에서만 사용, 테스트 시 Activity 실행 지원)
"debugImplementation"(libs.findLibrary("compose-ui-test-manifest").get())
// 테스트를 실제로 돌려주는 실행기
"androidTestImplementation"(libs.findLibrary("androidx-test-runner").get())
// JUnit4 기능을 안드로이드 테스트에 연결해주는 어댑터
"androidTestImplementation"(libs.findLibrary("androidx-test-ext-junit").get())
}
}

@Suppress("UnstableApiUsage")
internal fun Project.configureJUnitAndroid() {
androidExtension.apply {
testOptions { unitTests.all { it.useJUnitPlatform() } }
defaultConfig { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }

val libs = extensions.libs
dependencies {
"androidTestImplementation"(libs.findLibrary("androidx-test-ext-junit").get())
"androidTestImplementation"(libs.findLibrary("androidx-test-runner").get())
}
}
}
6 changes: 0 additions & 6 deletions build-logic/src/main/java/orbit.android.feature.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ plugins {
id("orbit.android.compose")
}

android {
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
}

configureHiltAndroid()

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ plugins {
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.room) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.google.service) apply false
alias(libs.plugins.firebase.app.distribution) apply false
alias(libs.plugins.firebase.crashlytics) apply false
// alias(libs.plugins.sentry) apply false
}

apply {
Expand Down
1 change: 1 addition & 0 deletions core/database/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
26 changes: 26 additions & 0 deletions core/database/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import com.yapp.convention.setNamespace

plugins {
id("orbit.android.library")
id("androidx.room")
}

android {
setNamespace("core.database")

sourceSets { getByName("androidTest").assets.srcDir("$projectDir/schemas") }
}

room {
schemaDirectory("$projectDir/schemas")
}

dependencies {
implementation(projects.domain)

ksp(libs.androidx.room.compiler)
implementation(libs.androidx.room.ktx)
implementation(libs.androidx.room.runtime)

androidTestImplementation(libs.androidx.room.testing)
}
Empty file.
21 changes: 21 additions & 0 deletions core/database/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
118 changes: 118 additions & 0 deletions core/database/schemas/com.yapp.database.AlarmDatabase/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "d9643e982a8885da158bcd94c55931ff",
"entities": [
{
"tableName": "alarm_database",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `isAm` INTEGER NOT NULL, `hour` INTEGER NOT NULL, `minute` INTEGER NOT NULL, `second` INTEGER NOT NULL, `repeatDays` INTEGER NOT NULL, `isHolidayAlarmOff` INTEGER NOT NULL, `isSnoozeEnabled` INTEGER NOT NULL, `snoozeInterval` INTEGER NOT NULL, `snoozeCount` INTEGER NOT NULL, `isVibrationEnabled` INTEGER NOT NULL, `isSoundEnabled` INTEGER NOT NULL, `soundUri` TEXT NOT NULL, `soundVolume` INTEGER NOT NULL, `isAlarmActive` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAm",
"columnName": "isAm",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "hour",
"columnName": "hour",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "minute",
"columnName": "minute",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "second",
"columnName": "second",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "repeatDays",
"columnName": "repeatDays",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isHolidayAlarmOff",
"columnName": "isHolidayAlarmOff",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isSnoozeEnabled",
"columnName": "isSnoozeEnabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "snoozeInterval",
"columnName": "snoozeInterval",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "snoozeCount",
"columnName": "snoozeCount",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isVibrationEnabled",
"columnName": "isVibrationEnabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isSoundEnabled",
"columnName": "isSoundEnabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "soundUri",
"columnName": "soundUri",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "soundVolume",
"columnName": "soundVolume",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAlarmActive",
"columnName": "isAlarmActive",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd9643e982a8885da158bcd94c55931ff')"
]
}
}
127 changes: 127 additions & 0 deletions core/database/schemas/com.yapp.database.AlarmDatabase/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "c92b2b14e449f0f966e7074359903eed",
"entities": [
{
"tableName": "alarm_database",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `isAm` INTEGER NOT NULL, `hour` INTEGER NOT NULL, `minute` INTEGER NOT NULL, `second` INTEGER NOT NULL, `repeatDays` INTEGER NOT NULL, `isHolidayAlarmOff` INTEGER NOT NULL, `isSnoozeEnabled` INTEGER NOT NULL, `snoozeInterval` INTEGER NOT NULL, `snoozeCount` INTEGER NOT NULL, `isVibrationEnabled` INTEGER NOT NULL, `isSoundEnabled` INTEGER NOT NULL, `soundUri` TEXT NOT NULL, `soundVolume` INTEGER NOT NULL, `isAlarmActive` INTEGER NOT NULL, `missionType` TEXT NOT NULL, `missionCount` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAm",
"columnName": "isAm",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "hour",
"columnName": "hour",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "minute",
"columnName": "minute",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "second",
"columnName": "second",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "repeatDays",
"columnName": "repeatDays",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isHolidayAlarmOff",
"columnName": "isHolidayAlarmOff",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isSnoozeEnabled",
"columnName": "isSnoozeEnabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "snoozeInterval",
"columnName": "snoozeInterval",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "snoozeCount",
"columnName": "snoozeCount",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isVibrationEnabled",
"columnName": "isVibrationEnabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isSoundEnabled",
"columnName": "isSoundEnabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "soundUri",
"columnName": "soundUri",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "soundVolume",
"columnName": "soundVolume",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAlarmActive",
"columnName": "isAlarmActive",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "missionType",
"columnName": "missionType",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "missionCount",
"columnName": "missionCount",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
}
}
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c92b2b14e449f0f966e7074359903eed')"
]
}
}
Loading