Setup Android Gitignore

This documentation was generated with the assistance of AI. Please report any inaccuracies.

iru-setup-android-gitignore composes the root .gitignore and one per-module .gitignore for an Android (Gradle/Kotlin) library or app project, using irurueta-android-glutils's own .gitignore, lib/.gitignore and app/.gitignore as the concrete reference templates. It never overwrites an existing .gitignore silently: it announces whether it is creating files from scratch or updating existing ones, and for each pre-existing file it warns, shows a diff and asks the user to Update, Keep as is, or Replace.

Purpose

The skill produces a house-standard Android .gitignore: an unconditional root base (Gradle build output, local.properties, IDE files, keystores, google-services.json, profiling output, the Kotlin 2.x compiler’s root-level .kotlin/ cache, the UI tests' .ui-screenshots/ capture directory, plus the catalog’s own Antora docs/build//docs/node_modules/ additions), a one-line anchored /build .gitignore for each Gradle module, and a conditionally-detected root section for Fastlane output. It deliberately never ignores a vendored jacoco-<ver>/ JaCoCo CLI directory if the repository vendors one (as the reference repository does, for iru-setup-android-github-workflows’ opt-in coverage-conversion fallback), since CI would depend on that directory staying tracked to convert coverage without a network dependency. It mirrors `iru-setup-java-gitignore’s warn-and-ask contract (Update / Keep as is / Replace per pre-existing file), adapted to the Android/Gradle ecosystem. `.ui-screenshots/ is the repository-wide capture directory of the catalog’s UI contract (cleared by every full UI test run, with the few images the docs use copied into the Antora module’s images/ui/), so it is ignored unconditionally; the committed .ui-quality.yml next to it is never ignored.

Purpose group

Plugin

Shipped by the iru-android plugin of the ai-catalog marketplace (install with /plugin install iru-android@ai-catalog; see Plugins).

Invocation

/iru-setup-android-gitignore

Inputs

Argument Required Description Default

mode

No

new or existing. Selects whether the skill should expect to write fresh files or work with files that already exist. existing never means "update silently": every pre-existing file still goes through the Update / Keep / Replace question unless on-existing decides it.

Detected from whether a root .gitignore already exists (present → existing, absent → new).

modules

No

Comma- or space-separated Gradle module directory names that should each get their own /build-only .gitignore (e.g. lib, app).

Derived from every include(":<name>") entry in settings.gradle.kts/settings.gradle; if neither file exists yet, falls back to whichever of lib/app exist as directories, or asks the user via AskUserQuestion.

on-existing

No

ask, keep, update or replace. How each already-existing .gitignore is treated: ask asks per file; the others apply that choice to every pre-existing file without asking (the warning and diff are still shown). Meant for scripted runs; an orchestrator passes it only if it received it itself.

ask

Outputs

  • A root .gitignore — newly created, or, when one already existed, updated (merged), replaced with the bare template, or left as is, according to the user’s answer or on-existing.

  • A <module>/.gitignore for each resolved module (typically lib, app) — newly created, or handled the same way as the root file when it existed; skipped entirely when its content already matches.

  • A closing report stating whether the run created from scratch or updated existing files, the action taken per pre-existing file (updated / replaced / kept as is, and whether the user or on-existing chose it, with the template lines still missing from each kept file), which conditional Step 4 section (Fastlane) was included versus skipped and why, and confirmation that no ignore pattern would match a vendored jacoco-<ver>/ CLI directory if the repository has one.

Execution flow

flowchart TD A[Start /iru-setup-android-gitignore] --> B["Resolve mode, on-existing and modules\n(settings.gradle.kts include(...) entries,\nor lib/app fallback, or ask user)"] B --> C{"Root or any module\n.gitignore already exists?"} C -- no --> C1["Announce: creating from scratch"] C -- yes --> E["Announce: updating existing\nlist existing files"] C1 --> D["Compose root base template\n+ per-module /build line"] E --> D D --> F["Detect conditional root additions:\nFastlane output"] F --> G["Compose proposed content\n(merge with existing lines if any)"] G --> H{"Did this file\nalready exist?"} H -- no --> I["Write file directly"] H -- yes --> J["Show diff, then ask per file\n(or apply on-existing):\nUpdate, Keep as is, Replace"] J -- Update --> I J -- Replace --> I2["Write bare template"] J -- Keep as is --> K["Leave existing file untouched"] I --> L["Report per file and action taken,\nconfirm jacoco-&lt;ver&gt;/ stays untouched"] I2 --> L K --> L

Dependencies

Invokes

None — iru-setup-android-gitignore is a leaf skill; it does not call any other skill in this catalog.

Invoked by

  • Setup Android Repository — Step 6 runs iru-setup-android-gitignore after iru-setup-android-library/iru-setup-android-app and iru-setup-antora have run, so it can detect their generated module layout (settings.gradle.kts) and Antora docs build output already in place.

None — this skill does not delegate any part of its work to a built-in agent.

Source

SKILL.md on GitHub — the file this page was generated from.