-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
./gradlew build is 'Compiling and testing with Java 21' although actions/setup-java@v4 is setting Java 17 #714
Comments
Hello @GabeGiro, |
Hi @GabeGiro, After replicating the issue using the provided workflow, we found that everything is working as expected. The Build with Gradle step is correctly compiling and testing with Java 17. For your reference, we’ve included link of the successful run. To assist us in further investigating, could you please share a link to the build or a public repository where the issue can be reproduced? |
Hi @GabeGiro, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know. |
@gowridurgad I'm not going to work on this issue for at least 3 more weeks. Although I saw your successful build I'm curious what is the difference between our gradle files. I'm working with a mature Android project (few years) so there is 100% chance something is different and unfortunately Android builds don't have containerisation - hence it works on yours but not on mine. Again, I will not work on this any time soon but if you can share your process in the meantime, that would be useful. Did you start you Android project from scratch, did you use Android Studio's empty project, are you using old or new gradle files? Thank you in advance |
Hi @GabeGiro, Android Gradle files include Android-specific plugin configurations, dependencies, and build configurations, while normal Gradle files are typically used for Java or other JVM-based projects without Android-specific configurations. we are using simple application using new Gradle files specific to our setup. To generate Gradle files:
For more detailed steps, refer to the official documentation on Building and testing Java with Gradle. |
Description:
./gradlew build is 'Compiling and testing with Java 21' after actions/setup-java@v4 is setting Java 17.
I tried a lot of things:
Task version:
v3 and v4
Platform:
Runner type:
Repro steps:
Use this ci.yml in your Android project:
Note: I commented out the cache for the purpose of making sure that I'm not reusing gradle files
Expected behavior:
Build with Gradle step should show:
Compiling and testing with Java 17
Actual behavior:
Build with Gradle step shows:
Compiling and testing with Java 21
The text was updated successfully, but these errors were encountered: