Skip to content

feat: modernize Kotlin snippets module with capabilities and visual test suites - #2427

Open
dkhawk wants to merge 1 commit into
feat/snippets-java-appfrom
feat/snippets-kotlin-app
Open

dkhawk wants to merge 1 commit into
feat/snippets-java-appfrom
feat/snippets-kotlin-app

Conversation

@dkhawk

@dkhawk dkhawk commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Create :snippets:kotlin-app with 14 snippet categories, KTX extensions, and documentation region tags
  • Add Kotlin snippet infrastructure (KotlinSnippetsActivity, MapActivity, SnippetRegistry, TrackedMap)
  • Add Kotlin capabilities test suite (CatalogCapabilitiesTestSuite, CameraControl, Events, MapInit, Marker)
  • Add Kotlin visual test suite (BaseVisualTest, VisualTests)
  • Remove legacy Kotlin snippet modules (snippets/app-ktx, snippets/app-utils-ktx)
  • Update root settings.gradle.kts

Stacked Base

Stacked on #2426 (feat/snippets-java-app).

Reviewers

@kikoso

@dkhawk
dkhawk force-pushed the feat/snippets-kotlin-app branch from 3eb7aaa to 8c6b89b Compare September 15, 2026 00:25
@dkhawk
dkhawk force-pushed the feat/snippets-kotlin-app branch from 8c6b89b to 293149c Compare September 15, 2026 00:35
@dkhawk
dkhawk marked this pull request as ready for review September 15, 2026 00:38
@dkhawk
dkhawk requested a review from kikoso September 15, 2026 00:38
@snippet-bot

snippet-bot Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 128 region tags.
You are about to delete 40 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@dkhawk
dkhawk added this pull request to stack #2429 September 15, 2026 00:43
@dkhawk
dkhawk force-pushed the feat/snippets-kotlin-app branch from 293149c to 00469c2 Compare September 15, 2026 18:22
@dkhawk
dkhawk force-pushed the feat/snippets-kotlin-app branch from 00469c2 to 37ae58f Compare September 15, 2026 22:54

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Android Lint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

…est suites

- Create :snippets:kotlin-app with 14 snippet categories, KTX extensions, and documentation region tags
- Add Kotlin snippet infrastructure (KotlinSnippetsActivity, MapActivity, SnippetRegistry, TrackedMap)
- Add Kotlin capabilities test suite (CatalogCapabilitiesTestSuite, CameraControl, Events, MapInit, Marker)
- Add Kotlin visual test suite (BaseVisualTest, VisualTests)
- Remove legacy Kotlin snippet modules (snippets/app-ktx, snippets/app-utils-ktx)
- Update root settings.gradle.kts
layer.addLayerToMap()
// [END maps_android_utils_kml_add_layer]

// [START maps_android_utils_kml_remove_layer]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same class of issue I flagged on #2426, smaller in scope here. This PR drops 3 devsite region tags from the repo entirely:

tag was in
maps_android_utils_kml_remove_layer this file, line 52
maps_android_ktx_install_snippet snippets/app-ktx/build.gradle.kts:74
maps_android_utils_ktx_install_snippet snippets/app-utils-ktx/build.gradle.kts:73

I verified by diffing every [START ...] tag between feat/snippets-java-app and feat/snippets-kotlin-app, then grepping each missing one across the whole tree to rule out relocation.

The two *_install_snippet tags are the Gradle dependency snippets for the KTX libraries, which are exactly the sort of thing an installation page includes by tag. Worth noting that snippets/app-ktx/build.gradle.kts is detected as a rename to snippets/kotlin-app/build.gradle.kts (R059), so the file survives but the tag inside it does not.

Could you carry these three across to the new module, or confirm they are safe to retire?

Separately, nice work on the androidTest suites here. SnippetDiscoveryTest plus the per-capability tests is a good pattern, and it's a real step up from what the legacy modules had.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants