@@ -4,95 +4,155 @@ A collection of GitHub actions for Java projects with Maven and Gradle support.
44
55## Actions
66
7- ### Setup Java
7+ ### Setup Java with Maven
88
9- This action will set up the Java SDK.
9+ This action will set up the Java SDK including Maven .
1010
1111#### Example:
1212
1313``` yaml
14- # Maven
1514 - uses : aboutbits/github-actions-java/setup-with-maven@v4
15+ ` ` `
16+
17+ #### Inputs
18+
19+ The following inputs can be used as ` step.with` keys:
20+
21+ | Name | Required/Default | Description |
22+ |---------------------|------------------------|------------------------------------------------------------------|
23+ | `working-directory` | `.` | The working directory |
24+ | `java-version` | `21` | Java Version |
25+ | `distribution` | `corretto` | Java Distribution |
26+ | `cache` | `true` | Enable Maven/Gradle dependency caching. |
27+ | `cache-name` | `aboutbits-setup-java` | Cache name. Caches with the same name will share their contents. |
28+
29+ # ### Outputs
30+
31+ The following outputs are forwarded from the underlying `setup-java` and `cache` actions :
32+
33+ | Name | Description |
34+ |--------|-----------------------------------------------------------------------------|
35+ | `path` | Path to where the java environment has been installed (same as $JAVA_HOME). |
36+
1637
17- # Gradle
38+ # ## Setup Java with Gradle
39+
40+ This action will set up the Java SDK including Gradle.
41+
42+ # ### Example:
43+
44+ ` ` ` yaml
1845 - uses: aboutbits/github-actions-java/setup-with-gradle@v4
1946` ` `
2047
2148# ### Inputs
2249
2350The following inputs can be used as `step.with` keys :
2451
25- | Name | Required/Default | Description |
26- |------------------------|------------------------|-------------------------------------------------------------------------------------------------------|
27- | `working-directory` | `.` | The working directory |
28- | `java-version` | `21` | Java Version |
29- | `distribution` | `corretto` | Java Distribution |
30- | `cache` | `true` | Enable Maven/Gradle dependency caching. |
31- | `cache-name` | `aboutbits-setup-java` | Cache name. Caches with the same name will share their contents. (Not applicable when Gradle is used) |
32- | `cache-encryption-key` | | Optional encryption key for the Gradle configuration cache. (Not applicable when Maven is used) |
52+ | Name | Required/Default | Description |
53+ |------------------------|------------------|-------------------------------------------------------------|
54+ | `working-directory` | `.` | The working directory |
55+ | `java-version` | `21` | Java Version |
56+ | `distribution` | `corretto` | Java Distribution |
57+ | `cache` | `true` | Enable Maven/Gradle dependency caching. |
58+ | `cache-encryption-key` | | Optional encryption key for the Gradle configuration cache. |
3359
3460# ### Outputs
3561
3662The following outputs are forwarded from the underlying `setup-java` and `cache` actions :
3763
38- | Name | Description |
39- |----------------|----------------------------------------------------------------------------------------------------------------|
40- | `distribution` | Distribution of Java that has been installed. |
41- | `version` | Actual version of the java environment that has been installed. |
42- | `path` | Path to where the java environment has been installed (same as $JAVA_HOME). |
43- | `cache-hit` | A boolean value to indicate an exact match was found for the primary key. (Not applicable when Gradle is used) |
64+ | Name | Description |
65+ |--------|-----------------------------------------------------------------------------|
66+ | `path` | Path to where the java environment has been installed (same as $JAVA_HOME). |
4467
45- # ## Setup Java and Install Dependencies
68+ # ## Setup Java and Install Dependencies with Maven
4669
47- This action will set up the Java SDK and install all dependencies.
48- You can choose between the Maven and Gradle build tool.
70+ This action will set up the Java SDK and install all dependencies using Maven.
4971
5072# ### Example:
5173
5274` ` ` yaml
53- # Maven
5475 - uses: aboutbits/github-actions-java/setup-and-install-with-maven@v4
76+ ` ` `
77+
78+ # ### Inputs
79+
80+ The following inputs can be used as `step.with` keys :
81+
82+ | Name | Required/Default | Description |
83+ |---------------------|------------------------|------------------------------------------------------------------|
84+ | `working-directory` | `.` | The working directory |
85+ | `java-version` | `21` | Java Version |
86+ | `distribution` | `corretto` | Java Distribution |
87+ | `cache` | `true` | Enable Maven/Gradle dependency caching. |
88+ | `cache-name` | `aboutbits-setup-java` | Cache name. Caches with the same name will share their contents. |
5589
56- # Gradle
90+ # ### Outputs
91+
92+ The following outputs are forwarded from the underlying `setup-java` and `cache` actions :
93+
94+ | Name | Description |
95+ |--------|-----------------------------------------------------------------------------|
96+ | `path` | Path to where the java environment has been installed (same as $JAVA_HOME). |
97+
98+ # ## Setup Java and Install Dependencies with Gradle
99+
100+ This action will set up the Java SDK and install all dependencies using Gradle.
101+
102+ # ### Example:
103+
104+ ` ` ` yaml
57105 - uses: aboutbits/github-actions-java/setup-and-install-with-gradle@v4
58106` ` `
59107
60108# ### Inputs
61109
62110The following inputs can be used as `step.with` keys :
63111
64- | Name | Required/Default | Description |
65- |------------------------|------------------------|-------------------------------------------------------------------------------------------------------|
66- | `working-directory` | `.` | The working directory |
67- | `java-version` | `21` | Java Version |
68- | `distribution` | `corretto` | Java Distribution |
69- | `cache` | `true` | Enable Maven/Gradle dependency caching. |
70- | `cache-name` | `aboutbits-setup-java` | Cache name. Caches with the same name will share their contents. (Not applicable when Gradle is used) |
71- | `cache-encryption-key` | | Optional encryption key for the Gradle configuration cache. (Not applicable when Maven is used) |
112+ | Name | Required/Default | Description |
113+ |------------------------|------------------|-------------------------------------------------------------|
114+ | `working-directory` | `.` | The working directory |
115+ | `java-version` | `21` | Java Version |
116+ | `distribution` | `corretto` | Java Distribution |
117+ | `cache` | `true` | Enable Maven/Gradle dependency caching. |
118+ | `cache-encryption-key` | | Optional encryption key for the Gradle configuration cache. |
72119
73120# ### Outputs
74121
75122The following outputs are forwarded from the underlying `setup-java` and `cache` actions :
76123
77- | Name | Description |
78- |----------------|----------------------------------------------------------------------------------------------------------------|
79- | `distribution` | Distribution of Java that has been installed. |
80- | `version` | Actual version of the java environment that has been installed. |
81- | `path` | Path to where the java environment has been installed (same as $JAVA_HOME). |
82- | `cache-hit` | A boolean value to indicate an exact match was found for the primary key. (Not applicable when Gradle is used) |
124+ | Name | Description |
125+ |---------|-----------------------------------------------------------------------------|
126+ | `path` | Path to where the java environment has been installed (same as $JAVA_HOME). |
127+
128+ # ## Set Version with Maven
129+
130+ This action will set the given version in a pom.xml file.
131+
132+ # ### Example:
133+
134+ ` ` ` yaml
135+ - uses: aboutbits/github-actions-java/set-version-with-maven@v4
136+ ` ` `
137+
138+ # ### Inputs
139+
140+ The following inputs can be used as `step.with` keys :
141+
142+ | Name | Required/Default | Description |
143+ |------------------------|------------------|-----------------------|
144+ | `working-directory` | `.` | The working directory |
145+ | `version` | Required | Package version |
83146
84- # # Gradle configuration cache
147+ # # Gradle cache configuration
85148
86- To enable the Gradle configuration cache, which further improves the build performance in addition to the default
87- enabled wrapper/script/dependency/build cache, create a GitHub secret called `GRADLE_ENCRYPTION_KEY` and pass it to the
88- ` cache-encryption-key` input.
149+ To enable the Gradle configuration cache, which further improves the build performance in addition to the default enabled wrapper/script/dependency/build cache, pass a secret to the `cache-encryption-key` input.
89150If you do not specify `cache-encryption-key`, Gradle will still work, but the configuration cache will not be saved.
90151https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#saving-configuration-cache-data
91152
92153# # Versioning
93154
94- In order to have a versioning in place and working, create lightweight tags that point to the appropriate minor release
95- versions.
155+ In order to have a versioning in place and working, create lightweight tags that point to the appropriate minor release versions.
96156
97157Creating a new minor release :
98158
0 commit comments