Skip to content

Add binding for com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk (GMA Next-Gen SDK)#1436

Open
Copilot wants to merge 6 commits into
mainfrom
copilot/add-gma-next-gen-sdk-binding
Open

Add binding for com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk (GMA Next-Gen SDK)#1436
Copilot wants to merge 6 commits into
mainfrom
copilot/add-gma-next-gen-sdk-binding

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 3, 2026

Adds a new binding for Google's GMA Next-Gen SDK (com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:1.1.1), the documented migration target from the legacy Google Mobile Ads SDK. This is a new groupId, distinct from com.google.android.gms:play-services-ads*, so it gets its own config.json entry and source folder.

Binding registration

  • config.json: new artifact entry, nugetId Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk v1.1.1 (following the com.google.android.libraries.*Xamarin.GoogleAndroid.Libraries.* convention). Includes extraDependencies for the androidx lifecycle / savedstate / navigationevent split assemblies that AdActivity's ComponentActivity base requires transitively.

Metadata transforms

  • Transforms/Metadata.Namespaces.xml: maps the public SDK packages to Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.* namespaces (internal packages are not exposed).
  • Transforms/Metadata.xml: resolves generated binding errors and trims surface area:
    • Mediation listener EventArgs collisions (CS0102) via per-interface method renames.
    • Java generic-erasure mismatches (CS0534/CS0738) by removing a few generic base members: self(), getCode(), pollAd(String), getAdSizes(). Concrete subclasses retain their typed equivalents.
    • Removes com.google.android.libraries.ads.mobile.sdk.internal* packages via <remove-node/> so Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Internal.* is not bound.

Generated / tracking files

  • PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt for the new binding (updated to remove internal APIs).
  • published-namespaces.txt: new namespaces added for this binding (excluding *.Internal.*).
  • docs/artifact-list.md, docs/artifact-list-with-versions.md, and cgmanifest.json regenerated; the groupId added to the license mapping (Android Software Development Kit License) in utilities.cake and build/scripts/utilities.csx.

Notes for reviewers

  • The SDK bundles com.google.android.gms.ads.* mediation SPI packages that map to Google.Android.Gms.Ads.*, overlapping the existing play-services-ads-api binding. This is acceptable as the two are mutually-exclusive migration targets.
  • The four removed generic base members are a minor API reduction on generic plumbing — worth a look if any are considered part of the intended public surface.

Copilot AI and others added 2 commits June 3, 2026 16:14
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add binding for com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk Add binding for com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk (GMA Next-Gen SDK) Jun 3, 2026
Copilot AI requested a review from jonathanpeppers June 3, 2026 16:48
@jonathanpeppers
Copy link
Copy Markdown
Member

@copilot why are there merge conflicts?

…gen-sdk-binding

# Conflicts:
#	docs/artifact-list-with-versions.md

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 3, 2026

@copilot why are there merge conflicts?

The conflict was entirely in the generated docs/artifact-list-with-versions.md. That table has a sequential index column in the first cell, so two things collided:

  1. My branch inserted the new ads-mobile-sdk row, which re-numbered every subsequent row by +1.
  2. main (Stable Updates 20260601, Stable Updates 20260601 #1430) bumped a bunch of version numbers in the rows below it.

Both sides therefore touched almost every line in that region, so Git couldn't auto-merge it.

I merged origin/main and regenerated the file from the merged config.json (same logic as the utilities.cake generator), which incorporates both main's version bumps and the new row with correct numbering. config.json, cgmanifest.json, and the other files merged cleanly. Resolved in 5f64c60.

@jonathanpeppers jonathanpeppers marked this pull request as ready for review June 3, 2026 17:34
Copilot AI review requested due to automatic review settings June 3, 2026 17:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new config-driven .NET for Android binding for Google’s GMA Next‑Gen SDK (com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:1.1.1) under the com.google.android.libraries.* ecosystem, including the required transforms and repo tracking/registration updates so it can be built, packaged, and published like the other bindings in this repository.

Changes:

  • Registers the new Maven artifact in config.json (NuGet ID Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk) and wires up license mapping + CG manifest entry.
  • Introduces binding transforms for namespace mapping and for resolving binding-generation issues (member renames + removal of problematic generic-erasure members).
  • Regenerates/updates repository tracking outputs (PublicAPI files, published namespaces list, and artifact list docs).

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
utilities.cake Adds the new groupId prefix to the license mapping logic.
build/scripts/utilities.csx Keeps the build script license mapping logic in sync with utilities.cake.
config.json Adds the new ads-mobile-sdk artifact entry and extra dependencies.
cgmanifest.json Registers the new Maven component for compliance tracking.
source/com.google.android.libraries.ads.mobile.sdk/ads-mobile-sdk/Transforms/Metadata.xml Applies binding fixes (method renames for listener collisions, removes problematic members).
source/com.google.android.libraries.ads.mobile.sdk/ads-mobile-sdk/Transforms/Metadata.Namespaces.xml Maps SDK packages into Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.* namespaces.
source/com.google.android.libraries.ads.mobile.sdk/ads-mobile-sdk/PublicAPI/PublicAPI.Shipped.txt Initializes the shipped API tracking file for the new binding.
published-namespaces.txt Adds newly produced namespaces from the new binding.
docs/artifact-list.md Adds the new artifact to the Maven→NuGet mapping list (regenerated).
docs/artifact-list-with-versions.md Adds the new artifact with versions to the mapping list (regenerated).

Comment on lines +9 to +13
path="/api/package[@name='com.google.android.libraries.ads.mobile.sdk.appopen']"
name="managedName"
>
Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Appopen
</attr>
Comment on lines +33 to +37
path="/api/package[@name='com.google.android.libraries.ads.mobile.sdk.iconad']"
name="managedName"
>
Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Iconad
</attr>
Comment on lines +63 to +67
path="/api/package[@name='com.google.android.libraries.ads.mobile.sdk.internal.nativead']"
name="managedName"
>
Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Internal.Nativead
</attr>
Comment on lines +87 to +91
path="/api/package[@name='com.google.android.libraries.ads.mobile.sdk.internal.webview']"
name="managedName"
>
Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Internal.Webview
</attr>
Comment on lines +99 to +103
path="/api/package[@name='com.google.android.libraries.ads.mobile.sdk.nativead']"
name="managedName"
>
Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Nativead
</attr>
Comment on lines +111 to +115
path="/api/package[@name='com.google.android.libraries.ads.mobile.sdk.rewardedinterstitial']"
name="managedName"
>
Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Rewardedinterstitial
</attr>
Comment on lines +123 to +127
path="/api/package[@name='com.google.android.libraries.ads.mobile.sdk.swipeableinterstitial']"
name="managedName"
>
Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Swipeableinterstitial
</attr>
Comment on lines +2 to +6
<attr
path="/api/package[@name='com.google.android.gms.ads.mediation']/interface[@name='MediationBannerListener']/method[@name='onAdClicked' and count(parameter)=1 and parameter[1][@type='com.google.android.gms.ads.mediation.MediationBannerAdapter']]"
name="managedName"
>
OnBannerAdClicked
Addresses review feedback on PR #1436. Renames namespace segments to
follow PascalCase conventions used elsewhere in the repo (e.g.
play-services-ads-lite remaps appopen -> AppOpen, nativead -> NativeAd,
rewardedinterstitial -> RewardedInterstitial):

- Appopen -> AppOpen
- Iconad -> IconAd
- Internal.Nativead -> Internal.NativeAd
- Internal.Webview -> Internal.WebView
- Nativead -> NativeAd
- Rewardedinterstitial -> RewardedInterstitial
- Swipeableinterstitial -> SwipeableInterstitial

published-namespaces.txt updated to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

@copilot should we not bind Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Internal.*?

Can you <remove-node/> these if we shouldn't have them? Also update any namespace or PublicApi.txt files with your changes.

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 4, 2026

@copilot should we not bind Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Internal.*?

Can you <remove-node/> these if we shouldn't have them? Also update any namespace or PublicApi.txt files wit...

Done in f4843d1. I removed binding exposure for Xamarin.GoogleAndroid.Libraries.Ads.Mobile.Sdk.Internal.* by stripping com.google.android.libraries.ads.mobile.sdk.internal* packages via <remove-node/>, and updated Metadata.Namespaces.xml, PublicAPI.Unshipped.txt, and published-namespaces.txt accordingly.

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.

[Enhancement] Add binding for com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk (GMA Next-Gen SDK)

3 participants