|
| 1 | +@file:Suppress("UnstableApiUsage") |
| 2 | + |
| 3 | +import org.jetbrains.kotlin.gradle.dsl.JvmTarget |
| 4 | + |
| 5 | +plugins { |
| 6 | + id("com.android.application") |
| 7 | + id("kotlin-android") |
| 8 | + id("org.jmailen.kotlinter") version "4.3.0" |
| 9 | +} |
| 10 | + |
| 11 | +android { |
| 12 | + namespace = "com.github.gotify" |
| 13 | + compileSdk = 34 |
| 14 | + defaultConfig { |
| 15 | + applicationId = "com.github.gotify" |
| 16 | + minSdk = 23 |
| 17 | + targetSdk = 34 |
| 18 | + versionCode = 32 |
| 19 | + versionName = "2.8.1" |
| 20 | + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
| 21 | + vectorDrawables.useSupportLibrary = true |
| 22 | + signingConfig = signingConfigs.getByName("debug") |
| 23 | + resValue("string", "app_name", "Gotify") |
| 24 | + } |
| 25 | + buildTypes { |
| 26 | + release { |
| 27 | + isMinifyEnabled = false |
| 28 | + proguardFiles( |
| 29 | + getDefaultProguardFile("proguard-android.txt"), |
| 30 | + "proguard-rules.pro" |
| 31 | + ) |
| 32 | + } |
| 33 | + register("development") { |
| 34 | + applicationIdSuffix = ".dev" |
| 35 | + isDebuggable = true |
| 36 | + resValue("string", "app_name", "Gotify DEV") |
| 37 | + } |
| 38 | + } |
| 39 | + buildFeatures { |
| 40 | + viewBinding = true |
| 41 | + buildConfig = true |
| 42 | + } |
| 43 | + compileOptions { |
| 44 | + sourceCompatibility = JavaVersion.VERSION_17 |
| 45 | + targetCompatibility = JavaVersion.VERSION_17 |
| 46 | + } |
| 47 | + kotlin { |
| 48 | + compilerOptions { |
| 49 | + jvmTarget.set(JvmTarget.JVM_17) |
| 50 | + } |
| 51 | + } |
| 52 | + packaging { |
| 53 | + resources { |
| 54 | + excludes.add("META-INF/DEPENDENCIES") |
| 55 | + } |
| 56 | + } |
| 57 | + lint { |
| 58 | + disable.add("GoogleAppIndexingWarning") |
| 59 | + lintConfig = file("../lint.xml") |
| 60 | + } |
| 61 | +} |
| 62 | + |
| 63 | +if (project.hasProperty("sign")) { |
| 64 | + android { |
| 65 | + signingConfigs { |
| 66 | + create("release") { |
| 67 | + storeFile = file(System.getenv("RELEASE_STORE_FILE")) |
| 68 | + storePassword = System.getenv("RELEASE_STORE_PASSWORD") |
| 69 | + keyAlias = System.getenv("RELEASE_KEY_ALIAS") |
| 70 | + keyPassword = System.getenv("RELEASE_KEY_PASSWORD") |
| 71 | + } |
| 72 | + } |
| 73 | + } |
| 74 | + android.buildTypes.getByName("release").signingConfig = android.signingConfigs.getByName("release") |
| 75 | +} |
| 76 | + |
| 77 | +dependencies { |
| 78 | + val coilVersion = "2.6.0" |
| 79 | + val markwonVersion = "4.6.2" |
| 80 | + val tinylogVersion = "2.7.0" |
| 81 | + implementation(project(":client")) |
| 82 | + implementation("androidx.appcompat:appcompat:1.7.0") |
| 83 | + implementation("androidx.core:core-splashscreen:1.0.1") |
| 84 | + implementation("com.google.android.material:material:1.12.0") |
| 85 | + implementation("androidx.constraintlayout:constraintlayout:2.1.4") |
| 86 | + implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") |
| 87 | + implementation("androidx.vectordrawable:vectordrawable:1.2.0") |
| 88 | + implementation("androidx.preference:preference-ktx:1.2.1") |
| 89 | + |
| 90 | + implementation("com.github.cyb3rko:QuickPermissions-Kotlin:1.1.3") |
| 91 | + implementation("io.coil-kt:coil:$coilVersion") |
| 92 | + implementation("io.coil-kt:coil-svg:$coilVersion") |
| 93 | + implementation("io.noties.markwon:core:$markwonVersion") |
| 94 | + implementation("io.noties.markwon:image-coil:$markwonVersion") |
| 95 | + implementation("io.noties.markwon:image:$markwonVersion") |
| 96 | + implementation("io.noties.markwon:ext-tables:$markwonVersion") |
| 97 | + implementation("io.noties.markwon:ext-strikethrough:$markwonVersion") |
| 98 | + |
| 99 | + implementation("org.tinylog:tinylog-api-kotlin:$tinylogVersion") |
| 100 | + implementation("org.tinylog:tinylog-impl:$tinylogVersion") |
| 101 | + |
| 102 | + implementation("com.google.code.gson:gson:2.11.0") |
| 103 | + implementation("com.squareup.retrofit2:retrofit:2.11.0") |
| 104 | + implementation("org.threeten:threetenbp:1.7.0") |
| 105 | +} |
| 106 | + |
| 107 | +configurations { |
| 108 | + configureEach { |
| 109 | + exclude(group = "androidx.lifecycle", module = "lifecycle-viewmodel-ktx") |
| 110 | + } |
| 111 | +} |
0 commit comments