bitrise-steplib / bitrise-step-flutter-build

MIT License
7 stars 13 forks source link

Add support for newer Java version #52

Closed Mounix99 closed 2 months ago

Mounix99 commented 6 months ago

Troubleshooting

Useful information

Issue description

It is impossible to build Flutter project with some version of packages, (issue related not only to Flutter). Some project requires Newer Java version Execution failed for task ':stripe_android:compileReleaseJavaWithJavac'. error: invalid source release: 17

Bitrise info

* What went wrong:
Execution failed for task ':stripe_android:compileReleaseJavaWithJavac'.
> error: invalid source release: 17
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org/
BUILD FAILED in 8m 18s
Running Gradle task 'assembleStagingRelease'...                   500.9s
Gradle task assembleStagingRelease failed with exit code 1
Run: failed to build Android app: exit status 1
Run: failed to build Android app: exit status 1
  

Steps to reproduce

  1. Try latest version of Stripe package for Flutter
serdar-coskun commented 6 months ago

I have the same problem

Mounix99 commented 5 months ago

Any updates?

hautvfami commented 5 months ago

same for me

Mounix99 commented 3 months ago

Can anyone look into it or at least create a fork ?

Mounix99 commented 2 months ago

@ofalvai can you help here? It doesn't seems to be something big to deal with...

ofalvai commented 2 months ago

JDK 17 has been available on all Bitrise stacks for a while, even though that's not the default version on some stacks. I know it's a bit confusing, but here is the current state of the stacks as of today:

If you want to switch the active version in a build, you can do that with the Set Java version step, it works across all stacks.

Also, for future reference, we publish an overview of tool versions across the stacks, this is the one for JDK: https://stacks.bitrise.io/tools/java/

Mounix99 commented 2 months ago

Thank you @ofalvai for detailed explanation! for everyone who requires docs about manual Java version changing: https://devcenter.bitrise.io/en/infrastructure/build-stacks/managing-java-versions.html