Skip to content

Conversation

dhonti-axpe
Copy link
Contributor

@dhonti-axpe dhonti-axpe commented Sep 30, 2025

🎟️ Jira ticket

ANDROID-16201

πŸ₯… What's the goal?

Update the current Android API level 31 -> 34

🚧 How do we do it?

The apply this update is necessary to apply next upgrades:

  • AGP 7.4 --> 8.11
  • Kotlin 1.8 --> 2.X
  • Update Java version from 1.8 -> 1.17 (in library and app module)
  • compileSdk and targetSdk 31 --> 34
  • Update corresponding test.yml file to fit corresponding workflow to use Java 17

βœ… Documentation changes?

  • No docs to update nor create

πŸ§ͺ How can I test this?

  • Build the project and verify there are no build errors.
  • Test the app on a device/emulator running Android 14 to ensure compatibility.

@dhonti-axpe dhonti-axpe requested review from neo-sagittal and removed request for neo-sagittal September 30, 2025 14:29
@dhonti-axpe dhonti-axpe marked this pull request as ready for review October 1, 2025 08:57
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following ticket is created to do corresponding migration to "shared-workflows": https://jira.tid.es/browse/ANDROID-16907

@dhonti-axpe dhonti-axpe requested review from a team, hjorrod and jeslat and removed request for a team October 1, 2025 09:00
build.gradle Outdated
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
id 'com.android.application' version '8.11.2' apply false
id 'com.android.library' version '8.11.2' apply false
id 'org.jetbrains.kotlin.android' version '2.2.20' apply false
Copy link

Choose a reason for hiding this comment

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

I would update to Kotlin 2.1 as we have in the rest of the apps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied changes here: bdb1c13
To last stable 2.1.X Kotlin version: https://kotlinlang.org/docs/whatsnew2120.html

# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonFinalResIds=false
Copy link

Choose a reason for hiding this comment

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

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed the Android Studio AGP assistant update to do this task quicker and it added this line.
Checking the documentation:
https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes?hl=es-419#default-changes

This line disables the new generation of non-final resources introduced in AGP, causing R ID's to return to final. It's usually added automatically when you migrate an old project to maintain compatibility, although it's recommended to gradually remove this dependency and leave it as true (or simply not declare it, since the current default is true).

If you consider necessary I would remove this line. WDYT?

Copy link

Choose a reason for hiding this comment

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

Ok, no problem, we can maintain it

@dhonti-axpe dhonti-axpe requested a review from jeslat October 2, 2025 11:17
@jeslat
Copy link

jeslat commented Oct 2, 2025

I would generate a snapshot and test it with android-messenger repo to be sure that it works.

Copy link

@jeslat jeslat left a comment

Choose a reason for hiding this comment

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

πŸ‘

@dhonti-axpe
Copy link
Contributor Author

I would generate a snapshot and test it with android-messenger repo to be sure that it works.

Tested this snapshot "0.2.0-SNAPSHOT" version:
https://github.com/Telefonica/android-nested-scroll-webview/actions/runs/18192501550
In an Android API 34 emulator and no compilation errors or display errors were detected in webviews.

@dhonti-axpe dhonti-axpe merged commit 2b41c01 into main Oct 2, 2025
2 checks passed
@dhonti-axpe dhonti-axpe deleted the ANDROID-16201/update-api-34 branch October 2, 2025 14:03
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.

3 participants