-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
50 lines (43 loc) · 1.78 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
50 lines (43 loc) · 1.78 KB
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.compose.multiplatform) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.android.kmp.library) apply false
alias(libs.plugins.compose) apply false
alias(libs.plugins.detekt) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.kover) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.secrets) apply false
alias(libs.plugins.sqldelight) apply false
alias(libs.plugins.screenshot) apply false
}
// Temporary fix for screenshot testing library
allprojects {
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "com.google.guava" && requested.name == "guava") {
useVersion("33.2.0-jre") // Force a stable, recent version
because("Align Guava to prevent runtime errors.")
}
}
}
}
val isWindows = System.getProperty("os.name").lowercase().contains("windows")
val gradleExecutable = if (isWindows) "gradlew.bat" else "./gradlew"
tasks.register<Exec>("assembleReleaseFdroid") {
group = "build"
description = "Builds the app with the fdroid flavor properties."
commandLine(gradleExecutable, "assembleRelease", "-flavor=fdroid")
}
tasks.register<Exec>("assembleDebugFdroid") {
group = "build"
description = "Builds the app with the fdroid flavor properties."
val isWindows = println(System.getProperty("os.name")).let {
System.getProperty("os.name").lowercase().contains("windows")
}
val command = if (isWindows) "gradlew.bat" else "./gradlew"
commandLine(command, "assembleDebug", "-flavor=fdroid")
}