subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.28k stars 202 forks source link

Custom java version #316

Closed mbfakourii closed 5 months ago

mbfakourii commented 5 months ago

How to select specific java version like 17 to build apk?

mbfakourii commented 5 months ago

The problem was solved with the code below

- uses: actions/setup-java@v4
  with:
    distribution: 'oracle'
    java-version: '17'
- name: Setup flutter
  uses: subosito/flutter-action@v2
  with:
    channel: 'stable'
    cache: true

But maybe it would be better to add an option to flutter-action to select the java version

yurikoles commented 5 months ago

But maybe it would be better to add an option to flutter-action to select the java version

Why don't you request ability to set up a specific version of the flutter in the Setup Java Action repository?

mbfakourii commented 5 months ago

But maybe it would be better to add an option to flutter-action to select the java version

Why don't you request ability to set up a specific version of the flutter in the Setup Java Action repository?

Because Flutter uses java to build its apk!

yurikoles commented 5 months ago

Flutter doesn't use any Java to build for iOS, macOS, Linux and Windows.

My main point is to set up a specific language or framework with a particular setup action in order to not reinvent a wheel and to follow the DRY principle.