From b71bea459ab2634eb09f89e411c7796af4a37593 Mon Sep 17 00:00:00 2001 From: mahabaleshwars Date: Tue, 12 Mar 2024 18:19:03 +0530 Subject: [PATCH] update the advanced doc and readme file to specify tool version changes --- README.md | 3 ++- docs/advanced-usage.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 92425cc..a3ac397 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This action allows you to work with Java and Scala projects. - `java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified. - - `java-version-file`: The path to the `.java-version` file. See more details in [about `.java-version` file](docs/advanced-usage.md#Java-version-file). + - `java-version-file`: The path to a file containing java version. Supported file types are `.java-version` and `.tool-versions`. See more details in [about .java-version-file](docs/advanced-usage.md#Java-version-file). - `distribution`: _(required)_ Java [distribution](#supported-distributions). @@ -266,6 +266,7 @@ In the example above multiple JDKs are installed for the same job. The result af - [Publishing using Gradle](docs/advanced-usage.md#Publishing-using-Gradle) - [Hosted Tool Cache](docs/advanced-usage.md#Hosted-Tool-Cache) - [Modifying Maven Toolchains](docs/advanced-usage.md#Modifying-Maven-Toolchains) +- [Java Version File](docs/advanced-usage.md#Java-version-file) ## License diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index e50190f..c3cf42d 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -525,13 +525,14 @@ steps: something_other ``` -## Java-version file +## Java version file If the `java-version-file` input is specified, the action will extract the version from the file and install it. -It recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv). Supported files are .java-version and .tool-versions. In .java-version file, only the version should be specified, e.g., 17.0.7. In .tool-versions file, java version should be preceded by the java keyword, e.g., java 17.0.7. +.java-version recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv) and .tool-version recognizes all variants of the version description according to [asdf](https://github.com/asdf-vm/asdf). + If both java-version and java-version-file inputs are provided, the java-version input will be used. Valid entry options: