GoogleChromeLabs / bubblewrap

Bubblewrap is a Command Line Interface (CLI) that helps developers to create a Project for an Android application that launches an existing Progressive Web App (PWAs) using a Trusted Web Activity.
Apache License 2.0
2.36k stars 161 forks source link

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

Closed A1kmm closed 2 months ago

A1kmm commented 2 months ago

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.

A1kmm commented 2 months ago

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 commented 2 months ago

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!) :t-rex: :smile: :rocket:

matthewhartman commented 2 months ago

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

phillip-hogan commented 2 months ago

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 commented 2 months ago

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

ibrahimkarahan commented 2 months ago

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 commented 2 months ago

Love your work gang!! šŸš€šŸŽ‰šŸ„³

Bayernatoor commented 2 months ago

Wonderful, thank you!! :tada:

RufatAbbasli commented 1 month ago

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 commented 1 month ago

@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)