Skip to content

feat(attribution): register usage attribution with Places SDK and remove legacy library module - #119

Open
dkhawk wants to merge 1 commit into
build/dependency-modernizationfrom
feat/places-usage-attribution
Open

feat(attribution): register usage attribution with Places SDK and remove legacy library module#119
dkhawk wants to merge 1 commit into
build/dependency-modernizationfrom
feat/places-usage-attribution

Conversation

@dkhawk

@dkhawk dkhawk commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR implements usage attribution reporting for :places-compose using the Google Places SDK's addInternalUsageAttributionId API:

1. Dynamic Attribution ID Generation

Added a generateArtifactIdFile Gradle task in places-compose/build.gradle.kts that outputs an AttributionId.VALUE object based on the project version:

public object AttributionId {
    public const val VALUE: String = "gmp_git_androidplacescompose_v0.2.1"
}

2. Startup Initializer

Added AttributionIdInitializer : Initializer<Unit> in places-compose calling:

Places.addInternalUsageAttributionId(AttributionId.VALUE)

Registered via androidx.startup.InitializationProvider in places-compose/src/main/AndroidManifest.xml so attribution is seamlessly reported with Places SDK requests.

3. Verification

Added AttributionIdInitializerTest verifying that Places.addInternalUsageAttributionId is correctly invoked on startup.

4. Cleanup of Orphaned :library Module

Removed the orphaned, unpublished :library module (which previously called MapsApiSettings.addInternalUsageAttributionId from Maps SDK) and removed its entry from settings.gradle.kts and places-compose-demo/build.gradle.kts.


📚 Stacked PR Chain

# PR Description Base Status
1 #115 ci/workflow-security-hardening (Workflow permissions & action pinning) main ✅ CI Passing
2 #116 test/library-coverage-baseline (Test suite reaching 93.8% coverage) #115 ✅ CI Passing
3 #117 build/dependency-modernization (AGP 9.3.2, Gradle 9.5.1, Places 5.3.0) #116 ✅ CI Passing
4 👉 #119 feat/places-usage-attribution (Usage attribution & remove :library) #117 ✅ CI Passing
5 #118 demo/ux-edge-to-edge-polish (Demo UX, edge-to-edge, mock location) #119 ✅ CI Passing

Umbrella PR: #109

@dkhawk
dkhawk requested a review from LoyalAbbas September 4, 2026 15:54
@googlemaps-bot

googlemaps-bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 86.5% 🍏
Files changed 100% 🍏

File Coverage
AttributionIdInitializer.kt 100% 🍏

@LoyalAbbas LoyalAbbas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@dkhawk
dkhawk requested a review from a team as a code owner September 9, 2026 21:00
@dkhawk
dkhawk force-pushed the feat/places-usage-attribution branch from 26bcf23 to 8bc9eb1 Compare September 9, 2026 21:21
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