SimonMarquis / Android-Playground

๐Ÿ› Playground for Android projects

Repository from Github https://github.comSimonMarquis/Android-PlaygroundRepository from Github https://github.comSimonMarquis/Android-Playground

๐Ÿ› Android Playground

Open in GitHub Codespaces

๐ŸŒ‘ โ˜€๏ธ
screenshot dark screenshot light
๐Ÿ“œ Open Source licensesโ€ฆscreenshot OSS dark
๐Ÿ“œ Open Source licensesโ€ฆscreenshot OSS light

๐Ÿ˜ Gradle

Task Description
gradlew assembleDebug Build debug APK
gradlew assembleRelease Build release APK (optimized & minified)
gradlew apiCheck Checks project public API (BCV)
gradlew apiDump Dumps project public API (BCV)
gradlew licensee Runs Licensee dependency license validation
gradlew topologyCheck Checks the topology of project dependencies
gradlew dependencyLockState --write-locks Updates dependency lock state
gradlew ciBadging -Pplayground.isMinifyEnabled=false CI badging checks
gradlew ciLint CI Lint checks (html/sarif/txt/xml)
gradlew ciUnitTest CI unit tests (html/xml)
gradlew verifyScreenshots Verify screenshot tests images against golden images
gradlew recordScreenshots Record screenshot tests golden images
gradlew cleanRecordScreenshots Clean and record screenshot tests golden images
gradlew generateBaselineProfile Generates Baseline & Startup profiles
gradlew connectedBenchmarkAndroidTest Runs benchmark tests
gradlew assembleRelease -Pplayground.compose.compilerMetrics Compose compiler metrics
gradlew assembleRelease -Pplayground.compose.compilerReports Compose compiler reports
gradlew globalCi --write-verification-metadata pgp,sha256 --export-keys Generates verification metadata & keyring
gradlew graphDump Dumps project dependencies to a mermaid file
gradlew graphUpdate Updates Markdown file with the corresponding dependency graph

๐Ÿ™ GitHub workflows

  • ๐Ÿญ CI
  • โ™ป๏ธ Clear GitHub Actions cache
  • ๐Ÿค– Dependabot auto-merge
  • ๐Ÿค– Dependabot Gradle dependencies
  • ๐Ÿ˜ Gradle dependency lock state
  • ๐Ÿ˜ Gradle dependency signatures
  • ๐Ÿ˜ Gradle dependency submission
  • ๐Ÿ˜ Gradle experiments
  • ๐Ÿ˜ Gradle Wrapper updater
  • ๐Ÿ“ธ Paparazzi Golden Images
  • โšก Startup & Baseline Profiles
  • ๐Ÿš€ Publish to Google Play

๐Ÿ™ GitHub composite actions

๐Ÿ•ต๏ธ Lint checks

  • AssertionsDetector
    • Prefer using kotlin.test assertions instead of JUnit's in Kotlin unit tests.
    • Prefer using kotlin.test assertions instead of assert in unit tests. Its execution requires a specific JVM option to be enabled on the JVM.
    • Prefer using assertIs and assertIsNot assertions when checking for types instead of boolean assertions.
    • Prefer using assertEquals/assertSame and assertNotEquals/assertNotSame assertions when checking for equality instead of boolean assertions.
  • GradleVersionCatalogDetector
    • Dependencies should be sorted alphabetically to maintain consistency and readability.
    • Dependencies should follow the configured regex.
    • Extracting a version in the [versions] section is useful only if it is used more than once or referenced elsewhere.
    • Dependency declaration should use the simplest form possible, omitting unnecessary inline tables.
  • NamedParametersDetector
    • Not specifying parameters name using the same type can lead to unexpected results when refactoring methods signature.
      Enforcing explicit named parameters also helps detecting mistakes during code review.
      Quick fix: โŒฅโŽ (macOS) or Alt+Enter (Windows/Linux) โž Add names to call arguments.
    • Using a variable for a function call parameter while another parameter with the exact same name exists is probably a bug.
  • TestMethodBannedWordsDetector
    • Test methods name should not contains banned words. The default behavior checks for failure,failed words to reduce collisions when searching through logs.
  • TypographyDetector
    • Escaped character are impossible to decipher for a human. Using unescaped character is generally self explanatory.
    • Typography can be replaced with a better alternative.
    • Curly quotes must be replaced with straight quote as Talkback does not properly handle them.

๐Ÿ—๏ธ Architecture

---
config:
  layout: elk
  elk:
    nodePlacementStrategy: SIMPLE
---
graph TB
  subgraph :core
    direction TB
    :core:android[android]:::android-library
    :core:datastore[datastore]:::jvm
    :core:di[di]:::jvm
    :core:ui[ui]:::android-library
    :core:utils[utils]:::jvm
  end
  subgraph :domain
    direction TB
    :domain:dice[dice]:::jvm
    :domain:licenses[licenses]:::jvm
    :domain:settings[settings]:::jvm
  end
  subgraph :data
    direction TB
    :data:dice[dice]:::jvm
    :data:licenses[licenses]:::jvm
    :data:settings[settings]:::jvm
  end
  subgraph :feature
    direction TB
    :feature:home[home]:::android-library
    :feature:licenses[licenses]:::android-library
  end
  :profiling[profiling]:::android-test
  :app[app]:::android-application

  :app -.-> :core:android
  :app -.-> :core:di
  :app -.-> :core:ui
  :app -.-> :data:dice
  :app -.-> :data:licenses
  :app -.-> :data:settings
  :app -.-> :domain:dice
  :app -.-> :domain:settings
  :app -.-> :feature:home
  :app -.-> :feature:licenses
  :app -.->|baselineProfile| :profiling
  :core:android -.-> :core:di
  :core:android -.-> :core:utils
  :core:datastore -.-> :core:di
  :core:utils -.-> :core:di
  :data:dice -.-> :core:datastore
  :data:dice -.-> :core:di
  :data:dice ---> :domain:dice
  :data:licenses -.-> :core:di
  :data:licenses ---> :domain:licenses
  :data:settings -.-> :core:datastore
  :data:settings ---> :domain:settings
  :feature:home -.-> :core:di
  :feature:home -.-> :core:ui
  :feature:home ---> :domain:dice
  :feature:home ---> :domain:settings
  :feature:licenses -.-> :core:di
  :feature:licenses -.-> :core:ui
  :feature:licenses ---> :domain:licenses
  :profiling -.->|testedApks| :app

classDef android-application fill:#2C4162,stroke:#fff,stroke-width:2px,color:#fff;
classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff;
classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff;
classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff;
Loading

About

๐Ÿ› Playground for Android projects

License:MIT License


Languages

Language:Kotlin 99.4%Language:Dockerfile 0.6%