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.

Part of a stacked PR sequence:

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

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 86.5% 🍏
Files changed 100% 🍏

File Coverage
AttributionIdInitializer.kt 100% 🍏

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.

2 participants