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

Modern-Apps.git / library / avatar / build.gradle.kts

build.gradle.kts37 lines · 1.1 KiBRaw
1plugins {
2 id("common-conventions-library")
3}
4
5android {
6 // Detached-fd asset handoff (YuuAvatarAssets): the .glb must stay stored
7 // uncompressed so openFd() maps it. Same arrangement as :library:ml.
8 aaptOptions {
9 noCompress += ".glb"
10 }
11}
12
13androidComponents {
14 onVariants { variant ->
15 variant.sources.jniLibs?.addStaticSourceDirectory(
16 layout.buildDirectory.dir("rustJniLibs").get().asFile.absolutePath
17 )
18 }
19}
20
21dependencies {
22 implementation(project(":library:ui"))
23 implementation(libs.androidx.lifecycle.runtime.compose)
24}
25
26// Yuu 3D avatar engine: `library/avatar/src/main/rust`, glTF upper-body base
27// mesh, skeletal skinning, preset poses, Vulkan-first + GLES fallback.
28//
29// Same arrangement as :library:map: the crate builds into rustJniLibs and
30// YuuAvatarNative.isAvailable gates every call, so devices without the .so
31// keep the 2D YuuFace preview. arm64 only (map precedent).
32rustNativeLib(
33 "yuu_avatar",
34 "avatar",
35 // yuu_avatar_gles.* are GLSL ES, compiled at run time by the GLES path.
36 shaders = listOf("yuu_avatar.vert", "yuu_avatar.frag"),
37)