mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
Embedded tabs, the full-screen web browser and the nsite/napplet windows now share one set of Compose components (commonsUI browser/ui/pill): - Embedded tabs: EmbeddedTabChrome carries a BrowserPillUi plus one event callback. The tab layer draws BrowserPill, FindInPagePill and ConsoleSheet. The address editor suggests favorites and history. - Embedded page dialogs: PageDialogCard, PermissionPromptCard (now with "Only this time") and PageInfoSheet. Page info reports the certificate as fields, and site permissions can be edited in place. - Full-screen windows: BrowserChromeHost hosts the same composables in ComposeViews over the WebView, replacing the hand-built View chrome. - Clear site data asks for confirmation first. Removed the old renderers: NappletControlSheet, BrowserFindBar, NappletConsolePanel, BrowserJsDialogs, BrowserChromeLabels, TopControlSheet, EmbeddedFindBar, BottomConsoleSheet and EmbeddedPageDialogs, plus the strings only they used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TEkj7Eo2xbidVHAoF8GZKQ
64 lines
2.4 KiB
Kotlin
64 lines
2.4 KiB
Kotlin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.androidLibrary)
|
|
// The full-screen browser / napplet windows draw the shared Compose browser chrome (commonsUI).
|
|
alias(libs.plugins.jetbrainsComposeCompiler)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.vitorpamplona.amethyst.napplethost"
|
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
|
|
defaultConfig {
|
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
buildTypes {
|
|
// :amethyst defines a `benchmark` build type (release + profileable) for macrobenchmarks.
|
|
// Declare a matching variant here so the app can resolve this library for benchmark builds.
|
|
create("benchmark") {
|
|
initWith(getByName("release"))
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_21)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// The sandbox runtime depends ONLY on the protocol/contract (commons), the shell/shim
|
|
// Compose resources it serves (commonsUI's NappletWebContract) and Nostr resolution
|
|
// (quartz) — never on :amethyst. This makes it impossible for the `:napplet` process code to
|
|
// reach for Amethyst.instance / LocalCache / Account (which don't exist in that process).
|
|
implementation(project(":commons"))
|
|
implementation(project(":commonsUI"))
|
|
implementation(project(":quartz"))
|
|
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.activity)
|
|
implementation(libs.jetbrains.compose.ui)
|
|
implementation(libs.jetbrains.compose.foundation)
|
|
implementation(libs.jetbrains.compose.runtime)
|
|
implementation(libs.jetbrains.compose.material3)
|
|
implementation(libs.jetbrains.compose.components.resources)
|
|
implementation(libs.androidx.webkit)
|
|
implementation(libs.okhttp)
|
|
|
|
// Tree-level JSON for the bridge/broker envelopes (no @Serializable codegen, so no plugin needed).
|
|
implementation(libs.kotlinx.serialization.json)
|
|
|
|
// Provider side of the cross-process UI embedding: hosts the browser WebView in this keyless
|
|
// `:napplet` process and ships its rendered surface to the main app via SurfaceControlViewHost.
|
|
implementation(libs.androidx.privacysandbox.ui.core)
|
|
implementation(libs.androidx.privacysandbox.ui.provider)
|
|
}
|