193 lines
7.1 KiB
Kotlin
193 lines
7.1 KiB
Kotlin
@file:Suppress("UnstableApiUsage")
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("com.google.devtools.ksp")
|
|
id("androidx.baselineprofile")
|
|
id("kotlin-parcelize")
|
|
|
|
}
|
|
|
|
apply(from = "update_instances.gradle.kts")
|
|
|
|
android {
|
|
buildToolsVersion = "34.0.0-rc3"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.jerboa"
|
|
namespace = "com.jerboa"
|
|
minSdk = 26
|
|
targetSdk = 34
|
|
versionCode = 49
|
|
versionName = "0.0.49"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
ksp {
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
// Adds exported schema location as test app assets.
|
|
getByName("androidTest").assets.srcDir("$projectDir/schemas")
|
|
}
|
|
|
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
signingConfigs {
|
|
register("release") {
|
|
storeFile = file(project.property("RELEASE_STORE_FILE")!!)
|
|
storePassword = project.property("RELEASE_STORE_PASSWORD") as String?
|
|
keyAlias = project.property("RELEASE_KEY_ALIAS") as String?
|
|
keyPassword = project.property("RELEASE_KEY_PASSWORD") as String?
|
|
|
|
// Optional, specify signing versions used
|
|
enableV1Signing = true
|
|
enableV2Signing = true
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig = if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
signingConfigs.getByName("release")
|
|
} else {
|
|
signingConfigs.getByName("debug")
|
|
}
|
|
|
|
postprocessing {
|
|
isRemoveUnusedCode = true
|
|
isObfuscate = false
|
|
isOptimizeCode = true
|
|
isRemoveUnusedResources = true
|
|
proguardFiles("proguard-rules.pro")
|
|
}
|
|
}
|
|
debug {
|
|
applicationIdSuffix = ".debug"
|
|
versionNameSuffix = " (DEBUG)"
|
|
}
|
|
|
|
register("generateProfiles") { // use this variant to generate the profiles
|
|
isMinifyEnabled = false // The startup profiles needs minification off
|
|
isShrinkResources = false
|
|
isDebuggable = false
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
proguardFiles("benchmark-rules.pro") // The baseline profile generator needs obfuscation off
|
|
applicationIdSuffix = ".benchmark"
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
freeCompilerArgs = listOf("-Xjvm-default=all-compatibility", "-opt-in=kotlin.RequiresOptIn")
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.5.3"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
|
implementation("com.github.alorma:compose-settings-ui-m3:1.0.2")
|
|
|
|
implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11")
|
|
|
|
// Markdown support
|
|
implementation("io.noties.markwon:core:4.6.2")
|
|
implementation("io.noties.markwon:ext-strikethrough:4.6.2")
|
|
implementation("io.noties.markwon:ext-tables:4.6.2")
|
|
implementation("io.noties.markwon:html:4.6.2")
|
|
implementation("io.noties.markwon:image-coil:4.6.2")
|
|
implementation("io.noties.markwon:linkify:4.6.2")
|
|
|
|
// Accompanist
|
|
val accompanistVersion = "0.32.0"
|
|
implementation("com.google.accompanist:accompanist-pager:$accompanistVersion")
|
|
implementation("com.google.accompanist:accompanist-pager-indicators:$accompanistVersion")
|
|
implementation("com.google.accompanist:accompanist-flowlayout:$accompanistVersion")
|
|
implementation("com.google.accompanist:accompanist-navigation-animation:$accompanistVersion")
|
|
implementation("com.google.accompanist:accompanist-systemuicontroller:$accompanistVersion")
|
|
|
|
// LiveData
|
|
implementation("androidx.compose.runtime:runtime-livedata:1.5.2")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.2")
|
|
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.6.2")
|
|
|
|
// Images
|
|
implementation("io.coil-kt:coil-compose:2.4.0")
|
|
implementation("io.coil-kt:coil-gif:2.4.0")
|
|
implementation("io.coil-kt:coil-svg:2.4.0")
|
|
// Allows for proper subsampling of large images
|
|
implementation("me.saket.telephoto:zoomable-image-coil:0.7.0-20230922.054002-2")
|
|
// Animated dropdowns
|
|
implementation("me.saket.cascade:cascade-compose:2.3.0")
|
|
|
|
// crash handling
|
|
implementation("com.github.FunkyMuse:Crashy:1.2.0")
|
|
|
|
// To use Kotlin annotation processing tool
|
|
ksp("androidx.room:room-compiler:2.5.2")
|
|
|
|
implementation("androidx.room:room-runtime:2.5.2")
|
|
annotationProcessor("androidx.room:room-compiler:2.5.2")
|
|
|
|
// optional - Kotlin Extensions and Coroutines support for Room
|
|
implementation("androidx.room:room-ktx:2.5.2")
|
|
|
|
// optional - Test helpers
|
|
testImplementation("androidx.room:room-testing:2.5.2")
|
|
testImplementation("pl.pragmatists:JUnitParams:1.1.1")
|
|
androidTestImplementation("androidx.room:room-testing:2.5.2")
|
|
|
|
// optional - Paging 3 Integration
|
|
implementation("androidx.room:room-paging:2.5.2")
|
|
|
|
implementation("io.arrow-kt:arrow-core:1.2.1")
|
|
// Unfortunately, ui tooling, and the markdown thing, still brings in the other material2 dependencies
|
|
implementation("androidx.compose.material3:material3:1.1.2")
|
|
implementation("androidx.compose.material3:material3-window-size-class:1.1.2")
|
|
|
|
implementation("org.ocpsoft.prettytime:prettytime:5.0.6.Final")
|
|
implementation("androidx.navigation:navigation-compose:2.7.3")
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
|
|
testImplementation("androidx.arch.core:core-testing:2.2.0")
|
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
|
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
|
|
|
val composeVersion = "1.5.2"
|
|
implementation("androidx.compose.ui:ui:$composeVersion")
|
|
implementation("androidx.compose.ui:ui-tooling-preview:$composeVersion")
|
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$composeVersion")
|
|
debugImplementation("androidx.compose.ui:ui-tooling:$composeVersion")
|
|
debugImplementation("androidx.compose.ui:ui-test-manifest:$composeVersion")
|
|
implementation("androidx.compose.material:material-icons-extended:$composeVersion")
|
|
|
|
implementation("androidx.activity:activity-compose:1.7.2")
|
|
testImplementation("junit:junit:4.13.2")
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
|
|
|
testImplementation("org.mockito:mockito-core:5.5.0")
|
|
testImplementation("org.mockito.kotlin:mockito-kotlin:5.1.0")
|
|
|
|
implementation("androidx.browser:browser:1.6.0")
|
|
|
|
implementation("androidx.profileinstaller:profileinstaller:1.3.1")
|
|
baselineProfile(project(":benchmarks"))
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5")
|
|
}
|