SpotiFlyer/android/build.gradle.kts

145 lines
4.6 KiB
Plaintext
Raw Permalink Normal View History

2021-03-18 19:11:45 +01:00
/*
* * Copyright (c) 2021 Shabinder Singh
* * This program is free software: you can redistribute it and/or modify
* * it under the terms of the GNU General Public License as published by
* * the Free Software Foundation, either version 3 of the License, or
* * (at your option) any later version.
* *
* * This program is distributed in the hope that it will be useful,
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* *
* * You should have received a copy of the GNU General Public License
* * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
2021-01-26 13:54:28 +01:00
import org.jetbrains.compose.compose
2021-09-01 05:07:02 +02:00
import org.jetbrains.kotlin.kapt.cli.main
2021-01-26 13:54:28 +01:00
plugins {
id("com.android.application")
kotlin("android")
id("kotlin-parcelize")
id("org.jetbrains.compose")
id("ktlint-setup")
2021-01-26 13:54:28 +01:00
}
group = "com.shabinder"
version = Versions.versionName
repositories {
google()
mavenCentral()
2021-01-26 13:54:28 +01:00
}
android {
val props = gradleLocalProperties(rootDir)
if (props.containsKey("storeFileDir")) {
signingConfigs {
create("release") {
storeFile = file(props.getProperty("storeFileDir"))
storePassword = props.getProperty("storePassword")
keyAlias = props.getProperty("keyAlias")
keyPassword = props.getProperty("keyPassword")
}
}
}
2021-08-26 21:18:12 +02:00
compileSdk = Versions.compileSdkVersion
buildToolsVersion = "30.0.3"
2021-01-26 13:54:28 +01:00
defaultConfig {
2021-02-25 14:28:33 +01:00
applicationId = "com.shabinder.spotiflyer"
2021-08-26 21:18:12 +02:00
minSdk = Versions.minSdkVersion
targetSdk = Versions.targetSdkVersion
2021-01-26 13:54:28 +01:00
versionCode = Versions.versionCode
versionName = Versions.versionName
2021-09-01 05:07:02 +02:00
}
2021-01-26 13:54:28 +01:00
buildTypes {
getByName("release") {
2021-02-25 14:28:33 +01:00
isMinifyEnabled = true
// isShrinkResources = true
if (props.containsKey("storeFileDir")) {
signingConfig = signingConfigs.getByName("release")
}
2021-09-01 05:07:02 +02:00
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
2021-01-26 13:54:28 +01:00
}
}
kotlinOptions {
jvmTarget = "1.8"
}
2021-01-26 13:54:28 +01:00
compileOptions {
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true
2021-01-26 13:54:28 +01:00
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
configurations {
"implementation" {
exclude(group = "androidx.compose.animation")
exclude(group = "androidx.compose.foundation")
exclude(group = "androidx.compose.material")
exclude(group = "androidx.compose.runtime")
exclude(group = "androidx.compose.ui")
}
}
}
dependencies {
implementation(compose.material)
2021-02-07 20:03:55 +01:00
implementation(compose.materialIconsExtended)
2021-02-11 21:51:11 +01:00
implementation(Androidx.androidxActivity)
// Project's SubModules
2021-01-26 13:54:28 +01:00
implementation(project(":common:database"))
2021-02-25 14:28:33 +01:00
implementation(project(":common:compose"))
implementation(project(":common:root"))
2021-01-26 13:54:28 +01:00
implementation(project(":common:dependency-injection"))
implementation(project(":common:data-models"))
2021-08-23 19:16:20 +02:00
implementation(project(":common:core-components"))
implementation(project(":common:providers"))
2021-01-26 13:54:28 +01:00
// Koin
2021-01-29 18:53:17 +01:00
implementation(Koin.android)
implementation(Koin.compose)
2021-02-07 20:03:55 +01:00
2021-04-28 18:34:13 +02:00
// DECOMPOSE
2021-01-31 12:33:41 +01:00
implementation(Decompose.decompose)
implementation(Decompose.extensionsCompose)
2021-02-22 18:38:33 +01:00
// MVI
implementation(MVIKotlin.mvikotlin)
implementation(MVIKotlin.mvikotlinMain)
implementation(MVIKotlin.mvikotlinLogging)
implementation(MVIKotlin.mvikotlinTimeTravel)
// Extras
with(Extras.Android) {
implementation(countly)
2021-01-26 13:54:28 +01:00
implementation(appUpdator)
}
with(Versions.androidxLifecycle) {
implementation("androidx.lifecycle:lifecycle-service:$this")
implementation("androidx.lifecycle:lifecycle-common-java8:$this")
}
implementation(Extras.kermit)
// implementation("com.jakewharton.timber:timber:4.7.1")
2021-07-10 09:29:34 +02:00
implementation("dev.icerock.moko:parcelize:${Versions.mokoParcelize}")
implementation("com.github.shabinder:storage-chooser:2.0.4.45")
implementation("com.google.accompanist:accompanist-insets:0.16.1")
2021-02-07 17:19:48 +01:00
2021-04-28 18:34:13 +02:00
// Test
2021-02-25 14:28:33 +01:00
testImplementation("junit:junit:4.13.2")
2021-01-26 13:54:28 +01:00
androidTestImplementation(Androidx.junit)
androidTestImplementation(Androidx.expresso)
2021-04-28 18:34:13 +02:00
// Desugaring
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
}