subosito / flutter-action

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

Custom java version #316

Closed mbfakourii closed 2 weeks ago

mbfakourii commented 2 weeks ago

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

mbfakourii commented 2 weeks 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 2 weeks 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 2 weeks 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 1 week 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.