Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / code / build.gradle.kts

build.gradle.kts35 lines · 1.1 KiBRaw
1plugins {
2 id("common-conventions-app")
3 // Listing screenshots come from Compose previews (src/screenshotTest), not from an
4 // instrumented test on a device. Same `:code:metadata` task name either way.
5 id("common-conventions-preview-metadata")
6}
7
8launcherIcon {
9 symbol = "code"
10}
11
12android {
13 defaultConfig {
14 applicationId = "com.vayunmathur.code"
15 }
16}
17
18// Native tree-sitter highlighter (Rust → libcode_ts.so, arm64-v8a). Built on every `code` build;
19// TreeSitterNative loads it at runtime and highlights the 10 supported languages, with the regex
20// tokenizer still covering the remaining languages. Requires the Android NDK +
21// `rustup target add aarch64-linux-android`; the pinned grammar set is locked in
22// code/src/main/rust/Cargo.lock.
23androidComponents {
24 onVariants { variant ->
25 val rustDir = layout.buildDirectory.dir("rustJniLibs").get().asFile.absolutePath
26 variant.sources.jniLibs?.addStaticSourceDirectory(rustDir)
27 }
28}
29rustNativeLib("code_ts", "code")
30
31dependencies {
32 implementation(libs.androidx.datastore.preferences)
33 implementation(libs.jgit)
34 implementation(libs.androidx.webkit)
35}