V1.1.0 beta02 - #125
Merged
Merged
Conversation
This commit introduces a minor breaking API change to better align with Kotlin naming conventions and increments the library version.
* **API Change:**
* The `BasicAds.initialize()` function has been renamed to `BasicAds.Initialize()`. This capitalization change aligns the function's naming with Kotlin's style conventions.
* **Version Bump:**
* The library version is updated from `1.1.0-beta01` to `1.1.0-beta02`.
* **Documentation:**
* The `README.md` has been updated to reflect the new function name in the code sample.
This commit refactors the consent management flow to be more robust and intuitive. The `rememberConsent` function now proactively fetches the latest consent status upon initialization, and the `ConsentPopup` composable has been updated to automatically handle the form presentation lifecycle.
* **`rememberConsent` (Android & iOS):**
* The `rememberConsent` function now calls `requestConsentInfoUpdate` upon creation.
* The `isPrivacyOptionsRequired` and `canRequestAds` properties are now queried within the `onCompletion` callback of the update request. This ensures that the initial consent state is based on the most up-to-date information from the UMP SDK, preventing race conditions.
* **`ConsentPopup` Composable (Common):**
* The `ConsentPopup` composable now uses the `onCompletion` callback of `requestConsentInfoUpdate` to automatically call `loadAndShowConsentForm`. This simplifies the implementation by chaining the update and form presentation steps.
* New optional `onLoaded` and `onShown` callbacks have been added to `ConsentPopup`, providing developers with more granular control over the consent form's lifecycle events.
* KDoc has been updated to reflect the new behavior and parameters.
This commit introduces a new composable builder function, `Build`, to the `ConsentDebugSettings` class. This provides a declarative, Jetpack Compose-friendly way to construct `ConsentDebugSettings` instances.
* **New Composable Builder:**
* A new `@Composable` function, `ConsentDebugSettings.Build()`, has been added to `commonMain` as an `expect` function.
* It allows developers to create `ConsentDebugSettings` with optional `debugGeography`, `hashedId`, and `forceTesting` parameters directly within their composable functions.
* **Platform Implementation:**
* **Android:** The `actual` implementation uses `LocalContext.current` to get the required `Activity` and configures a `com.google.android.ump.ConsentDebugSettings.Builder`.
* **iOS:** The `actual` implementation configures a `UMPDebugSettings` object.
* **API Update:**
* The `basic-ads.api` file has been updated to include the new `Build` function.
This commit refactors the composable builder for `ConsentDebugSettings` to better align with Kotlin conventions. The `Build` function has been renamed and moved into a companion object.
* **API Change:**
* The composable function `ConsentDebugSettings.Build()` has been renamed to `ConsentDebugSettings.builder()`.
* This function is now part of the `ConsentDebugSettings.Companion` object, providing a more conventional factory/builder pattern.
* **Platform Implementation:**
* The `actual` implementations on both Android and iOS have been updated to reflect this change.
* **API Update:**
* The `basic-ads.api` file has been updated to include the new `builder` function within the `ConsentDebugSettings.Companion` object.
This commit refactors the `ConsentPopup` composable to decouple the consent information update from the form presentation logic. The `ConsentPopup` no longer automatically calls `requestConsentInfoUpdate`. Its sole responsibility is now to invoke `loadAndShowConsentForm`. This change simplifies the composable and gives developers more explicit control over when the consent information is fetched. Developers are now expected to call `requestConsentInfoUpdate` manually before using `ConsentPopup` to ensure the form is presented with the most up-to-date information.
…in (#126) This commit migrates the `basic-ads` module from using the standalone `com.android.library` Gradle plugin to the modern `com.android.kotlin.multiplatform.library` plugin. This change simplifies the build configuration by replacing the separate `android {}` and `kotlin.androidTarget {}` blocks with a single `androidLibrary {}` block. * **Plugin Migration:** * Updated `build.gradle.kts` and `libs.versions.toml` to use the `com.android.kotlin.multiplatform.library` plugin alias. * **Build Script Refactoring:** * Replaced the legacy `android {}` configuration in `basic-ads/build.gradle.kts` with the new `androidLibrary {}` block. * Consolidated Android-specific settings like `namespace`, `compileSdk`, `minSdk`, and `jvmTarget` into the new block. * **Dependency Update:** * Added a `compileOnly` dependency on `androidx.core:core-ktx`.
This commit introduces `compileOnly` dependencies with strictly enforced versions to mitigate several security vulnerabilities found in transitive dependencies.
* **Vulnerability Remediation:**
* **CVE-2021-0341:** Forced `com.squareup.okhttp3:okhttp` to version `5.3.2`.
* **CVE-2024-29371:** Forced `org.bitbucket.b_c:jose4j` to version `0.9.6`.
* **CVE-2025-67735:** Forced `io.netty:netty-codec-http` to version `4.2.9.Final`.
* **CVE-2025-55163:** Forced `io.netty:netty-codec-http2` to version `4.2.9.Final`.
* **CVE-2024-7254:** Forced `com.google.protobuf:protobuf-kotlin` and `com.google.protobuf:protobuf-java` to version `4.33.3`.
* **CVE-2021-33813:** Forced `org.jdom:jdom2` to version `2.0.6.1`.
These changes ensure that the project resolves these transitive dependencies to non-vulnerable versions during the build process.
robertjamison
temporarily deployed
to
github-pages
January 10, 2026 18:23 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.