This message was deleted.
# community-support
s
This message was deleted.
c
Seeing similar permission errors using foojay - same version, different JDK (Amazon). For me it worked locally but failed in GitHub CI (the first time; after restoring from cache it worked thereafter). I haven’t had a chance to track down what is going on.
e
I tried wiping the cache, but that didn't help. How did you restore from cache if that build never succeeded?
c
Some aspects are cached regardless of success. This is my config for caching / invoking Gradle:
Copy code
- name: Setup and execute Gradle
        uses: gradle/gradle-build-action@v2
        with:
          gradle-version: wrapper
          gradle-home-cache-cleanup: true
          gradle-home-cache-includes: |
            jdks
            go
            go-pkg-cache
          gradle-home-cache-excludes: |
            go/cache
          arguments: build check publish --info --stacktrace --no-configuration-cache -Porg.gradle.java.installations.auto-detect=false
jdks
is the relevant entry
e
Doesn't seem to be working for me. Hopefully someone has an answer. I'll file on their github repo as well
👍 1
Downloading the zip myself I can see that the files that aren't copyable are marked as read only
c
that’s interesting. it looks like similar files in Amazon jdk (legal stuff). Wondering if this is an issue with Gradle itself, as the provider only downloads the JDK, Gradle toolchain then installs it to my understanding. If you have a stack trace from the failure that would confirm this (and be the basis for a Gradle ticket!)
fwiw, i could never get this to fail locally despite everything being as-close-as-possible to GitHub actions. Same Gradle scripts, distribution, disable auto-detect to force download/install, etc - differences being MacOS (Apple Silicon) locally, Ubuntu-latest in GitHub actions.
e
I can only get it to fail locally if I completely remove all installations of the java version for my toolchain (which is pretty easy because I use sdkman)
c
add
-Porg.gradle.java.installations.auto-detect=false
to your Gradle run to side-step using your installed JDKs, Gradle will only look for one’s it’s provisioned in ~/.gradle/jdks (which you can readily remove to start over).
I’ve now added that as a permanent part of gradle.properties for consistency with CI builds.
e
Shouldn't it be the same across local and ci since I specify the version and vendor?
c
no. with auto-detect turned on Gradle will look in ‘standard’ locations first - sdkman, standard install locations, etc - before looking for the JDKs it provisioned. While it may find one that is compatible, it isn’t necessarily going to be one from ~/.gradle/jdks. Wouldn’t be testing downloading/provisioning of JDK, nor would it pull the latest minor rev etc.