2025-12-18 00:46:00 +01:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
|
|
2025-03-20 22:15:23 -06:00
|
|
|
plugins {
|
|
|
|
|
id 'com.google.devtools.ksp'
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-25 09:01:10 -04:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
apply plugin: 'kotlin-android'
|
2021-10-29 21:13:58 -04:00
|
|
|
apply plugin: 'com.google.gms.google-services'
|
2021-10-25 09:01:10 -04:00
|
|
|
|
|
|
|
|
android {
|
2025-03-20 22:15:23 -06:00
|
|
|
namespace "io.heckel.ntfy"
|
2025-12-18 00:46:00 +01:00
|
|
|
compileSdkVersion 36
|
2021-10-25 09:01:10 -04:00
|
|
|
|
|
|
|
|
defaultConfig {
|
2021-10-25 16:16:23 -04:00
|
|
|
applicationId "io.heckel.ntfy"
|
2025-12-18 00:19:39 +01:00
|
|
|
minSdkVersion 26
|
2025-12-23 10:13:06 -05:00
|
|
|
targetSdkVersion 36
|
2021-11-03 16:24:36 -04:00
|
|
|
|
2026-04-07 14:55:24 -04:00
|
|
|
versionCode 61
|
|
|
|
|
versionName "1.25.0"
|
2021-10-25 09:01:10 -04:00
|
|
|
|
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2021-11-11 22:14:28 -05:00
|
|
|
|
|
|
|
|
/* Required for Room schema migrations */
|
2025-09-17 14:40:34 -04:00
|
|
|
ksp {
|
|
|
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
2021-11-11 22:14:28 -05:00
|
|
|
}
|
2025-03-20 22:15:23 -06:00
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
buildConfig true
|
|
|
|
|
}
|
2021-10-25 09:01:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
release {
|
2025-09-17 16:27:34 -04:00
|
|
|
minifyEnabled false
|
|
|
|
|
shrinkResources false
|
2021-11-01 14:28:57 -04:00
|
|
|
debuggable false
|
2025-12-23 15:38:08 -05:00
|
|
|
// DEV/TEST ONLY: Uncomment this to test the release build with a debug key.
|
|
|
|
|
// This is required to test against the production Firebase config.
|
2025-12-30 11:41:57 -05:00
|
|
|
// signingConfig signingConfigs.debug
|
2021-11-01 14:28:57 -04:00
|
|
|
}
|
|
|
|
|
debug {
|
2021-10-25 09:01:10 -04:00
|
|
|
minifyEnabled false
|
2025-09-17 16:27:34 -04:00
|
|
|
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'
|
2025-10-12 17:57:55 -04:00
|
|
|
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'
|
2025-10-12 17:57:55 -04:00
|
|
|
buildConfigField 'boolean', 'PAYMENT_LINKS_AVAILABLE', 'true'
|
2021-10-25 09:01:10 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
2025-03-20 22:15:23 -06:00
|
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_17
|
2021-10-25 09:01:10 -04:00
|
|
|
}
|
|
|
|
|
|
2025-12-18 00:46:00 +01:00
|
|
|
kotlin {
|
|
|
|
|
compilerOptions {
|
|
|
|
|
jvmTarget = JvmTarget.JVM_17
|
|
|
|
|
freeCompilerArgs = [
|
|
|
|
|
'-Xjvm-default=all-compatibility' // https://stackoverflow.com/a/71234042/1440785
|
|
|
|
|
]
|
|
|
|
|
}
|
2021-10-25 09:01:10 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-05 20:24:05 -05:00
|
|
|
// Disables GoogleServices tasks for F-Droid variant
|
2022-11-08 19:14:25 +01:00
|
|
|
android.applicationVariants.all { variant ->
|
|
|
|
|
def shouldProcessGoogleServices = variant.flavorName == "play"
|
2025-12-18 00:46:00 +01:00
|
|
|
def googleTask = tasks.named("process${variant.name.capitalize()}GoogleServices").get()
|
2022-11-08 19:14:25 +01:00
|
|
|
googleTask.enabled = shouldProcessGoogleServices
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-25 09:01:10 -04:00
|
|
|
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"
|
2026-04-10 21:45:01 -04:00
|
|
|
implementation "androidx.core:core-ktx:1.18.0"
|
2025-12-18 00:00:59 +01:00
|
|
|
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
|
2026-04-10 21:45:01 -04:00
|
|
|
implementation "androidx.activity:activity-ktx:1.13.0"
|
2025-12-18 00:00:59 +01:00
|
|
|
implementation "androidx.fragment:fragment-ktx:1.8.9"
|
2026-04-10 21:45:01 -04:00
|
|
|
implementation "androidx.work:work-runtime-ktx:2.11.2"
|
2025-12-18 00:00:59 +01:00
|
|
|
implementation 'androidx.preference:preference-ktx:1.2.1'
|
2021-11-11 19:41:29 -05:00
|
|
|
|
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
|
|
|
|
2021-11-11 19:41:29 -05: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
|
|
|
|
2021-10-25 09:01:10 -04:00
|
|
|
// RecyclerView
|
2025-12-18 00:00:59 +01:00
|
|
|
implementation "androidx.recyclerview:recyclerview:1.4.0"
|
2021-10-25 09:01:10 -04:00
|
|
|
|
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
|
|
|
|
2021-10-25 09:01:10 -04:00
|
|
|
// Material design
|
2025-09-18 20:06:08 +02:00
|
|
|
implementation "com.google.android.material:material:1.13.0"
|
2021-10-25 09:01:10 -04:00
|
|
|
|
|
|
|
|
// 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
|
2026-02-14 16:59:38 -05:00
|
|
|
implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.31"
|
2025-09-01 14:23:56 -04:00
|
|
|
implementation "com.caverock:androidsvg:1.4"
|
2021-10-25 09:01:10 -04:00
|
|
|
}
|