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
{{ message }}
Repository navigation
Commit 5ad8d5e
Browse filesBrowse the repository at this point in the historyBrowse files
* 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
@@ -538,14 +538,21 @@ steps:
538
538
something_other
539
539
```
540
540
541
-
## Java-version file
542
-
If the `java-version-file` input is specified, the action will try to extract the version from the file and install it.
543
-
Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv).
541
+
## Java version file
542
+
If the `java-version-file` input is specified, the action will extract the version from the file and install it.
543
+
544
+
Supported files are .java-version and .tool-versions.
545
+
In .java-version file, only the version should be specified, e.g., 17.0.7.
546
+
In .tool-versions file, java version should be preceded by the java keyword, e.g., java 17.0.7.
547
+
.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).
548
+
549
+
If both java-version and java-version-file inputs are provided, the java-version input will be used.
550
+
544
551
Valid entry options:
545
552
```
546
553
major versions: 8, 11, 16, 17, 21
547
554
more specific versions: 1.8.0.2, 17.0, 11.0, 11.0.4, 8.0.232, 8.0.282+8
548
-
early access (EA) versions: 15-ea, 15.0.0-ea, 15.0.0-ea.2, 15.0.0+2-ea
555
+
early access (EA) versions: 15-ea, 15.0.0-ea
549
556
versions with specified distribution: openjdk64-11.0.2
550
557
```
551
558
If the file contains multiple versions, only the first one will be recognized.
0 commit comments