Skip to content

Compilation capabilities

Jugg compilation capabilities build on the latest available Gradle build result. They prioritize the files changed in the current run and produce deployable artifacts. When a change is better handled by Gradle, Jugg prompts for or performs a Gradle fallback.

Capability overview

Core compilation flow

CapabilityCurrent supportTypical result
Source compilationSupports Java, Kotlin, and class inputsProduces class, DEX, or Release re-obfuscation artifacts
RecompilationSupports continued compilation of affected sourcesFinds callers, subclasses, constant consumers, and other affected sources, then adds another round
Resource compilationSupports the res/, assets/, resources.arsc, and R.java flowsProduces resource overlays or triggers source compilation
AndroidManifest compilationSupports incremental patches based on the merged manifestTakes effect after writing to the APK and re-signing it
Updating .so filesSupports updates to already generated .so filesTakes effect after writing to the target APK and re-signing it

Generated sources and language extensions

CapabilityCurrent supportTypical result
DataBinding/ViewBindingSupports two-stage handling after layout changesProduces base/split artifacts in the resource stage and mapper/BR output in the source stage
Kotlin ComposeSupports incremental compilation of common Compose Kotlin sourcesLoads the project's Compose compiler plugin and produces class/DEX output
KMP and Compose MultiplatformSupports KMP sources for Android targets and added or modified Compose Multiplatform resourcesCompletes KMP compilation inputs or generates accessors and deploys resources
Annotation processorsSupports explicitly listed annotation entry pointsGenerated sources continue into source compilation
Custom compilersSupports inserting stages through an SPIExtends Jugg's built-in compilation flow

Dependencies, Release, and fallback

CapabilityCurrent supportTypical result
Incremental dependency compilationSupports incremental handling of some dependency changes after a diffNew and old library artifacts enter the current compilation and deployment decisions
Release compilationExperimentally supports mapping consistency, inline handling, and removed-member compensationArtifacts enter deployment after re-obfuscation
AabResGuardSupports reading resources-mapping.txt for incremental resource linkingKeeps obfuscated resource names consistent
Gradle fallbackSupports automatic or user-triggered fallbackRe-establishes a trustworthy build baseline

IMPORTANT

Jugg does not replace the complete Gradle pipeline. Changes to Gradle scripts, dependencies, variants, source sets, complex plugin configuration, or large cross-module code sets may still require a Gradle build.

How the compilation flow fits together

text
Detect file changes
  -> Determine whether incremental handling is appropriate
  -> assets / native lib / AndroidManifest
  -> res / R.java / DataBinding/ViewBinding resource stage
  -> Annotation processors / KSP / KAPT / Compose and other source extensions
  -> Kotlin / Java / class
  -> DEX / Release minification
  -> Recompilation finds affected sources
  -> Hand artifacts to deployment

Users normally do not need to select stages manually. Jugg decides which stages to run based on changed file types, module ownership, APK ownership, and current deployment state.