po4yka/RIPDPI / .agents/skills/compose
compose
VerifiedJetpack Compose API guidance (state, modifiers, navigation, theming) plus a scored RIPDPI audit. Use for generic Compose API questions or an audit. Not for RIPDPI conventions (see android-compose-patterns).
scripts/compose-reports.init.gradle
View on GitHub// Gradle init script injected by the Jetpack Compose audit skill.
//
// Purpose: enable Compose Compiler reports + metrics for every module that
// applies the Compose Compiler plugin, without modifying the user's build
// files. Each module's output lands in <module>/build/compose_audit/.
//
// Usage (from the skill, not the user):
// ./gradlew <task> --init-script <path-to-this-file> --no-daemon
//
// Two code paths:
// A. Modern Compose Compiler Gradle plugin (Kotlin 2.0+) — configures the
// `composeCompiler { }` extension directly.
// B. Legacy compiler-plugin argument fallback — injects reportsDestination
// and metricsDestination via Kotlin compile task free args. Works on
// older toolchains that still apply the compiler plugin manually.
//
// The script is defensive: failures in one module must not fail the build.
allprojects { project ->
project.afterEvaluate {
def reportDir = new File(project.buildDir, "compose_audit")
// Path A: modern Compose Compiler Gradle plugin.
def composeExt = project.extensions.findByName("composeCompiler")
if (composeExt != null) {
try {
reportDir.mkdirs()
composeExt.reportsDestination.set(reportDir)
composeExt.metricsDestination.set(reportDir)
project.logger.lifecycle("compose-audit: reports -> ${reportDir}")
return
} catch (Throwable e) {
project.logger.warn("compose-audit: composeCompiler extension found but could not be configured: ${e.message}")
}
}
// Path B: legacy compiler-args fallback for projects that apply the
// Compose compiler plugin the old way (pre-Kotlin-2.0).
def anyConfigured = false
project.tasks.matching { it.name.startsWith("compile") && it.name.contains("Kotlin") }.configureEach { task ->
try {
def opts = task.hasProperty("compilerOptions") ? task.compilerOptions : null
if (opts == null) return
opts.freeCompilerArgs.addAll([
"-P", "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${reportDir.absolutePath}",
"-P", "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${reportDir.absolutePath}",
])
reportDir.mkdirs()
anyConfigured = true
} catch (Throwable ignored) {
// Silent — task may not be a Kotlin compile task.
}
}
if (anyConfigured) {
project.logger.lifecycle("compose-audit: reports -> ${reportDir} (legacy compiler-args path)")
}
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |