You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* added support for tool version file
* testing with one regex
* working regex
* Checked for the file extension
* added e2e checks for tool version
* removed error warning
* updated regex to support early version
* updated regex for early version support
* updated regex for early version
* updated regex to accept early versions
* added coreinfo to analyze
* updated the regex
* updated regex
* new regex for early version
* updated regex to match the new version file format
* new regex
* changed the regex
* redex updated
* used java version regex
* regex updated
* regex modified
* regex updated
* regex updated
* regex updated
* updated regex to support early versions
* Regex updated to support all java versions
* Documentation updated to add tool version description
* Documentation updated for the tool version file
* update the advanced doc and readme file to specify tool version changes
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This action allows you to work with Java and Scala projects.
27
27
28
28
-`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.
29
29
30
-
-`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).
30
+
-`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).
Copy file name to clipboardExpand all lines: docs/advanced-usage.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -525,14 +525,21 @@ steps:
525
525
something_other
526
526
```
527
527
528
-
## Java-version file
529
-
If the `java-version-file` input is specified, the action will try to extract the version from the file and install it.
530
-
Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv).
528
+
## Java version file
529
+
If the `java-version-file` input is specified, the action will extract the version from the file and install it.
530
+
531
+
Supported files are .java-version and .tool-versions.
532
+
In .java-version file, only the version should be specified, e.g., 17.0.7.
533
+
In .tool-versions file, java version should be preceded by the java keyword, e.g., java 17.0.7.
534
+
.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).
535
+
536
+
If both java-version and java-version-file inputs are provided, the java-version input will be used.
537
+
531
538
Valid entry options:
532
539
```
533
540
major versions: 8, 11, 16, 17, 21
534
541
more specific versions: 1.8.0.2, 17.0, 11.0, 11.0.4, 8.0.232, 8.0.282+8
535
-
early access (EA) versions: 15-ea, 15.0.0-ea, 15.0.0-ea.2, 15.0.0+2-ea
542
+
early access (EA) versions: 15-ea, 15.0.0-ea
536
543
versions with specified distribution: openjdk64-11.0.2
537
544
```
538
545
If the file contains multiple versions, only the first one will be recognized.
0 commit comments