1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
// Release signing comes from the environment (CI secrets):
// ANDROID_KEYSTORE_PATH, KEYSTORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD
// Without them the release build stays unsigned (local dev only).
val keystorePath: String? = System.getenv("ANDROID_KEYSTORE_PATH")
android {
namespace = "com.arblant.railwayipscanner"
compileSdk = 34
defaultConfig {
applicationId = "com.arblant.railwayipscanner"
minSdk = 24
targetSdk = 34
versionCode = 2
versionName = "2.0.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
if (keystorePath != null) {
create("release") {
storeFile = file(keystorePath)
storePassword = System.getenv("KEYSTORE_PASSWORD")
keyAlias = System.getenv("KEY_ALIAS") ?: "railway"
keyPassword = System.getenv("KEY_PASSWORD")
storeType = "PKCS12"
enableV1Signing = true
enableV2Signing = true
enableV3Signing = true
enableV4Signing = true
}
}
}
buildTypes {
release {
isMinifyEnabled = false
if (keystorePath != null) {
signingConfig = signingConfigs.getByName("release")
}
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
viewBinding = true
}
}
dependencies {
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
}