156 lines
4.7 KiB
Kotlin
156 lines
4.7 KiB
Kotlin
/*
|
|
* Copyright (c) 2025 Nishant Mishra
|
|
*
|
|
* This file is part of Tomato - a minimalist pomodoro timer for Android.
|
|
*
|
|
* Tomato 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.
|
|
*
|
|
* Tomato 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 Tomato.
|
|
* If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
alias(libs.plugins.ksp)
|
|
alias(libs.plugins.baselineprofile)
|
|
}
|
|
|
|
tasks.withType(Test::class) {
|
|
testLogging {
|
|
exceptionFormat = TestExceptionFormat.FULL
|
|
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
|
showStandardStreams = true
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "org.nsh07.pomodoro"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "org.nsh07.pomodoro"
|
|
minSdk = 27
|
|
targetSdk = 36
|
|
versionCode = 24
|
|
versionName = "1.8.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
androidResources {
|
|
generateLocaleConfig = true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
}
|
|
debug {
|
|
applicationIdSuffix = ".debug"
|
|
}
|
|
}
|
|
|
|
flavorDimensions += "version"
|
|
productFlavors {
|
|
create("foss") {
|
|
dimension = "version"
|
|
isDefault = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules-foss.pro"
|
|
)
|
|
}
|
|
create("play") {
|
|
dimension = "version"
|
|
versionNameSuffix = "-play"
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules-play.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_17) // Use the enum for target JVM version
|
|
}
|
|
}
|
|
ksp {
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
dependenciesInfo {
|
|
includeInApk = false
|
|
includeInBundle = false
|
|
}
|
|
|
|
baselineProfile {
|
|
variants {
|
|
create("fossRelease") {
|
|
saveInSrc = true
|
|
}
|
|
create("playRelease") {
|
|
automaticGenerationDuringBuild = true
|
|
saveInSrc = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.lifecycle.viewmodel)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.adaptive)
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.ui)
|
|
implementation(libs.androidx.ui.graphics)
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
implementation(libs.androidx.material3)
|
|
|
|
implementation(libs.androidx.navigation3.runtime)
|
|
implementation(libs.androidx.navigation3.ui)
|
|
|
|
implementation(libs.vico.compose.m3)
|
|
implementation(libs.material.kolor)
|
|
|
|
implementation(libs.androidx.room.runtime)
|
|
implementation(libs.androidx.room.ktx)
|
|
implementation(libs.androidx.profileinstaller)
|
|
"baselineProfile"(project(":baselineprofile"))
|
|
ksp(libs.androidx.room.compiler)
|
|
|
|
"playImplementation"(libs.revenuecat.purchases)
|
|
"playImplementation"(libs.revenuecat.purchases.ui)
|
|
|
|
testImplementation(libs.junit)
|
|
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.ui.test.junit4)
|
|
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
debugImplementation(libs.androidx.ui.test.manifest)
|
|
} |