From 0bd96146c00fe5d2ca0f6b3db241dc46f67523a6 Mon Sep 17 00:00:00 2001 From: Nymos Date: Tue, 18 Feb 2025 18:03:34 +0300 Subject: [PATCH] Add dependencies --- app/src/main/res/values/strings.xml | 3 -- app/src/main/res/xml/backup_rules.xml | 13 ----- .../main/res/xml/data_extraction_rules.xml | 19 ------- build.gradle.kts | 2 + {app => data}/.gitignore | 0 data/build.gradle.kts | 50 ++++++++++++++++++ data/consumer-rules.pro | 0 {app => data}/proguard-rules.pro | 0 .../com/nto/data}/ExampleInstrumentedTest.kt | 4 +- data/src/main/AndroidManifest.xml | 4 ++ .../java/com/nto/data}/ExampleUnitTest.kt | 2 +- domain/.gitignore | 1 + domain/build.gradle.kts | 49 +++++++++++++++++ domain/consumer-rules.pro | 0 domain/proguard-rules.pro | 21 ++++++++ .../com/nto/domain/ExampleInstrumentedTest.kt | 24 +++++++++ domain/src/main/AndroidManifest.xml | 4 ++ .../java/com/nto/domain/ExampleUnitTest.kt | 17 ++++++ gradle/libs.versions.toml | 30 ++++++++++- presentation/.gitignore | 1 + {app => presentation}/build.gradle.kts | 26 +++++++-- presentation/proguard-rules.pro | 21 ++++++++ .../presentation/ExampleInstrumentedTest.kt | 24 +++++++++ .../src/main/AndroidManifest.xml | 8 +-- .../com/nto/presentation}/MainActivity.kt | 25 +++++++-- .../com/nto/presentation}/ui/theme/Color.kt | 2 +- .../com/nto/presentation}/ui/theme/Theme.kt | 2 +- .../com/nto/presentation}/ui/theme/Type.kt | 2 +- .../res/drawable/ic_launcher_background.xml | 0 .../res/drawable/ic_launcher_foreground.xml | 0 .../main/res/mipmap-anydpi/ic_launcher.xml | 0 .../res/mipmap-anydpi/ic_launcher_round.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.webp | Bin .../res/mipmap-hdpi/ic_launcher_round.webp | Bin .../src/main/res/mipmap-mdpi/ic_launcher.webp | Bin .../res/mipmap-mdpi/ic_launcher_round.webp | Bin .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin .../src/main/res/values/colors.xml | 0 presentation/src/main/res/values/strings.xml | 3 ++ .../src/main/res/values/themes.xml | 0 .../com/nto/presentation/ExampleUnitTest.kt | 17 ++++++ settings.gradle.kts | 6 ++- 47 files changed, 322 insertions(+), 58 deletions(-) delete mode 100644 app/src/main/res/values/strings.xml delete mode 100644 app/src/main/res/xml/backup_rules.xml delete mode 100644 app/src/main/res/xml/data_extraction_rules.xml rename {app => data}/.gitignore (100%) create mode 100644 data/build.gradle.kts create mode 100644 data/consumer-rules.pro rename {app => data}/proguard-rules.pro (100%) rename {app/src/androidTest/java/com/nto/onomatopoeia_front => data/src/androidTest/java/com/nto/data}/ExampleInstrumentedTest.kt (83%) create mode 100644 data/src/main/AndroidManifest.xml rename {app/src/test/java/com/nto/onomatopoeia_front => data/src/test/java/com/nto/data}/ExampleUnitTest.kt (90%) create mode 100644 domain/.gitignore create mode 100644 domain/build.gradle.kts create mode 100644 domain/consumer-rules.pro create mode 100644 domain/proguard-rules.pro create mode 100644 domain/src/androidTest/java/com/nto/domain/ExampleInstrumentedTest.kt create mode 100644 domain/src/main/AndroidManifest.xml create mode 100644 domain/src/test/java/com/nto/domain/ExampleUnitTest.kt create mode 100644 presentation/.gitignore rename {app => presentation}/build.gradle.kts (73%) create mode 100644 presentation/proguard-rules.pro create mode 100644 presentation/src/androidTest/java/com/nto/presentation/ExampleInstrumentedTest.kt rename {app => presentation}/src/main/AndroidManifest.xml (75%) rename {app/src/main/java/com/nto/onomatopoeia_front => presentation/src/main/java/com/nto/presentation}/MainActivity.kt (60%) rename {app/src/main/java/com/nto/onomatopoeia_front => presentation/src/main/java/com/nto/presentation}/ui/theme/Color.kt (84%) rename {app/src/main/java/com/nto/onomatopoeia_front => presentation/src/main/java/com/nto/presentation}/ui/theme/Theme.kt (97%) rename {app/src/main/java/com/nto/onomatopoeia_front => presentation/src/main/java/com/nto/presentation}/ui/theme/Type.kt (95%) rename {app => presentation}/src/main/res/drawable/ic_launcher_background.xml (100%) rename {app => presentation}/src/main/res/drawable/ic_launcher_foreground.xml (100%) rename {app => presentation}/src/main/res/mipmap-anydpi/ic_launcher.xml (100%) rename {app => presentation}/src/main/res/mipmap-anydpi/ic_launcher_round.xml (100%) rename {app => presentation}/src/main/res/mipmap-hdpi/ic_launcher.webp (100%) rename {app => presentation}/src/main/res/mipmap-hdpi/ic_launcher_round.webp (100%) rename {app => presentation}/src/main/res/mipmap-mdpi/ic_launcher.webp (100%) rename {app => presentation}/src/main/res/mipmap-mdpi/ic_launcher_round.webp (100%) rename {app => presentation}/src/main/res/mipmap-xhdpi/ic_launcher.webp (100%) rename {app => presentation}/src/main/res/mipmap-xhdpi/ic_launcher_round.webp (100%) rename {app => presentation}/src/main/res/mipmap-xxhdpi/ic_launcher.webp (100%) rename {app => presentation}/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp (100%) rename {app => presentation}/src/main/res/mipmap-xxxhdpi/ic_launcher.webp (100%) rename {app => presentation}/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp (100%) rename {app => presentation}/src/main/res/values/colors.xml (100%) create mode 100644 presentation/src/main/res/values/strings.xml rename {app => presentation}/src/main/res/values/themes.xml (100%) create mode 100644 presentation/src/test/java/com/nto/presentation/ExampleUnitTest.kt diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml deleted file mode 100644 index 2246672..0000000 --- a/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Onomatopoeia-front - \ No newline at end of file diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml deleted file mode 100644 index fa0f996..0000000 --- a/app/src/main/res/xml/backup_rules.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml deleted file mode 100644 index 9ee9997..0000000 --- a/app/src/main/res/xml/data_extraction_rules.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 952b930..f5909e1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,4 +3,6 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.compose) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.hilt) apply false } \ No newline at end of file diff --git a/app/.gitignore b/data/.gitignore similarity index 100% rename from app/.gitignore rename to data/.gitignore diff --git a/data/build.gradle.kts b/data/build.gradle.kts new file mode 100644 index 0000000..93b6d2b --- /dev/null +++ b/data/build.gradle.kts @@ -0,0 +1,50 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + id("kotlin-kapt") + id("com.google.dagger.hilt.android") +} + +android { + namespace = "com.nto.data" + compileSdk = 35 + + defaultConfig { + minSdk = 28 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } +} + +dependencies { + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + + kapt(libs.hilt.compiler) + implementation(libs.hilt) + + implementation(libs.retrofit) + implementation(libs.converter.gson) +} \ No newline at end of file diff --git a/data/consumer-rules.pro b/data/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/app/proguard-rules.pro b/data/proguard-rules.pro similarity index 100% rename from app/proguard-rules.pro rename to data/proguard-rules.pro diff --git a/app/src/androidTest/java/com/nto/onomatopoeia_front/ExampleInstrumentedTest.kt b/data/src/androidTest/java/com/nto/data/ExampleInstrumentedTest.kt similarity index 83% rename from app/src/androidTest/java/com/nto/onomatopoeia_front/ExampleInstrumentedTest.kt rename to data/src/androidTest/java/com/nto/data/ExampleInstrumentedTest.kt index 2d9e206..e0d21cb 100644 --- a/app/src/androidTest/java/com/nto/onomatopoeia_front/ExampleInstrumentedTest.kt +++ b/data/src/androidTest/java/com/nto/data/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.nto.onomatopoeia_front +package com.nto.data import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 @@ -19,6 +19,6 @@ class ExampleInstrumentedTest { fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.nto.onomatopoeia_front", appContext.packageName) + assertEquals("com.nto.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 0000000..a5918e6 --- /dev/null +++ b/data/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/test/java/com/nto/onomatopoeia_front/ExampleUnitTest.kt b/data/src/test/java/com/nto/data/ExampleUnitTest.kt similarity index 90% rename from app/src/test/java/com/nto/onomatopoeia_front/ExampleUnitTest.kt rename to data/src/test/java/com/nto/data/ExampleUnitTest.kt index 53bf97d..efbef01 100644 --- a/app/src/test/java/com/nto/onomatopoeia_front/ExampleUnitTest.kt +++ b/data/src/test/java/com/nto/data/ExampleUnitTest.kt @@ -1,4 +1,4 @@ -package com.nto.onomatopoeia_front +package com.nto.data import org.junit.Test diff --git a/domain/.gitignore b/domain/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/domain/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/build.gradle.kts b/domain/build.gradle.kts new file mode 100644 index 0000000..144e5bd --- /dev/null +++ b/domain/build.gradle.kts @@ -0,0 +1,49 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + id("kotlin-kapt") + id("com.google.dagger.hilt.android") +} + +android { + namespace = "com.nto.domain" + compileSdk = 35 + + defaultConfig { + minSdk = 28 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } +} + +dependencies { + implementation(project(":data")) + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + + kapt(libs.hilt.compiler) + implementation(libs.hilt) +} \ No newline at end of file diff --git a/domain/consumer-rules.pro b/domain/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/domain/proguard-rules.pro b/domain/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/domain/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/domain/src/androidTest/java/com/nto/domain/ExampleInstrumentedTest.kt b/domain/src/androidTest/java/com/nto/domain/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..caa80b5 --- /dev/null +++ b/domain/src/androidTest/java/com/nto/domain/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.nto.domain + +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.nto.domain.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/domain/src/main/AndroidManifest.xml b/domain/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a5918e6 --- /dev/null +++ b/domain/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/domain/src/test/java/com/nto/domain/ExampleUnitTest.kt b/domain/src/test/java/com/nto/domain/ExampleUnitTest.kt new file mode 100644 index 0000000..5635e81 --- /dev/null +++ b/domain/src/test/java/com/nto/domain/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.nto.domain + +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/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3ac147a..d70bb2f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,6 +9,19 @@ lifecycleRuntimeKtx = "2.8.7" activityCompose = "1.10.0" composeBom = "2024.04.01" +kapt = "2.1.10" + +hilt = "2.50" +hiltNavigation = "1.2.0" +navigation = "2.7.7" + +lintApiVersion = "31.8.1" +composeLintChecks = "1.3.1" + +converterGson = "2.11.0" +appcompat = "1.6.1" +material = "1.10.0" + [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } junit = { group = "junit", name = "junit", version.ref = "junit" } @@ -25,11 +38,26 @@ androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-man androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } androidx-material3 = { group = "androidx.compose.material3", name = "material3" } +hilt = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } +hilt-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" } +hilt-navigation = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigation" } +navigation = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" } + +lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lintApiVersion" } +lint-checks = { module = "com.android.tools.lint:lint-checks", version.ref = "lintApiVersion" } +lint-checks-compose = { module = "com.slack.lint.compose:compose-lint-checks", version.ref = "composeLintChecks" } + +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "converterGson" } +converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" } +androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } +material = { group = "com.google.android.material", name = "material", version.ref = "material" } + [plugins] android-application = { id = "com.android.application", version.ref = "agp" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } -kapt = { id = "kotlin-kapt"} +kapt = { id = "kotlin-kapt" } +android-library = { id = "com.android.library", version.ref = "agp" } diff --git a/presentation/.gitignore b/presentation/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/presentation/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/presentation/build.gradle.kts similarity index 73% rename from app/build.gradle.kts rename to presentation/build.gradle.kts index 2f704a2..83b5f0e 100644 --- a/app/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -2,17 +2,18 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.compose) - alias(libs.plugins.hilt) apply false + id("kotlin-kapt") + id("com.google.dagger.hilt.android") } android { - namespace = "com.nto.onomatopoeia_front" - compileSdk = 35 + namespace = "com.nto.presentation" + compileSdk = 34 defaultConfig { - applicationId = "com.nto.onomatopoeia_front" + applicationId = "com.nto.presentation" minSdk = 28 - targetSdk = 35 + targetSdk = 34 versionCode = 1 versionName = "1.0" @@ -40,7 +41,14 @@ android { } } +// Allow references to generated code +kapt { + correctErrorTypes = true +} + dependencies { + implementation(project(":domain")) + implementation(project(":data")) implementation(libs.androidx.core.ktx) implementation(libs.androidx.lifecycle.runtime.ktx) @@ -57,4 +65,12 @@ dependencies { androidTestImplementation(libs.androidx.ui.test.junit4) debugImplementation(libs.androidx.ui.tooling) debugImplementation(libs.androidx.ui.test.manifest) + + kapt(libs.hilt.compiler) + implementation(libs.hilt) + implementation (libs.hilt.navigation) + implementation(libs.navigation) + + lintChecks(libs.lint.checks) + lintChecks(libs.lint.checks.compose) } \ No newline at end of file diff --git a/presentation/proguard-rules.pro b/presentation/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /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/nto/presentation/ExampleInstrumentedTest.kt b/presentation/src/androidTest/java/com/nto/presentation/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..126e9f5 --- /dev/null +++ b/presentation/src/androidTest/java/com/nto/presentation/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.nto.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.nto.presentation", appContext.packageName) + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/presentation/src/main/AndroidManifest.xml similarity index 75% rename from app/src/main/AndroidManifest.xml rename to presentation/src/main/AndroidManifest.xml index ea74ed1..174b703 100644 --- a/app/src/main/AndroidManifest.xml +++ b/presentation/src/main/AndroidManifest.xml @@ -1,17 +1,13 @@ - + + android:theme="@style/Theme.Onomatopoeiafront"> - + Greeting( + name = "Android", + modifier = Modifier.padding(innerPadding) + ) } } } } +} + +@Composable +fun Greeting(name: String, modifier: Modifier = Modifier) { + Text( + text = "Hello $name!", + modifier = modifier + ) +} + +@Preview(showBackground = true) +@Composable +fun GreetingPreview() { + OnomatopoeiafrontTheme { + Greeting("Android") + } } \ No newline at end of file diff --git a/app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Color.kt b/presentation/src/main/java/com/nto/presentation/ui/theme/Color.kt similarity index 84% rename from app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Color.kt rename to presentation/src/main/java/com/nto/presentation/ui/theme/Color.kt index ea635e1..7bbee5e 100644 --- a/app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Color.kt +++ b/presentation/src/main/java/com/nto/presentation/ui/theme/Color.kt @@ -1,4 +1,4 @@ -package com.nto.onomatopoeia_front.ui.theme +package com.nto.presentation.ui.theme import androidx.compose.ui.graphics.Color diff --git a/app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Theme.kt b/presentation/src/main/java/com/nto/presentation/ui/theme/Theme.kt similarity index 97% rename from app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Theme.kt rename to presentation/src/main/java/com/nto/presentation/ui/theme/Theme.kt index 748a328..2471759 100644 --- a/app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Theme.kt +++ b/presentation/src/main/java/com/nto/presentation/ui/theme/Theme.kt @@ -1,4 +1,4 @@ -package com.nto.onomatopoeia_front.ui.theme +package com.nto.presentation.ui.theme import android.app.Activity import android.os.Build diff --git a/app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Type.kt b/presentation/src/main/java/com/nto/presentation/ui/theme/Type.kt similarity index 95% rename from app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Type.kt rename to presentation/src/main/java/com/nto/presentation/ui/theme/Type.kt index f4168d4..c1255ab 100644 --- a/app/src/main/java/com/nto/onomatopoeia_front/ui/theme/Type.kt +++ b/presentation/src/main/java/com/nto/presentation/ui/theme/Type.kt @@ -1,4 +1,4 @@ -package com.nto.onomatopoeia_front.ui.theme +package com.nto.presentation.ui.theme import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/presentation/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from app/src/main/res/drawable/ic_launcher_background.xml rename to presentation/src/main/res/drawable/ic_launcher_background.xml diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/presentation/src/main/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from app/src/main/res/drawable/ic_launcher_foreground.xml rename to presentation/src/main/res/drawable/ic_launcher_foreground.xml diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/presentation/src/main/res/mipmap-anydpi/ic_launcher.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi/ic_launcher.xml rename to presentation/src/main/res/mipmap-anydpi/ic_launcher.xml diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/presentation/src/main/res/mipmap-anydpi/ic_launcher_round.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi/ic_launcher_round.xml rename to presentation/src/main/res/mipmap-anydpi/ic_launcher_round.xml diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher.webp rename to presentation/src/main/res/mipmap-hdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-hdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher_round.webp rename to presentation/src/main/res/mipmap-hdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher.webp rename to presentation/src/main/res/mipmap-mdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-mdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher_round.webp rename to presentation/src/main/res/mipmap-mdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher.webp rename to presentation/src/main/res/mipmap-xhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-xhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp rename to presentation/src/main/res/mipmap-xhdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher.webp rename to presentation/src/main/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp rename to presentation/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp rename to presentation/src/main/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp rename to presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp diff --git a/app/src/main/res/values/colors.xml b/presentation/src/main/res/values/colors.xml similarity index 100% rename from app/src/main/res/values/colors.xml rename to presentation/src/main/res/values/colors.xml diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml new file mode 100644 index 0000000..924de34 --- /dev/null +++ b/presentation/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + presentation + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/presentation/src/main/res/values/themes.xml similarity index 100% rename from app/src/main/res/values/themes.xml rename to presentation/src/main/res/values/themes.xml diff --git a/presentation/src/test/java/com/nto/presentation/ExampleUnitTest.kt b/presentation/src/test/java/com/nto/presentation/ExampleUnitTest.kt new file mode 100644 index 0000000..77425db --- /dev/null +++ b/presentation/src/test/java/com/nto/presentation/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.nto.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.kts b/settings.gradle.kts index 1b68471..a4e3283 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -20,5 +20,7 @@ dependencyResolutionManagement { } rootProject.name = "Onomatopoeia-front" -include(":app") - \ No newline at end of file +include(":presentation") +include(":presentation") +include(":domain") +include(":data")