Claude/build clu android ide pem2 n#2
Merged
Conversation
Adds .github/workflows/clu-android.yml with four jobs:
lint — runs :app:lintDebug; uploads HTML report as artifact
unit-tests — runs :app:testDebugUnitTest with --continue; publishes
JUnit XML via mikepenz/action-junit-report; uploads HTML test report
assemble-debug — gated on unit-tests passing; runs :app:assembleDebug;
uploads app-debug.apk artifact (clu-debug-<sha>) with 14-day retention;
uploads build reports on failure for diagnosis
build-result — summary gate job (always runs); intended as the single
required check for branch protection rules
Workflow triggers on push/PR to main or develop when clu-android/** or
the workflow file itself changes; workflow_dispatch for manual runs.
Concurrency: cancel-in-progress on feature branches, preserve on main/develop.
Android SDK setup:
- ubuntu-latest pre-installed SDK used (ANDROID_SDK_ROOT)
- sdkmanager installs platforms;android-36 and build-tools;36.0.0
- licenses accepted non-interactively before each build step
Also adds the Gradle wrapper files (gradlew, gradlew.bat,
gradle/wrapper/gradle-wrapper.{jar,properties}) using Gradle 9.2.1
to match the existing demo-compose-app Android project in this repo.
https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
- RamDisk: mounts tmpfs (size=4G) via root shell for Gradle build artifacts, protecting NAND flash from write amplification during iterative compile cycles; falls back transparently to context.cacheDir when root is unavailable - AndroidBuildRunner: uses RamDisk when supplied — redirects buildDirectory via init.gradle, sets --project-cache-dir to ramdisk, adds --no-daemon and --max-workers=2 to avoid Phantom Process Killer termination mid-build; copies final APK to persistent storage and flushes ramdisk in finally block - BuildGate: AtomicBoolean gate that blocks new builds when memory pressure hits TRIM_MEMORY_RUNNING_CRITICAL; resumed automatically below RUNNING_LOW - CluApplication: overrides onTrimMemory to flip BuildGate, mounts RamDisk asynchronously after shell init, unmounts on termination - Tests: RamDiskTest (mount/fallback/flush/unmount), AndroidBuildRunnerTest (BuildGate suspension, ramdisk APK preference, apkPath field) https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
… convenience API NativeExecutionTools (ai.clu.brain.tools): - Four @Tool-annotated methods wiring CLU's core capabilities to any LangChain4j AiServices-compatible LLM (Ollama/Gemma3, Anthropic, etc.) - scaffoldComposeComponent: pure Kotlin file I/O — create/update/delete .kt files with parent-directory creation; no external binaries - gradleBuild: delegates to AndroidBuildRunner + RamDisk tmpfs pipeline; returns BUILD SUCCESS/FAILED with APK path or first 2 000 chars of error output - shizukuDeploy: pm install then am start via ShizukuDeployer; short-circuits on install failure; validates APK existence before any Shizuku call - readLogcat: queries LogcatReader ring buffer; coerces maxLines to [1,200]; converts blank filter strings to null (matches any) ShizukuDeployer: add installAndLaunch() convenience method (install + launch in one call) ShellSessionManager: accept optional RamDisk in init(); mount is now sequenced inside the shell-init coroutine — runs after session is confirmed live on success, or falls back immediately on failure — eliminating the previous timing race CluApplication: pass RamDisk to ShellSessionManager.init() instead of launching a separate mount coroutine; clarify globalExceptionHandler doc NativeExecutionToolsTest: scaffold create/update/delete/error paths, BuildGate gating on gradleBuild, APK-not-found and install-failure paths for shizukuDeploy, empty-buffer sentinel and bounds-clamping for readLogcat https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR changes and why.
BREAKING:
*
DEPRECATED:
*
closes