Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
aebbf7b
ADFA-5153: Decode Content rows against the shared Brotli dictionary
davidschachterADFA Aug 15, 2026
d9b82af
Apply spotlessApply formatting
davidschachterADFA Aug 15, 2026
bfb3baa
ADFA-5153: Narrow no-dictionary decode test to IOException
davidschachterADFA Aug 16, 2026
3465bff
ADFA-5153: Address code-review findings on the dictionary compression PR
davidschachterADFA Aug 17, 2026
e901f6c
ADFA-5153: Scope shared-dictionary claim to migrated brotli rows
davidschachterADFA Aug 17, 2026
61f2b5f
ADFA-5153: Add test proving the compression dictionary loads once
davidschachterADFA Aug 17, 2026
fafcf48
ADFA-5153: Reload compression dictionary per-request, not at swap time
davidschachterADFA Aug 17, 2026
3813981
ADFA-5153: Load compression dictionary lazily, once per database change
davidschachterADFA Aug 17, 2026
a13df02
Merge branch 'stage' into feature/ADFA-5153-content-brotli-dictionary
davidschachterADFA Aug 17, 2026
3a863a5
Merge branch 'stage' into feature/ADFA-5153-content-brotli-dictionary
davidschachterADFA Aug 17, 2026
568b21e
ADFA-5153: Run the brotli tests on any host, and cover the buffer helper
davidschachterADFA Aug 17, 2026
5a94e24
ADFA-5153: Cut peak heap on chunked rows, and stop retrying a bad deb…
davidschachterADFA Aug 17, 2026
9fbf2bb
ADFA-5153: Address CodeRabbit findings on the dictionary tests
davidschachterADFA Aug 18, 2026
3052217
ADFA-5153: Address jatezzz's review on PR #1677 (3 of 5 findings)
davidschachterADFA Aug 18, 2026
32731ec
Merge branch 'stage' into feature/ADFA-5153-content-brotli-dictionary
davidschachterADFA Aug 18, 2026
22fb908
Merge branch 'stage' into feature/ADFA-5153-content-brotli-dictionary
davidschachterADFA Aug 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.itsaky.androidide.build.config.BuildConfig
import com.itsaky.androidide.desugaring.utils.JavaIOReplacements.applyJavaIOReplacements
import com.itsaky.androidide.plugins.AndroidIDEAssetsPlugin
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.json.JSONObject
import java.io.BufferedOutputStream
import java.io.ByteArrayInputStream
Expand Down Expand Up @@ -214,6 +215,55 @@ configurations.configureEach {
exclude(group = "com.google.auto.value", module = "auto-value")
}

// brotli4j ships its native decoder as a per-OS/arch artifact, so the JVM unit tests need the one
// matching whoever is building. Mirrors build-logic/plugins' dispatch, but degrades to null on an
// unrecognized host instead of throwing: this runs at configuration time, so throwing would fail
// every task in the build -- including :app:assembleV8Debug, which needs no desktop native at all
// -- rather than only the JVM unit-test tasks that actually consume this dependency.
fun brotli4jNativeForHost(): Provider<MinimalExternalModuleDependency>? {
val arch = DefaultNativePlatform.getCurrentArchitecture()
val os = DefaultNativePlatform.getCurrentOperatingSystem()
val native =
when {
os.isMacOsX -> {
when {
arch.isArm64 -> libs.brotli4j.osx.aarch64
arch.isAmd64 -> libs.brotli4j.osx.x64
else -> null
}
}

os.isWindows -> {
when {
arch.isArm64 -> libs.brotli4j.windows.aarch64
arch.isAmd64 -> libs.brotli4j.windows.x64
else -> null
}
}

os.isLinux -> {
when {
arch.isArm64 -> libs.brotli4j.linux.aarch64
arch.isAmd64 -> libs.brotli4j.linux.x64
else -> null
}
}

else -> {
null
}
}
if (native == null) {
logger.warn(
"brotli4j: no native decoder for {}/{} -- brotli4j-backed JVM unit tests " +
"(e.g. BrotliDictionaryDecodeTest) will fail with UnsatisfiedLinkError on this host.",
os,
arch,
)
}
return native
}

dependencies {
debugImplementation(libs.common.leakcanary)

Expand Down Expand Up @@ -353,6 +403,13 @@ dependencies {

// brotli4j
implementation(libs.brotli4j)
// JVM unit tests (e.g. BrotliDictionaryDecodeTest) run brotli4j's real native decoder, not an
// Android target -- without a desktop native on the test classpath, Brotli4jLoader has nothing
// to load and every such test fails with UnsatisfiedLinkError. Pick the native for whoever is
// building, so the suite runs off a Linux x64 CI runner too (same dispatch as build-logic/plugins').
// Null on an unrecognized host just means those specific tests fail there -- see
// brotli4jNativeForHost's own warning -- not that this whole build should refuse to configure.
brotli4jNativeForHost()?.let { testImplementation(it) }

implementation(libs.common.markwon.core)
implementation(libs.common.markwon.linkify)
Expand Down
Loading
Loading