Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Android SDK version 35, with many consequential updates #862

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

A1kmm
Copy link
Contributor

@A1kmm A1kmm commented Jul 10, 2024

Fix npm install - dependency changes meant that bubblewrap wouldn't compile due to dependencies not supporting previous TypeScript version. To address this, updated TypeScript to 5.5.3.

Updating TypeScript necessitates updating inquirer. Inquirer has been re-written in version 10, and version 9 is ESM only, while other dependencies need it to be CommonJS. So inquirer was updated to 8.2.6 for now - the latest CommonJS supporting version with the legacy API. As part of this change, esModuleInterop has been turned on, and the module import style has been made consistent, avoiding type errors.

A few other minor changes (particularly to caught errors) were needed for TS5.5.3 compat.

Next, the main aim of this change updates the targetSdkVersion and compileSdkVersion in app/build.gradle in the template. However, this also requires adding the namespace (set to the package ID) to the template.

Updating the compileSdkVersion requires bumping the Android Gradle plugin to the latest 8.5.0.

This change makes it no longer compatible with JDK 11, so this requires another extensive change - updating to OpenJDK 17. This has a number of consequential documentation and string updates, including moving the installer to use Eclipse Temurin instead of AdoptOpenJDK.

Finally, updating JDK requires updating the Gradle wrapper. The outputs are from running gradle wrapper --gradle-version 8.8.

Fix npm install - dependency changes meant that bubblewrap
wouldn't compile due to dependencies not supporting previous
TypeScript version. To address this, updated TypeScript to 5.5.3.

Updating TypeScript necessitates updating inquirer. Inquirer has
been re-written in version 10, and version 9 is EPM only, while
other dependencies need it to be CommonJS. So inquirer was updated
to 8.2.6 for now - the latest CommonJS supporting version with the
legacy API. As part of this change, esModuleInterop has been turned
on, and the module import style has been made consistent, avoiding
type errors.

A few other minor changes (particularly to caught errors) were needed
for TS5.5.3 compat.

Next, the main aim of this change updates the targetSdkVersion and
compileSdkVersion in app/build.gradle in the template. However, this
also requires adding the namespace (set to the package ID) to the
template.

Updating the compileSdkVersion requires bumping the Android Gradle
plugin to the latest 8.5.0.

This change makes it no longer compatible with JDK 11, so this
requires another extensive change - updating to OpenJDK 17. This
has a number of consequential documentation and string updates,
including moving the installer to use Eclipse Temurin instead of
AdoptOpenJDK.

Finally, updating JDK requires updating the Gradle wrapper. The
outputs are from running `gradle wrapper --gradle-version 8.8`.
@A1kmm A1kmm requested a review from luke83 July 12, 2024 07:28
@A1kmm
Copy link
Contributor Author

A1kmm commented Jul 12, 2024

I've also added a new commit updating the Android build tools version to latest (34.0.0) to ensure it works for a completely clean install.

@matthewhartman
Copy link

Love your work team! Any ETA on when this will get merged? Google Play requires all apps to meet target API level requirements before 31 Aug 2024 (no pressure!) 🦖 😄 🚀

Copy link
Collaborator

@ibrahimkarahan ibrahimkarahan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@ibrahimkarahan ibrahimkarahan merged commit cbeb350 into GoogleChromeLabs:main Jul 17, 2024
3 of 5 checks passed
@matthewhartman
Copy link

Thanks gang! Just out of curiosity, when is the next release scheduled? Thanks in advanced! ✌️

@phillip-hogan
Copy link

Thanks for updating all. Same question as above about the next release date as Google has a deadline of 31st August for us to push out a new build targeting >= Android SDK 34.

@Bayernatoor
Copy link

Thanks for all the work on this everyone! Any update on a release date?

@ibrahimkarahan
Copy link
Collaborator

Hi everyone, thanks for your patience! We just pushed version 1.22.0 into npm which bumps up targetSdkVersion to 35 and Play Billing Library to v6. You can update your Bubblewrap version to regenerate the Android project and upload to the Play Store.

@matthewhartman
Copy link

Love your work gang!! 🚀🎉🥳

@Bayernatoor
Copy link

Bayernatoor commented Aug 8, 2024

Wonderful, thank you!! 🎉

@RufatAbbasli
Copy link

Hi everyone, thanks for your patience! We just pushed version 1.22.0 into npm which bumps up targetSdkVersion to 35 and Play Billing Library to v6. You can update your Bubblewrap version to regenerate the Android project and upload to the Play Store.

@ibrahimkarahan Is this also available in pwabuilder.com? Can we generate our TWA through it? I regenerated my PWA in pwabuilder.com and opened in Android Studio. In "Gradle scripts" in build.gradle (Module :app) it shows "compileSdkVersion 35" and "targetSdkVersion 35". So will this solve the issue we encounter in Google Play Console (App must target Android 14 (API level 34) or higher)?

@maiconcarraro
Copy link

@RufatAbbasli you can join PWABuilder discord and reach the team responsible for it when you need, and yes they already updated and you can upload to fix the warning, you might see the warning still for old bundles (for example in open testing and other tabs)

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.

8 participants