From aca860320c6d1657929abfd42e2a1c10f8300b59 Mon Sep 17 00:00:00 2001 From: dima-ko Date: Mon, 8 Nov 2021 17:20:24 +0200 Subject: [PATCH] TIQR-210: Created Core module --- app/build.gradle.kts | 2 ++ build.gradle.kts | 1 + core/.gitignore | 1 + core/build.gradle.kts | 57 +++++++++++++++++++++++++++++++ core/consumer-rules.pro | 0 core/proguard-rules.pro | 21 ++++++++++++ core/src/main/AndroidManifest.xml | 5 +++ settings.gradle.kts | 1 + 8 files changed, 88 insertions(+) create mode 100644 core/.gitignore create mode 100644 core/build.gradle.kts create mode 100644 core/consumer-rules.pro create mode 100644 core/proguard-rules.pro create mode 100644 core/src/main/AndroidManifest.xml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 49a9b7d4..88ce115d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -91,6 +91,8 @@ dependencies { implementation(project(":data")) + implementation(project(":core")) + implementation(libs.dagger.hilt.android) implementation(libs.dagger.hilt.fragment) kapt(libs.dagger.hilt.compiler) diff --git a/build.gradle.kts b/build.gradle.kts index 316a4e47..4363d41e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,6 +11,7 @@ buildscript { classpath(libs.dagger.hilt.gradle) classpath(libs.androidx.navigation.gradle) classpath(libs.google.gms.gradle) + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21") } } diff --git a/core/.gitignore b/core/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/core/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/build.gradle.kts b/core/build.gradle.kts new file mode 100644 index 00000000..ba674757 --- /dev/null +++ b/core/build.gradle.kts @@ -0,0 +1,57 @@ +plugins { + id("com.android.library") + kotlin("android") + kotlin("kapt") + id("kotlin-parcelize") +} + +android { + compileSdk = libs.versions.android.sdk.compile.get().toInt() + buildToolsVersion = libs.versions.android.buildTools.get() + + defaultConfig { + minSdk = libs.versions.android.sdk.min.get().toInt() + targetSdk = libs.versions.android.sdk.target.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + getByName("release") { + isMinifyEnabled = true + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + + buildFeatures { + dataBinding = true + } + + kapt { + correctErrorTypes = true + useBuildCache = true + + javacOptions { + option("-Xmaxerrs", 1000) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + } + kotlinOptions { + jvmTarget = "1.8" + } + } + + dependencies { + implementation(libs.kotlin.stdlib) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + implementation(libs.androidx.core) + + implementation(project(":data")) + } +} diff --git a/core/consumer-rules.pro b/core/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/core/proguard-rules.pro b/core/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/core/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/core/src/main/AndroidManifest.xml b/core/src/main/AndroidManifest.xml new file mode 100644 index 00000000..06832c78 --- /dev/null +++ b/core/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index b0e1fdae..46173356 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -2,6 +2,7 @@ rootProject.name = "tiqr client android" include(":app") include(":data") +include(":core") // Enable Gradle's version catalog support // https://docs.gradle.org/current/userguide/platforms.html