bubblewrap icon indicating copy to clipboard operation
bubblewrap copied to clipboard

Upgrade to target SDK version 34

Open jere-mie opened this issue 1 year ago • 22 comments

Is your feature request related to a problem? Please describe. Currently, bubblewrap targets SDK version 33, which is no longer supported for apps to be published on the Play Store.

Describe the solution you'd like Target SDK version 34

Describe alternatives you've considered Manually specifying a specific SDK

Additional context This issue for PWABuilder is what prompted me to create this: https://github.com/pwa-builder/PWABuilder/issues/4766

jere-mie avatar Jul 05 '24 02:07 jere-mie

It appears that changing export const BUILD_TOOLS_VERSION = '33.0.2'; to some version above 34 in packages/core/src/lib/androidSdk/AndroidSdkTools.ts should be sufficient, though I haven't been able to verify

jere-mie avatar Jul 05 '24 02:07 jere-mie

CC @ibrahimkarahan

andreban avatar Jul 05 '24 09:07 andreban

It appears that changing export const BUILD_TOOLS_VERSION = '33.0.2'; to some version above 34 in packages/core/src/lib/androidSdk/AndroidSdkTools.ts should be sufficient, though I haven't been able to verify

Most likely you'd want to update targetSdkVersion and compileSdkVersion on build.gradle. Build tools, as you mentioned may be needed to.

The thing to be aware of is that Android introduces changes to OS between different target SDKs - once upgraded, there's a chance the generated application won't build anymore and require changes to fix it, or that it may behave differently at runtime.

andreban avatar Jul 05 '24 09:07 andreban

The process of bumping versions is most likely the same as this PR: https://github.com/GoogleChromeLabs/bubblewrap/pull/764

CCing @PEConn since they were involved with the bump to v33

jere-mie avatar Jul 05 '24 14:07 jere-mie

Also facing the same issue while creating my first PWA app. Upgrade to target SDK version 34.

siaeweb avatar Jul 06 '24 20:07 siaeweb

same here

Aviv1000 avatar Jul 07 '24 05:07 Aviv1000

Screenshot from 2024-07-07 13-15-32

charlypa avatar Jul 07 '24 07:07 charlypa

it would be nice if we could add a cli flag or environment variable or something of that nature that allows us to specify the default target - and would prevent this from being a blocker for people in the future when Google decides change the requirements again.

Maybe that's an idea for a separate issue though

jere-mie avatar Jul 08 '24 18:07 jere-mie

@andreban are we just looking for someone to make the changes you mentioned and put them up in a PR?

jgw96 avatar Jul 09 '24 17:07 jgw96

@andreban are we just looking for someone to make the changes you mentioned and put them up in a PR?

Looping @ibrahimkarahan for thoughts here.

andreban avatar Jul 09 '24 17:07 andreban

A few people are out of office due to holidays in the US. We can take a look at this as soon as they’re back. PRs are also welcome.

On Tue, Jul 9, 2024 at 19:41 André Cipriani Bandarra < @.***> wrote:

@andreban https://github.com/andreban are we just looking for someone to make the changes you mentioned and put them up in a PR?

Looping @ibrahimkarahan https://github.com/ibrahimkarahan for thoughts here.

— Reply to this email directly, view it on GitHub https://github.com/GoogleChromeLabs/bubblewrap/issues/860#issuecomment-2218302451, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANNGTBO3MJLB3KEFKGUAETZLQODBAVCNFSM6AAAAABKMLTJPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJYGMYDENBVGE . You are receiving this because you were mentioned.Message ID: @.***>

ibrahimkarahan avatar Jul 09 '24 17:07 ibrahimkarahan

I didn't see this issue until now, but I did make a PR: https://github.com/GoogleChromeLabs/bubblewrap/pull/862. It seems to work to produce SDK version 35 APKs - but took quite a number of consequential updates (it isn't as simple as just bumping the version, as quite a few dependencies are old (including JDK), and Bubblewrap doesn't even build cleanly within the current NPM dependencies right now).

My PR doesn't upgrade SDK tools though.

If anyone wants to test it out while it is being reviewed:

git clone https://github.com/GoogleChromeLabs/bubblewrap
cd bubblewrap
git fetch origin pull/862/head:sdk35
git checkout sdk35
npm install && npm run build

That should give you a working script in ./packages/cli/bin/bubblewrap.js, which you can symlink as bubblewrap from somewhere in your path if you want (or just run it by absolute path). You might need to delete the jdkPath key from the JSON in ~/.bubblewrap/config.json if you have previously installed an older JDK with Bubblewrap (use the doctor subcommand to check if unsure). Since my changes are quite significant due to the number of things updated, more testing by other people would be appreciated.

A1kmm avatar Jul 11 '24 02:07 A1kmm

The PR was merged. But a bubblewrap release is probably necessary for other projects to be able to pick up the change.

lukastribus avatar Jul 18 '24 07:07 lukastribus

When can we expect a release?

viral32111 avatar Jul 23 '24 06:07 viral32111

@.***

في الثلاثاء، ٢٣ يوليو ٢٠٢٤، ٩:١٨ ص viral32111 @.***> كتب:

When can we expect a release?

— Reply to this email directly, view it on GitHub https://github.com/GoogleChromeLabs/bubblewrap/issues/860#issuecomment-2244340189, or unsubscribe https://github.com/notifications/unsubscribe-auth/BI64KGDFMNSEMO3AVCZSFEDZNXYVFAVCNFSM6AAAAABKMLTJPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBUGM2DAMJYHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Mahera72 avatar Jul 23 '24 14:07 Mahera72

For me it worked to change

  • compileSdkVersion 33 to compileSdkVersion 34 and
  • targetSdkVersion 33 to targetSdkVersion 34

in the file app/build.grade and then run `bubblewrap build.

Whenever you run bubblewrap update, it will overwrite app/build.grade and you have to make the changes again. (At least until bubblewrap gets an update.)

2024-07-26_15-31

The comment by @andreban and comment by @jere-mie put me on the right track.

kaktus42 avatar Jul 26 '24 13:07 kaktus42

The kaktus42 way worked for me, just one more thing, if you are using bubblewrap for twa and make any change in twa-manifest.json, when you wanna build it again, will set compileSdkVersion 33 again, so keep in mind.

Cristian021195 avatar Aug 03 '24 04:08 Cristian021195

I followed @kaktus42 steps also (thank you for sharing). However, I'm confused because this warning is not going away. The detail when clicking on "Go to Policy status" says that "App must target Android 14 (API level 34) or higher" Is there still something that needs done?

Capture

dhalldmg avatar Aug 06 '24 13:08 dhalldmg

@dhalldmg the warning is saying something about policies it can be related to other changes, recently I got a similar warning to check some specific features (comply or not), recommend to check.

maiconcarraro avatar Aug 06 '24 13:08 maiconcarraro

@dhalldmg the warning is saying something about policies it can be related to other changes, recently I got a similar warning to check some specific features (comply or not), recommend to check.

The policy status / issue detail is "App must target Android 14 (API level 34) or higher"

1

dhalldmg avatar Aug 06 '24 13:08 dhalldmg

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 avatar Aug 07 '24 17:08 ibrahimkarahan

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.

The tag has been pushed as well as the Docker image. But the Docker image is still running the version 1.21.0.

docker run -ti --rm ghcr.io/googlechromelabs/bubblewrap:1.22.0 --version

,-----.        ,--.  ,--.  ,--.
|  |) /_,--.,--|  |-.|  |-.|  |,---.,--.   ,--,--.--.,--,--.,---.
|  .-.  |  ||  | .-. | .-. |  | .-. |  |.'.|  |  .--' ,-.  | .-. |
|  '--' '  ''  | `-' | `-' |  \   --|   .'.   |  |  \ '-'  | '-' '
`------' `----' `---' `---'`--'`----'--'   '--`--'   `--`--|  |-'
                                                           `--'
version 1.21.0

Probably related:

  • https://github.com/GoogleChromeLabs/bubblewrap/issues/877
  • https://github.com/GoogleChromeLabs/bubblewrap/issues/873

cmizzi avatar Aug 08 '24 16:08 cmizzi