mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 01:46:46 +00:00
PR feedback
This commit is contained in:
parent
bfa3ae1e2b
commit
4d60e847a9
1 changed files with 8 additions and 19 deletions
|
@ -6,11 +6,11 @@ Status: Proposed
|
||||||
|
|
||||||
# Context
|
# Context
|
||||||
|
|
||||||
- The `v1` version of `setup-java` downloads and installs Zulu builds of OpenJDK. There is a huge ask from customers to offer AdoptOpenJDK builds of OpenJDK: https://github.com/actions/setup-java/issues/13
|
- The `v1` version of `setup-java` downloads and installs Zulu builds of OpenJDK. There is a huge ask from customers to offer AdoptOpenJDK/Adoptium builds of OpenJDK: https://github.com/actions/setup-java/issues/13
|
||||||
|
|
||||||
- Zulu and AdoptOpenJDK aren't the only distributions of Java though. Other providers include Oracle OpenJDK or Amazon Corretto and ideally it would be nice to support downloading Java from all providers.
|
- Zulu and AdoptOpenJDK aren't the only distributions of Java though. Other providers include Oracle OpenJDK or Amazon Corretto and ideally it would be nice to support downloading Java from all providers.
|
||||||
|
|
||||||
- GitHub Actions virtual environments install and default to AdoptOpenJDK builds of OpenJDK. `setup-java` should give users an option to donwload and use other distributions that may not be be installed
|
- GitHub Actions virtual environments install and default to AdoptOpenJDK builds of OpenJDK. `setup-java` should give users an option to download and use other distributions that may not be be installed
|
||||||
|
|
||||||
# Decision
|
# Decision
|
||||||
|
|
||||||
|
@ -21,41 +21,30 @@ A new required input parameter (titled `distribution`) will be added to `setup-j
|
||||||
```yaml
|
```yaml
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
distribution: adoptopenjdk
|
distribution: adoptium
|
||||||
```
|
```
|
||||||
|
|
||||||
## Default Behavior
|
## Default Behavior
|
||||||
|
|
||||||
There will be no default distribution that we pick for the user. Users will have to specify a distribution in their YAML or else the action will fail.
|
There will be no default distribution that we pick for the user. Users will have to specify a distribution in their YAML or else the action will fail.
|
||||||
|
|
||||||
Requiring a default version will break users that are pinned to `@master` or `@main` as they will have no `distribution` specified in their YAML. Users pinned to `v1` will be uneffected. This change is meant to not be backward compatible and it is acceptable to change the default behavior because a new major version will be released alongside these changes.
|
Requiring a default version will break users that are pinned to `@main` as they will have no `distribution` specified in their YAML. Telemetry indicates that only a small percentage of users would be effected though. Users pinned to `v1` will be uneffected. This change is meant to not be backward compatible and it is acceptable to change the default behavior because a new major version will be released alongside these changes.
|
||||||
|
|
||||||
## Extensibility & Documentation
|
## Extensibility & Documentation
|
||||||
|
|
||||||
`setup-java` should be structured in such a way that will allow the open source community to easily add support for extra distributions.
|
`setup-java` should be structured in such a way that will allow the open source community to easily add support for extra distributions.
|
||||||
|
|
||||||
Existing code will be restructured so that distribution specific code will be easily separated. Currently the core download logic is in a single file, `installer.ts`. This file will be split up and abstracted out so that there will be no vendor specified logic. Each distribution will have it's own file under `src/distributions` that will contain the core setup logic for a specific distribution.
|
Existing code will be restructured so that distribution specific code will be easily separated. Currently the core download logic is in a single file, `installer.ts`. This file will be split up and abstracted out so that there will be no vendor specified logic. Each distribution will have it's own files under `src/distributions` that will contain the core setup logic for a specific distribution.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
∟ src/
|
∟ src/
|
||||||
installer.ts # core installer logic
|
installer.ts # core installer logic
|
||||||
distributions/
|
distributions/
|
||||||
∟ adoptOpenJDK.ts # adoptOpenJDK specific logic
|
∟ adoptium/ # adoptium (formerly AdoptOpenJDK) specific logic
|
||||||
∟ zulu.ts # zulu specific logic
|
∟ zulu/ # zulu specific logic
|
||||||
∟ # future distributions will be added here
|
∟ # future distributions will be added here
|
||||||
```
|
```
|
||||||
|
|
||||||
Each specific distribution can have minute differences or other information that should be documented. There will be a directory for distribution specific information under `docs/`. The main `README.md` will document all available distributions and link to specific documentation. The main `README.md` should not contain distribution specific information.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
∟ docs/
|
|
||||||
distributions/
|
|
||||||
∟ adoptOpenJDK.md # adoptOpenJDK specific info
|
|
||||||
∟ zulu.md # zulu specific info
|
|
||||||
∟ # future distributions will be added here
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
The contribution doc (`CONTRIBUTING.md`) will describe how a new distribution should be added and how everything should be structured.
|
The contribution doc (`CONTRIBUTING.md`) will describe how a new distribution should be added and how everything should be structured.
|
||||||
|
|
||||||
## v2-preview
|
## v2-preview
|
||||||
|
@ -64,7 +53,7 @@ There will be a `v2-preview` branch that will be created for development and tes
|
||||||
|
|
||||||
## Goals & Anti-Goals
|
## Goals & Anti-Goals
|
||||||
|
|
||||||
The main focus of the `v2` version of `setup-java` will be to add support for adoptOpenJDK builds of openJDK in addition to Zulu builds of openJDK. In addition, extensibility will be a priority so that other distributions can be added in the future.
|
The main focus of the `v2` version of `setup-java` will be to add support for adoptium builds of openJDK in addition to Zulu builds of openJDK. In addition, extensibility will be a priority so that other distributions can be added in the future.
|
||||||
|
|
||||||
The `setup-java` action has some logic that creates a `settings.xml` file so that it is easier to publish packages. Any improvements or modifications to this logic or anything Gradle/Maven specific will be avoided during the development of the `v2-preview`.
|
The `setup-java` action has some logic that creates a `settings.xml` file so that it is easier to publish packages. Any improvements or modifications to this logic or anything Gradle/Maven specific will be avoided during the development of the `v2-preview`.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue