Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / e2ee-openpgp / build.gradle.kts
build.gradle.kts27 lines · 1.1 KiBRaw
| 1 | plugins { |
| 2 | id("common-conventions-library") |
| 3 | } |
| 4 | |
| 5 | android { |
| 6 | // The convention plugin derives the namespace from the module name, which contains a hyphen |
| 7 | // ("e2ee-openpgp") and is not a valid package segment — so set it explicitly. |
| 8 | // Same package as :library:e2ee-p2p's PQC surface on purpose: the JNI entry |
| 9 | // points below (`Java_com_vayunmathur_e2ee_PgpNative_*`) are bound to this |
| 10 | // package, and consumers keep importing `com.vayunmathur.e2ee.Pgp`. |
| 11 | namespace = "com.vayunmathur.e2ee" |
| 12 | } |
| 13 | |
| 14 | androidComponents { |
| 15 | onVariants { variant -> |
| 16 | variant.sources.jniLibs?.addStaticSourceDirectory( |
| 17 | layout.buildDirectory.dir("rustJniLibs").get().asFile.absolutePath |
| 18 | ) |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | // Native OpenPGP (Rust: rPGP, RFC 9580 Ed25519 + X25519). Split out of |
| 23 | // :library:e2ee-p2p's `e2ee_pqc` crate (#873): only :securemail uses OpenPGP, |
| 24 | // and rPGP's cipher suite materially grows the .so for every other e2ee-p2p |
| 25 | // consumer (office, cast, findfamily, everysync, backup, voxels, ...). |
| 26 | // Phone-app only, so arm64-v8a alone (no :cast:tv 32-bit requirement here). |
| 27 | rustNativeLib("e2ee_pgp", "e2ee-pgp") |