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

Use recent java LTS version in Gradle@2 #15647

Closed
nibexo opened this issue Dec 29, 2021 · 4 comments
Closed

Use recent java LTS version in Gradle@2 #15647

nibexo opened this issue Dec 29, 2021 · 4 comments
Assignees
Labels
Area: ABTT Akvelon Build Tasks Team area of work enhancement stale Task: Gradle

Comments

@nibexo
Copy link

nibexo commented Dec 29, 2021

Feature
Type: Upgrade Gradle task to latest java version 17 LTS

Enter Task Name: Gradle@2 (https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/GradleV2)

Environment
Server - Azure Pipelines
Issue Description
The more updated jdkVersionOption used by task Gradle@2 is 11
(#jdkVersionOption: 'default' # Optional. Options: default, 1.11, 1.10, 1.9, 1.8, 1.7, 1.6)

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/gradle?view=azure-devops.

I'd like to use more recent LTS version 17 which was released 14 September 2021

@anatolybolshakov
Copy link
Contributor

Hi @nibexo sorry for delay - we are currently working on more prioritized tickets, but will get back to this once be able to.
As a workaround - you can set up path to the JDK using jdkUserInputPath task input (you can find variables which keep paths to JDKs installed on hosted images in docs - for example, here's the list of JDKs for windows 2022 image).

@nibexo
Copy link
Author

nibexo commented Jan 31, 2022

@anatolybolshakov Thank you for your answer, however if adding latest version JDK LTS to task maven@3 is almost done, so adding it also to Gradle task shouldn't be big problem, or I'm wrong?

@alexander-smolyakov

@stefanhuber
Copy link

This worked for me, although '1.17' is not a supported option in the UI.

# ...

jobs:
  - job: test
    pool:
      vmImage: 'ubuntu-latest'
    steps:
      - task: Gradle@3
        inputs:
          gradleWrapperFile: 'gradlew'
          tasks: 'test'
          javaHomeOption: 'JDKVersion'
          jdkVersionOption: '1.17'
          publishJUnitResults: true

# ...

@github-actions
Copy link

github-actions bot commented Jan 1, 2023

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work enhancement stale Task: Gradle
Projects
None yet
Development

No branches or pull requests

6 participants