Skip to content

RUM-18187: Update AGP to version 9.1.1 - #3753

Open
0xnm wants to merge 1 commit into
nogorodnikov/rum-18186/migrate-from-buildSrc-to-convention-pluginfrom
nogorodnikov/rum-18187/update-agp-to-version-9.1.1
Open

RUM-18187: Update AGP to version 9.1.1#3753
0xnm wants to merge 1 commit into
nogorodnikov/rum-18186/migrate-from-buildSrc-to-convention-pluginfrom
nogorodnikov/rum-18187/update-agp-to-version-9.1.1

Conversation

@0xnm

@0xnm 0xnm commented Aug 21, 2026

Copy link
Copy Markdown
Member

What does this PR do?

This PR updates AGP to version 9.1.1 - first version which supports compilation against Android API 37.

As a part of this migration the following was done:

  • Added ExposedCopyVisibility to the public data classes with internal constructor: although we don't want copy method to be exposed, we will keep binary API compatibility for now. We may move away from data classes in public API in SDK v4. The only exception is :tools:benchmark module, because it is published only for the internal needs.
  • Bumped apiVersion and languageVersion of Kotlin to 2.0., this is acknowledged ABI change. 1.8 could still live, but there is warning that it is deprecated by the build tooling (Kotlin 2.2 imposed by AGP 9) and it is time to bump it. We can afford this without major SDK release.
  • AGP 9 strictly pins the version of KSP unlike AGP 8, so now KSP is for Kotlin 2.2, that change caused the issue in code generated by NoOp plugin.
  • AGP 9 flips the value of android.useConstraints from true to false compared to AGP 8, this caused some transitive versions shaking. See docs for more details.
  • Removed multi-DEX support. It is not needed since our minSdk is 21.
  • Bumped Kotlin Coroutines version: it was resolved to 1.7.3 by the OpenFeature SDK anyway.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@datadog-official

datadog-official Bot commented Aug 21, 2026

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

DataDog/dd-sdk-android | test-pyramid:api-coverage — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitLab

DataDog/dd-sdk-android | test-pyramid:single-fit-okhttp — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 33.33%
Overall Coverage: 70.73% (+0.02%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 50a718a | Docs | View more details | Give us feedback!

@0xnm
0xnm force-pushed the nogorodnikov/rum-18187/update-agp-to-version-9.1.1 branch from 0d3c494 to 1d7b3de Compare August 21, 2026 15:58
@0xnm
0xnm marked this pull request as ready for review August 21, 2026 15:58
@0xnm
0xnm requested review from a team as code owners August 21, 2026 15:58
@0xnm
0xnm requested review from sameerank and typotter and removed request for a team August 21, 2026 15:58
@0xnm
0xnm force-pushed the nogorodnikov/rum-18187/update-agp-to-version-9.1.1 branch from 1d7b3de to ce5cbb9 Compare August 21, 2026 16:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce5cbb9c22

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +23 to +24
apiVersion.set(KotlinVersion.KOTLIN_2_0)
languageVersion.set(KotlinVersion.KOTLIN_2_0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve Kotlin 1.8 metadata compatibility

Keep the published modules on the previous Kotlin 1.8 language/API level unless dropping older consumer compilers is an explicit release decision. These settings cause every artifact to emit Kotlin 2.0 metadata (as reflected by the changed compiler-meta.txt files), so applications still compiling with Kotlin 1.8 or 1.9 can reject the SDK as having an incompatible metadata version; the AGP upgrade itself does not require raising the library's published metadata level when the external Kotlin plugin remains enabled.

Useful? React with 👍 / 👎.

Comment on lines +690 to +692
private val KSType.isFunctionTypeOrAlias: Boolean
get() = isFunctionType ||
(declaration as? KSTypeAlias)?.type?.resolve()?.isFunctionTypeOrAlias == true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve nested function aliases before extracting the return type

Handle the same alias chain recursively when obtaining the function return type. For valid declarations such as typealias Callback = BaseCallback and typealias BaseCallback = (String) -> Unit, this new recursive predicate classifies Callback as a function, but returnTypeNameOfFunctionType() only casts the immediate alias element to KSCallableReference; that element is a classifier reference for BaseCallback, so the helper returns null, logs an error, and emits no return statement for the generated no-op method.

Useful? React with 👍 / 👎.

@0xnm
0xnm force-pushed the nogorodnikov/rum-18187/update-agp-to-version-9.1.1 branch from ce5cbb9 to fc90a30 Compare August 21, 2026 17:40
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@0xnm
0xnm force-pushed the nogorodnikov/rum-18187/update-agp-to-version-9.1.1 branch from fc90a30 to 50a718a Compare August 21, 2026 18:07
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.

1 participant