Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kotlinOptions jvmTarget to templates #147326

Merged
merged 7 commits into from May 7, 2024

Conversation

gmackall
Copy link
Member

@gmackall gmackall commented Apr 24, 2024

Adds jvmTarget to gradle templates.

Fixes #147185.

Interestingly, we already had this in many of our examples/tests, see search results here https://github.com/search?q=repo%3Aflutter%2Fflutter%20jvmTarget&type=code.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. d: examples Sample code and demos labels Apr 24, 2024
@github-actions github-actions bot removed the d: examples Sample code and demos label Apr 30, 2024
@gmackall gmackall marked this pull request as ready for review April 30, 2024 22:03
@gmackall gmackall requested review from bartekpacia and a team April 30, 2024 22:03
Copy link
Member

@bartekpacia bartekpacia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to say this is out of scope for this pr but I think we should have a variable like we do for minimum api level that is referenced for java version support and use that variable for both the java and kotlin versions.

@bartekpacia
Copy link
Member

bartekpacia commented May 6, 2024

This sounds like a good idea to me. Example:

android {
    namespace "com.example.example_huy"
    compileSdk flutter.compileSdkVersion
    ndkVersion flutter.ndkVersion

    compileOptions {
        sourceCompatibility flutter.jvmTargetVersion
        targetCompatibility flutter.jvmTargetVersion
    }

    kotlinOptions {
        jvmTarget = flutter.jvmTargetVersion
    }

    ...
}

but yeah, it can land in a different PR

@gmackall
Copy link
Member Author

gmackall commented May 7, 2024

Feel free to say this is out of scope for this pr but I think we should have a variable like we do for minimum api level that is referenced for java version support and use that variable for both the java and kotlin versions.

I think this is a good idea. I filed #147932

@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label May 7, 2024
@auto-submit auto-submit bot merged commit d04edd1 into flutter:master May 7, 2024
138 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flutter app not building to some kotlin kotlinOptions not being specified
3 participants