oncall-mobile-android/app/build.gradle

147 lines
4.5 KiB
Groovy
Raw Normal View History

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2025-03-20 22:15:23 -06:00
plugins {
id 'com.google.devtools.ksp'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
2021-10-29 21:13:58 -04:00
apply plugin: 'com.google.gms.google-services'
android {
2025-03-20 22:15:23 -06:00
namespace "io.heckel.ntfy"
compileSdkVersion 36
defaultConfig {
2021-10-25 16:16:23 -04:00
applicationId "io.heckel.ntfy"
2025-12-18 00:19:39 +01:00
minSdkVersion 26
targetSdkVersion 35
2025-12-21 15:45:01 -05:00
versionCode 52
versionName "1.19.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
/* Required for Room schema migrations */
2025-09-17 14:40:34 -04:00
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
2025-03-20 22:15:23 -06:00
buildFeatures {
buildConfig true
}
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
2021-11-01 14:28:57 -04:00
debuggable false
}
debug {
minifyEnabled false
shrinkResources false
2021-11-01 14:28:57 -04:00
debuggable true
2025-08-17 20:05:33 -04:00
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
2021-11-21 08:56:24 -05:00
}
}
flavorDimensions "store"
productFlavors {
2021-11-24 16:12:51 -05:00
play {
buildConfigField 'boolean', 'FIREBASE_AVAILABLE', 'true'
2022-01-19 23:40:03 -05:00
buildConfigField 'boolean', 'RATE_APP_AVAILABLE', 'true'
buildConfigField 'boolean', 'PAYMENT_LINKS_AVAILABLE', 'false' // Google Play Payments Policy, see #1463
2021-11-21 08:56:24 -05:00
}
2021-11-24 16:12:51 -05:00
fdroid {
buildConfigField 'boolean', 'FIREBASE_AVAILABLE', 'false'
2022-01-19 23:40:03 -05:00
buildConfigField 'boolean', 'RATE_APP_AVAILABLE', 'false'
buildConfigField 'boolean', 'PAYMENT_LINKS_AVAILABLE', 'true'
}
}
compileOptions {
2025-03-20 22:15:23 -06:00
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
freeCompilerArgs = [
'-Xjvm-default=all-compatibility' // https://stackoverflow.com/a/71234042/1440785
]
}
}
}
// Disables GoogleServices tasks for F-Droid variant
android.applicationVariants.all { variant ->
def shouldProcessGoogleServices = variant.flavorName == "play"
def googleTask = tasks.named("process${variant.name.capitalize()}GoogleServices").get()
googleTask.enabled = shouldProcessGoogleServices
}
dependencies {
2022-01-21 14:15:53 -05:00
// AndroidX, The Basics
2025-12-18 00:00:59 +01:00
implementation "androidx.appcompat:appcompat:1.7.1"
implementation "androidx.core:core-ktx:1.17.0"
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
implementation "androidx.activity:activity-ktx:1.12.2"
implementation "androidx.fragment:fragment-ktx:1.8.9"
implementation "androidx.work:work-runtime-ktx:2.11.0"
implementation 'androidx.preference:preference-ktx:1.2.1'
2022-01-21 14:15:53 -05:00
// JSON serialization
2025-12-18 00:00:59 +01:00
implementation 'com.google.code.gson:gson:2.13.2'
2022-01-21 14:15:53 -05:00
2021-11-01 09:57:05 -04:00
// Room (SQLite)
2025-12-18 00:00:59 +01:00
def room_version = "2.8.4"
2025-03-20 22:15:23 -06:00
implementation "androidx.room:room-runtime:$room_version"
ksp "androidx.room:room-compiler:$room_version"
2022-01-21 14:15:53 -05:00
implementation "androidx.room:room-ktx:$room_version"
2021-10-29 21:13:58 -04:00
// OkHttp (HTTP library)
2025-12-18 00:00:59 +01:00
implementation 'com.squareup.okhttp3:okhttp:5.3.2'
2021-11-01 09:57:05 -04:00
2021-11-21 08:56:24 -05:00
// Firebase, sigh ... (only Google Play)
2025-12-18 00:00:59 +01:00
playImplementation 'com.google.firebase:firebase-messaging:25.0.1'
2021-10-29 21:13:58 -04:00
// RecyclerView
2025-12-18 00:00:59 +01:00
implementation "androidx.recyclerview:recyclerview:1.4.0"
2021-11-14 14:20:30 -05:00
// Swipe down to refresh
2025-12-18 00:00:59 +01:00
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0'
2021-11-14 14:20:30 -05:00
// Material design
2025-09-18 20:06:08 +02:00
implementation "com.google.android.material:material:1.13.0"
// LiveData
2025-12-18 00:00:59 +01:00
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.10.0"
2021-10-27 22:25:02 -04:00
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
2022-01-10 15:36:50 -05:00
// Image viewer
2025-08-17 19:59:09 -04:00
implementation 'com.github.stfalcon-studio:StfalconImageViewer:1.0.1'
2025-08-17 20:05:33 -04:00
2025-09-19 13:10:13 -04:00
// Glide (GIF support)
2025-09-19 13:14:08 -04:00
def glide_version = "5.0.5"
implementation "com.github.bumptech.glide:glide:$glide_version"
ksp "com.github.bumptech.glide:ksp:$glide_version"
2025-09-19 13:10:13 -04:00
2025-08-17 20:05:33 -04:00
// Better click handling for links
implementation 'me.saket:better-link-movement-method:2.2.0'
// Markdown
implementation 'io.noties.markwon:core:4.6.2'
implementation 'io.noties.markwon:image-picasso:4.6.2'
implementation 'io.noties.markwon:image:4.6.2'
implementation 'io.noties.markwon:linkify:4.6.2'
implementation 'io.noties.markwon:ext-tables:4.6.2'
implementation 'io.noties.markwon:ext-strikethrough:4.6.2'
2025-09-01 14:23:56 -04:00
// Used by Markdown library, R8 complains if these are not here
implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.29"
implementation "com.caverock:androidsvg:1.4"
}