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

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

build.gradle.kts55 lines · 2.1 KiBRaw
1plugins {
2 id("common-conventions-app")
3 // No metadata convention. The viewfinder is the screen, and Layoutlib cannot open a
4 // camera, so there is nothing a Compose preview could capture — with no SurfaceRequest
5 // the preview falls back to a black Box. The listing images are hand-captured and
6 // committed under metadata_data/photos/camera/phone/, which the release build
7 // picks up into graphics/phone-screenshots.
8}
9
10launcherIcon {
11 symbol = "photo_camera"
12}
13
14android {
15 defaultConfig {
16 applicationId = "com.vayunmathur.camera"
17 }
18 androidResources {
19 // *.maml are read straight out of the APK by the segmenters, so
20 // leave them uncompressed: fp16 weights barely deflate, and a compressed asset would
21 // have to be inflated into a heap buffer before it could be uploaded.
22 noCompress += "maml"
23 }
24}
25
26androidComponents {
27 onVariants { variant ->
28 variant.sources.jniLibs?.addStaticSourceDirectory(
29 layout.buildDirectory.dir("rustJniLibs").get().asFile.absolutePath
30 )
31 }
32}
33
34// Native panorama stitcher + night burst aligner (Rust). See camera/src/main/rust/.
35rustNativeLib("camera_stitch", "camera")
36
37dependencies {
38 implementation(libs.androidx.camera.core)
39 implementation(libs.androidx.camera.camera2)
40 implementation(libs.androidx.camera.lifecycle)
41 implementation(libs.androidx.camera.view)
42 implementation(libs.androidx.camera.video)
43 implementation(libs.androidx.camera.compose)
44 implementation(libs.androidx.camera.extensions)
45 implementation(libs.androidx.exifinterface)
46 implementation(libs.zxing.core)
47 // On-device portrait segmentation and matting. MediaPipe Selfie Segmentation
48 // (Apache-2.0) for the preview plus MODNet photographic-portrait matting
49 // (Apache-2.0) for still capture, both on our own Vulkan compute runtime;
50 // see camera/src/main/assets/README.md.
51 //
52 // ncnn is gone from the whole tree, not just this app: `:translate` was the last consumer and
53 // it now runs SMaLL-100 on `:library:ml` too, so `libncnn_android.so` is in no APK here.
54 implementation(project(":library:ml"))
55}