Skip to content

V1.1.0 beta02 - #125

Merged
robertjamison merged 8 commits into
mainfrom
v1.1.0-beta02
Jan 10, 2026
Merged

V1.1.0 beta02#125
robertjamison merged 8 commits into
mainfrom
v1.1.0-beta02

Conversation

@robertjamison

Copy link
Copy Markdown
Contributor

No description provided.

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.
@robertjamison robertjamison added this to the v1.1.0 milestone Jan 7, 2026
@robertjamison robertjamison self-assigned this Jan 7, 2026
@robertjamison robertjamison added bug Something isn't working documentation Improvements or additions to documentation labels Jan 7, 2026
@robertjamison robertjamison linked an issue Jan 7, 2026 that may be closed by this pull request
@robertjamison robertjamison added the enhancement New feature or request label Jan 7, 2026
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.
@robertjamison robertjamison linked an issue Jan 7, 2026 that may be closed by this pull request
…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
robertjamison merged commit e49046b into main Jan 10, 2026
5 checks passed
@robertjamison
robertjamison deleted the v1.1.0-beta02 branch January 10, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConsentPopup fails to pop up

1 participant