Skip to content

[Android] Setup sample lint and formatting - #585

Open
kiftio wants to merge 1 commit into
mainfrom
08-05-setup_sample_lint_and_formatting
Open

[Android] Setup sample lint and formatting#585
kiftio wants to merge 1 commit into
mainfrom
08-05-setup_sample_lint_and_formatting

Conversation

@kiftio

@kiftio kiftio commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Detekt and Android Lint static analysis have been extended to cover the CheckoutKitAndroidDemo sample app, in addition to the main library. This includes:

  • Adding the detekt plugin and configuration to the sample app's build.gradle, using a new detekt.config.yml scoped to the sample
  • Configuring Android Lint for the sample app with warningsAsErrors, dependency checking, and a lint.xml to suppress known false positives on branded vector assets
  • Updating the CI workflow to set up the storefront environment before running lint, and running both lintRelease and detekt against the sample app
  • Updating dev.yml commands (lint, format, check, detekt, android-lint) to also run against the sample app, with a check_storefront_env guard
  • Applying detekt auto-corrections across the sample app source files (import ordering, line length, blank line cleanup, and formatting fixes)
  • Replacing android.net.Uri.parse with androidx.core.net.toUri in AuthenticationHelper, moving the hero image to drawable-nodpi, removing unused launcher PNG assets, and removing unused string resources and imports

How to test

  1. Run dev android lint and confirm it passes for both the library and the sample app
  2. Run dev android check detekt and confirm detekt runs against both targets
  3. Run dev android format and confirm auto-correct applies to both targets
  4. Trigger the android-test CI workflow and confirm the new Sample static analysis and Android Lint step passes

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Aug 5, 2026
@kiftio kiftio mentioned this pull request Aug 5, 2026
11 tasks

kiftio commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kiftio
kiftio force-pushed the 08-05-setup_sample_lint_and_formatting branch from 03d0a9b to 6b9b36a Compare August 5, 2026 10:46
@kiftio kiftio mentioned this pull request Aug 5, 2026
11 tasks
android:layout_height="wrap_content"
android:elevation="0dp"
android:minHeight="?attr/actionBarSize"
android:paddingStart="4dp"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve rtl symmetry lint warning where the toolbar may not have symmetric spacing in right-to-left layouts

<lint>
<!-- Branded navigation assets retain their vector detail at the sample's display size. -->
<issue id="VectorPath">
<ignore path="src/main/res/drawable/home.xml" />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the vector files are fairly large, can address separately

Assisted-By: devx/18f5006f-f46a-4c19-9f9e-7503f5a6c6ff
@kiftio
kiftio force-pushed the 08-05-setup_sample_lint_and_formatting branch from 6b9b36a to 1de829d Compare August 5, 2026 11:00
@kiftio
kiftio marked this pull request as ready for review August 5, 2026 11:00
@kiftio
kiftio requested a review from a team as a code owner August 5, 2026 11:00
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Android release AAR 270.6 KiB 270.6 KiB +7 B
Android file breakdown
File Base Head Delta
classes.jar 286.1 KiB 286.1 KiB 0 B
res/layout/checkout_view_content.xml 2.2 KiB 2.3 KiB +35 B
res/layout/checkout_sheet_content.xml 2.0 KiB 2.0 KiB 0 B
res/values/values.xml 1.2 KiB 1.2 KiB 0 B
R.txt 1.1 KiB 1.1 KiB 0 B
proguard.txt 798 B 798 B 0 B
AndroidManifest.xml 578 B 578 B 0 B
res/drawable/close.xml 431 B 431 B 0 B
res/menu/checkout_menu.xml 354 B 354 B 0 B
META-INF/com/android/build/gradle/aar-metadata.properties 157 B 157 B 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@bitrise

bitrise Bot commented Aug 5, 2026

Copy link
Copy Markdown

Install this build

Open Tophat, select your target device, then click Install. Links open on the Mac running Tophat.

SDK Install
Kotlin Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
tests/shared/launch-smoke.yaml kotlin android latest Google Pixel 9
Android 17.0

@kiftio kiftio changed the title setup sample lint and formatting [Android] Setup sample lint and formatting Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant