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

Gradle UpdateJavaCompatibility recipe does not work with Micronaut's generated format. #3255

Closed
jeremyg484 opened this issue May 18, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jeremyg484
Copy link
Contributor

A Micronaut 3.x app generated by Micronaut Launch uses the following format in build.gradle for Java compatibility settings:

java {
    sourceCompatibility = JavaVersion.toVersion("1.8")
    targetCompatibility = JavaVersion.toVersion("1.8")
}

Using JavaVersion.toVersion as we do is not properly detected and updated by the UpdateJavaCompatibility recipe.

@shanman190
Copy link
Contributor

Hi @jeremyg484 👋

I see a couple of possibilities here, so what would you ideally like to see?

I could see trying to attempt to keep the method invocation directly (JavaVersion.toVersion("11")) or convert it to the enum type by default (JavaVersion.VERSION_11).

@shanman190 shanman190 self-assigned this May 18, 2023
@shanman190 shanman190 added the enhancement New feature or request label May 18, 2023
@jeremyg484
Copy link
Contributor Author

Hi @shanman190, thanks for the quick response!

I think either would ultimately be fine, but I would lean toward keeping the same format (unless the declarationStyle option is set differently) as it would be consistent with what we are also generating for new Micronaut 4 apps created with https://micronaut.io/launch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants