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/>.
|
|
|
|
*/
|
|
|
|
|
2021-04-20 13:26:30 +02:00
|
|
|
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
|
2021-01-26 13:54:28 +01:00
|
|
|
import org.jetbrains.compose.compose
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("com.android.application")
|
|
|
|
kotlin("android")
|
2021-05-01 20:00:59 +02:00
|
|
|
id("kotlin-parcelize")
|
2021-02-08 21:05:40 +01:00
|
|
|
id("org.jetbrains.compose")
|
2021-07-13 22:45:09 +02:00
|
|
|
id("ktlint-setup")
|
2021-01-26 13:54:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "com.shabinder"
|
|
|
|
version = Versions.versionName
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
google()
|
2021-05-12 00:30:52 +02:00
|
|
|
mavenCentral()
|
2021-01-26 13:54:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2021-04-20 13:26:30 +02:00
|
|
|
val props = gradleLocalProperties(rootDir)
|
2021-07-13 22:45:09 +02:00
|
|
|
if (props.containsKey("storeFileDir")) {
|
2021-04-20 13:26:30 +02:00
|
|
|
signingConfigs {
|
|
|
|
create("release") {
|
|
|
|
storeFile = file(props.getProperty("storeFileDir"))
|
|
|
|
storePassword = props.getProperty("storePassword")
|
|
|
|
keyAlias = props.getProperty("keyAlias")
|
|
|
|
keyPassword = props.getProperty("keyPassword")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-04-29 18:14:19 +02:00
|
|
|
|
2021-08-26 21:18:12 +02:00
|
|
|
compileSdk = Versions.compileSdkVersion
|
2021-04-20 13:26:30 +02:00
|
|
|
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
|
2021-05-20 18:07:54 +02:00
|
|
|
// isShrinkResources = true
|
2021-07-13 22:45:09 +02:00
|
|
|
if (props.containsKey("storeFileDir")) {
|
2021-04-20 13:26:30 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
2021-04-18 20:08:38 +02:00
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
2021-01-26 13:54:28 +01:00
|
|
|
compileOptions {
|
|
|
|
// Flag to enable support for the new language APIs
|
2021-05-20 18:07:54 +02:00
|
|
|
isCoreLibraryDesugaringEnabled = true
|
2021-01-26 13:54:28 +01:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
2021-09-30 19:16:43 +02:00
|
|
|
packagingOptions {
|
|
|
|
exclude("META-INF/*")
|
|
|
|
}
|
2021-01-26 13:54:28 +01:00
|
|
|
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-09-30 19:16:43 +02:00
|
|
|
implementation(deps.androidx.activity)
|
2021-02-08 21:05:40 +01:00
|
|
|
|
2021-05-01 20:00:59 +02:00
|
|
|
// 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
|
|
|
|
2021-09-30 19:16:43 +02:00
|
|
|
with(deps) {
|
2021-02-07 20:03:55 +01:00
|
|
|
|
2021-09-30 19:16:43 +02:00
|
|
|
// Koin
|
|
|
|
with(koin) {
|
|
|
|
implementation(androidx.compose)
|
|
|
|
implementation(android)
|
|
|
|
}
|
2021-02-22 18:38:33 +01:00
|
|
|
|
2021-09-30 19:16:43 +02:00
|
|
|
// DECOMPOSE
|
|
|
|
with(decompose) {
|
|
|
|
implementation(dep)
|
|
|
|
implementation(extensions.compose)
|
|
|
|
}
|
2021-05-01 20:00:59 +02:00
|
|
|
|
2021-09-30 19:16:43 +02:00
|
|
|
implementation(countly.android)
|
|
|
|
implementation(android.app.notifier)
|
|
|
|
implementation(storage.chooser)
|
2021-05-01 20:00:59 +02:00
|
|
|
|
2021-09-30 19:16:43 +02:00
|
|
|
with(bundles) {
|
2021-10-10 18:21:14 +02:00
|
|
|
implementation(ktor)
|
2021-09-30 19:16:43 +02:00
|
|
|
implementation(mviKotlin)
|
2021-10-10 18:21:14 +02:00
|
|
|
implementation(androidx.lifecycle)
|
2021-09-30 19:16:43 +02:00
|
|
|
implementation(accompanist.inset)
|
|
|
|
}
|
2021-06-22 20:48:01 +02:00
|
|
|
|
2021-09-30 19:16:43 +02:00
|
|
|
// Test
|
|
|
|
testImplementation(junit)
|
|
|
|
androidTestImplementation(androidx.junit)
|
|
|
|
androidTestImplementation(androidx.expresso)
|
2021-02-07 17:19:48 +01:00
|
|
|
|
2021-09-30 19:16:43 +02:00
|
|
|
// Desugar
|
|
|
|
coreLibraryDesugaring(androidx.desugar)
|
2021-01-26 13:54:28 +01:00
|
|
|
|
2021-09-30 19:16:43 +02:00
|
|
|
// Debug
|
|
|
|
debugImplementation(leak.canary)
|
|
|
|
}
|
2021-07-13 22:45:09 +02:00
|
|
|
}
|