aws-amplify / aws-amplify/amplify-cli
unable to build Java function with Gradle 7.4.2
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/dev/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
### How did you install the Amplify CLI?
pnpm
### If applicable, what version of Node.js are you using?
v18.4.0
### Amplify CLI Version
v9.1.0
### What operating system are you using?
mac
### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
n/a
### Amplify Categories
Not applicable
### Amplify Commands
push
### Describe the bug
Unable to build Java functions with the following Java and Gradle versions
```
openjdk version "18.0.1.1" 2022-04-22
OpenJDK Runtime Environment (build 18.0.1.1+2-6)
OpenJDK 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)
```
```
------------------------------------------------------------
Gradle 7.4.2
------------------------------------------------------------
Build time: 2022-03-31 15:25:29 UTC
Revision: 540473b8118064efcc264694cbcaa4b677f61041
Kotlin: 1.5.31
Groovy: 3.0.9
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 18.0.1.1 (Oracle Corporation 18.0.1.1+2-6)
OS: Mac OS X 12.1 x86_64
```
Receiving the following error on push:
```
Update Gradle to >=5. Download link: https://bit.ly/3aGYDj6
✖ An error occurred when pushing the resources to the cloud
🛑 An error occurred during the push operation: /
```
**NOTE**: this is not reproducible with `amplify-dev`
### Expected behavior
function should build
### Reproduction steps
1. install the latest Gradle version
2. `amplify init -y`
3. `amplify add function`
4. choose Java
5. `amplify push -y`
6. observe error
### GraphQL schema(s)
```graphql
# Put schemas below this line
```
### Project Identifier
_No response_
### Log output
```
# Put your logs below this line
```
### Additional information
_No response_
Contributor guide
Research direction
Start by reproducing the failure with `amplify init -y`, `amplify add function` using Java, and `amplify push -y` on the reported Java and Gradle versions. Compare the stable CLI behavior with `amplify-dev`, then trace the Java function build invoked by `amplify push`; done means the function builds and the push succeeds without the Gradle version error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100