|
| 1 | +# Contentstack Android Persistence – Agent guide |
| 2 | + |
| 3 | +*Universal entry point* for contributors and AI agents. Detailed conventions live in **skills/*/SKILL.md**. |
| 4 | + |
| 5 | +## What this repo is |
| 6 | + |
| 7 | +| Field | Detail | |
| 8 | +| --- | --- | |
| 9 | +| *Name:* | [contentstack/contentstack-android-persistence](https://github.com/contentstack/contentstack-android-persistence) | |
| 10 | +| *Purpose:* | Android library that persists Contentstack sync data locally using Realm, so apps can work offline with the Contentstack Android SDK. | |
| 11 | +| *Out of scope (if any):* | Does not ship a standalone HTTP client or replace the Contentstack Android SDK; persistence and sync orchestration sit on top of `com.contentstack.sdk:android` and Realm. | |
| 12 | + |
| 13 | +## Tech stack (at a glance) |
| 14 | + |
| 15 | +| Area | Details | |
| 16 | +| --- | --- | |
| 17 | +| Language | Java 8 (source/target compatibility); JDK 17 used in release CI (`setup-java`). | |
| 18 | +| Build | Gradle with Android Gradle Plugin 8.2.x, Realm Android plugin 10.15.x; root `build.gradle`, `settings.gradle` (`:app`), `app/build.gradle`, `gradle.properties` (Maven coordinates, signing flags). | |
| 19 | +| Tests | Android/JUnit via Gradle (`test`, `connectedAndroidTest` when present); no `src/test` or `src/androidTest` trees in this repo yet—add tests under `app/src/test/` or `app/src/androidTest/` as applicable. | |
| 20 | +| Lint / coverage | Android Lint via `./gradlew :app:lint` (default Android lint integration). | |
| 21 | +| Other | Realm (`io.realm:realm-gradle-plugin`), Maven Central publishing (`com.vanniktech.maven.publish`), Contentstack Android SDK `com.contentstack.sdk:android` (see `app/build.gradle`). | |
| 22 | + |
| 23 | +## Commands (quick reference) |
| 24 | + |
| 25 | +| Command Type | Command | |
| 26 | +| --- | --- | |
| 27 | +| Build | `./gradlew clean build` | |
| 28 | +| Test | `./gradlew test` (unit); `./gradlew connectedAndroidTest` (instrumented, requires device/emulator) | |
| 29 | +| Lint | `./gradlew :app:lint` | |
| 30 | + |
| 31 | +**CI:** Release workflow runs `./gradlew clean build` before publish—see [.github/workflows/publish-release.yml](.github/workflows/publish-release.yml). Branch rules for `master` are in [.github/workflows/check-branch.yml](.github/workflows/check-branch.yml). |
| 32 | + |
| 33 | +## Where the documentation lives: skills |
| 34 | + |
| 35 | +| Skill | Path | What it covers | |
| 36 | +| --- | --- | --- | |
| 37 | +| Dev workflow | [skills/dev-workflow/SKILL.md](skills/dev-workflow/SKILL.md) | Branches, CI, Gradle commands, publishing expectations. | |
| 38 | +| Android Persistence SDK | [skills/android-persistence-sdk/SKILL.md](skills/android-persistence-sdk/SKILL.md) | Public API, Realm + Contentstack boundaries, initialization. | |
| 39 | +| Java & Android layout | [skills/java-android/SKILL.md](skills/java-android/SKILL.md) | Java conventions and module/source layout for this repo. | |
| 40 | +| Android platform & tooling | [skills/android-platform/SKILL.md](skills/android-platform/SKILL.md) | Gradle, Realm plugin, Android config, Maven publish, dependencies. | |
| 41 | +| Testing | [skills/testing/SKILL.md](skills/testing/SKILL.md) | Where to add tests, naming, and credentials policy. | |
| 42 | +| Code review | [skills/code-review/SKILL.md](skills/code-review/SKILL.md) | PR checklist and severity guidance. | |
| 43 | + |
| 44 | +An index with "when to use" hints is in [skills/README.md](skills/README.md). |
| 45 | + |
| 46 | +## Using Cursor (optional) |
| 47 | + |
| 48 | +If you use *Cursor*, [.cursor/rules/README.md](.cursor/rules/README.md) only points to *AGENTS.md*—same docs as everyone else. |
0 commit comments