mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
New :desktop Gradle module turns a computer into a NIP-46 signer with the same accounts, permission model and bunker flows as the Android app, built on the quartz-jvm artifact and Compose Multiplatform. - BunkerEngine ports NotificationSubscription + EventNotificationConsumer + BunkerRequestUtils: per-connection localKey subscriptions (kind 24133), auto-accept/auto-reject via the rememberType/acceptUntil rules, approval queue for everything else, and relay responses with retry/backoff - All NIP-46 methods supported: connect, sign_event, get_public_key, ping, nip04/nip44 encrypt/decrypt, nip44v3 encrypt/decrypt, decrypt_zap_event, sign_psbt, switch_relays, logout (NIP-55 is Android-only IPC and is intentionally out of scope) - Keys are AES-256-GCM encrypted at rest with the key held in a PKCS12 Java KeyStore; keystore + password files are owner-only permissions - Connections via pasted nostrconnect:// URIs or generated bunker:// URIs with QR code; per-app permissions, activity history and logs persisted as JSON per account - UI mirrors mobile: same theme/colors, bottom navigation (Incoming request / Applications / Relays / Settings), login/create-key with NIP-06 seed words, ncryptsec backup, multi-account switching - Packaging via compose nativeDistributions: dmg, msi, exe, deb, rpm - Tests: unit tests plus an opt-in (AMBER_E2E=1) end-to-end NIP-46 round-trip against a public relay Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YQTVwy8RBj7spdEK3aEc3i
50 lines
1.8 KiB
Kotlin
50 lines
1.8 KiB
Kotlin
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
plugins {
|
|
alias(libs.plugins.androidApplication) apply false
|
|
alias(libs.plugins.androidLibrary) apply false
|
|
alias(libs.plugins.serialization) apply false
|
|
alias(libs.plugins.kotlin.ksp) version libs.versions.ksp.get() apply false
|
|
alias(libs.plugins.gradle.ktlint) version libs.versions.ktlint.get() apply false
|
|
alias(libs.plugins.kotlinJvm) apply false
|
|
alias(libs.plugins.jetbrainsCompose) apply false
|
|
}
|
|
|
|
tasks.register<Copy>("installGitHook") {
|
|
from(File(rootProject.rootDir, "git-hooks/pre-commit"))
|
|
from(File(rootProject.rootDir, "git-hooks/pre-push"))
|
|
into(File(rootProject.rootDir, ".git/hooks"))
|
|
filePermissions {
|
|
unix(0b111_111_111)
|
|
}
|
|
}
|
|
|
|
project(":app") {
|
|
tasks.matching { it.name == "preBuild" }.configureEach {
|
|
dependsOn(rootProject.tasks.named("installGitHook"))
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
tasks.withType<KotlinCompile>().configureEach {
|
|
compilerOptions {
|
|
val buildDirPath = project.layout.buildDirectory.get().asFile.absolutePath
|
|
if (project.findProperty("composeCompilerReports") == "true") {
|
|
freeCompilerArgs.addAll(
|
|
"-P",
|
|
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
|
|
buildDirPath + "/compose_compiler",
|
|
)
|
|
}
|
|
if (project.findProperty("composeCompilerMetrics") == "true") {
|
|
freeCompilerArgs.addAll(
|
|
"-P",
|
|
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
|
|
buildDirPath + "/compose_compiler",
|
|
)
|
|
}
|
|
}
|
|
}
|
|
}
|