diff --git a/.gitignore b/.gitignore index 5e40a09..10cfdbf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,7 @@ *.iml .gradle /local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml -/.idea/gradle.xml -/.idea/kotlinc.xml -/.idea/misc.xml -/.idea/vcs.xml +/.idea .DS_Store /build /captures diff --git a/core/data/.gitignore b/core/data/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/core/data/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts new file mode 100644 index 0000000..ae73939 --- /dev/null +++ b/core/data/build.gradle.kts @@ -0,0 +1,49 @@ +import com.example.buildsrc.Libs +import com.example.buildsrc.Android + +plugins { + id("com.android.library") + id("org.jetbrains.kotlin.android") + id("kotlin-kapt") +} + +android { + namespace = "com.example.data" + compileSdk = Android.compileSdkVersion + + defaultConfig { + minSdk = Android.minSdkVersion + targetSdk = Android.targetSdkVersion + + 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_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(Libs.Modules.domain)) + implementation(Libs.Jetpack.hiltAndroid) + kapt(Libs.Jetpack.hiltAndroidCompiler) + implementation(Libs.Common.gson) + implementation(Libs.Common.retrofit) + implementation(Libs.Common.retrofitGson) + testImplementation(Libs.Testing.junit) + testImplementation(Libs.Testing.mockitoKotlin) +} \ No newline at end of file diff --git a/core/data/src/main/AndroidManifest.xml b/core/data/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a5918e6 --- /dev/null +++ b/core/data/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/core/data/src/test/java/com/example/data/ExampleUnitTest.kt b/core/data/src/test/java/com/example/data/ExampleUnitTest.kt new file mode 100644 index 0000000..8943744 --- /dev/null +++ b/core/data/src/test/java/com/example/data/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.example.data + +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 15dfe44..eb6f7fe 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,3 +15,4 @@ dependencyResolutionManagement { rootProject.name = "ComposeCodeChallenge" include(":app") include(":core:domain") +include(":core:data")