-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
70 lines (63 loc) · 2.19 KB
/
build.gradle.kts
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
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}
android {
namespace = "ir.mahdiparastesh.fortuna"
compileSdk = 35
buildToolsVersion = System.getenv("ANDROID_BUILD_TOOLS_VERSION")
defaultConfig {
applicationId = "ir.mahdiparastesh.fortuna"
minSdk = 26
targetSdk = 35
versionCode = 15
versionName = "12.0.1"
val dropboxKey = System.getenv("FORTUNA_DROPBOX_KEY")
?: logger.warn("Dropbox app key was not found!")
buildConfigField("String", "DROPBOX_APP_KEY", "\"${dropboxKey}\"")
manifestPlaceholders.put("dropboxKey", dropboxKey)
}
sourceSets.getByName("main") {
manifest.srcFile("src/AndroidManifest.xml")
kotlin.srcDirs("src/kotlin")
}
setFlavorDimensions(listOf("calendar"))
productFlavors {
all { dimension = "calendar" }
create("iranian") { isDefault = true }
create("gregorian") { applicationIdSuffix = ".gregorian" }
}
sourceSets.getByName("iranian") { res.setSrcDirs(listOf("src/res", "src/res_iranian")) }
sourceSets.getByName("gregorian") { res.setSrcDirs(listOf("src/res", "src/res_gregorian")) }
compileOptions {
sourceCompatibility = JavaVersion.VERSION_22
targetCompatibility = JavaVersion.VERSION_22
}
kotlinOptions { jvmTarget = "22" }
buildFeatures { buildConfig = true; viewBinding = true }
signingConfigs {
create("release") {
storeFile = file(System.getenv("JKS_PATH"))
storePassword = System.getenv("JKS_PASS")
keyAlias = "fortuna"
keyPassword = System.getenv("JKS_PASS")
}
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
}
}
}
dependencies {
implementation(libs.activity.ktx)
implementation(libs.core.ktx)
implementation(libs.dropbox.android)
implementation(libs.dropbox.core)
implementation(libs.material)
}