-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
114 lines (105 loc) · 3.32 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
114 lines (105 loc) · 3.32 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import com.android.build.gradle.internal.tasks.factory.dependsOn
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated
import java.net.URL
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.compose)
id("kotlin-parcelize")
}
android {
namespace = "org.monogram.presentation"
compileSdk = 36
defaultConfig {
minSdk = 25
consumerProguardFiles("consumer-rules.pro")
externalNativeBuild {
cmake {
cppFlags("-std=c++17")
}
}
ndk {
abiFilters.add("arm64-v8a")
abiFilters.add("armeabi-v7a")
abiFilters.add("x86_64")
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures {
compose = true
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
}
}
externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
version = "3.22.1"
}
}
}
val downloadFolder = "src/main/cpp"
var vpxFolder = file("$downloadFolder/libvpx_build")
val vpxZip = file("$downloadFolder/libvpx_build.zip")
tasks.apply {
register("downloadVpx") {
onlyIf { !vpxFolder.isDirectory }
doLast {
println("Downloading VPX libs...")
vpxFolder.ensureParentDirsCreated()
URL("https://github.com/aliveoutside/prebuilt-vpx/releases/download/v.1/libvpx_build.zip")
.openStream().use { input ->
vpxZip.outputStream()
.use { output -> input.copyTo(output) }
}
}
}
register<Copy>("unzipVpx") {
dependsOn(this@apply.getByName("downloadVpx"))
onlyIf { !vpxFolder.isDirectory }
from(zipTree(vpxZip))
into(downloadFolder)
}
register<Delete>("downloadAndUnzipVpx") {
dependsOn("unzipVpx")
delete(vpxZip)
}
preBuild.dependsOn("downloadAndUnzipVpx")
}
dependencies {
implementation(project(":core"))
implementation(project(":domain"))
implementation(platform(libs.androidx.compose.bom))
implementation(libs.bundles.androidx.compose)
implementation(libs.bundles.androidx.camera)
implementation(libs.bundles.androidx.media3)
implementation(libs.bundles.coil)
implementation(libs.bundles.decompose)
implementation(libs.bundles.mvikotlin)
implementation(libs.bundles.koin)
implementation(libs.kotlinx.serialization.json)
implementation(libs.play.services.mlkit.barcode.scanning)
implementation(libs.zxing.core)
implementation(libs.androidx.biometric)
implementation(libs.androidx.security.crypto)
implementation(libs.maplibre.compose)
implementation(libs.play.services.oss.licenses)
implementation(libs.play.services.location)
testImplementation(libs.junit)
}