We’re standing up a new gradle enterprise instance...
# community-support
h
We’re standing up a new gradle enterprise instance, and attempting to validate that build caching works, but after we run:
Copy code
./gradlew clean
./gradlew --build-cache compileJava
we get:
Copy code
> Task : compileJava
Could not load entry c8e5e9b6464a59e66cb37b40bdd756f5 from remote build cache: Loading entry from '<https://gradle-enterprise.example.com/cache/c8e5e9b6464a59e66cb37b40bdd756f5>' response
status 403: Forbidden
And the gradle build scan says:
Copy code
The build cache was globally disabled in the build. Please consider enabling build caching.
I’ve attached our build.gradle and settings.gradle that we’re using to test. What are we missing?
Thanks!
v
403 Forbidden
So I guess you tried to access with a user that does not have the right to
e
Hey, @Heath Borders! There are a few things I see that could be wrong: 1. What @Vampire mentioned above ☝️ is likely. Regarding configuration, we recommend only enabling anonymous build cache _read_s and not writes and I see you have
push = true
defined in the settings.gradle. Granted, the error you are seeing seems to be a read, but it is something to look into. 2. It looks like there is more than one configuration defined for remote build cache in the settings.gradle file. With Gradle Enterprise, you only need the block that uses
gradleEnterprise.buildCache
. 3. In the build.gradle file you have a block for
buildScan
. I don't recognize this block, but it's contents look more like what you should be defining in the
gradleEnterprise
block of the settings.gradle file.
You may find these Gradle Enterprise build configuration samples we have useful. • GroovyKotlin
thank you 1
v
The
buildScan
block is from ancient versions of the Gradle Enterprise plugin. If you go to
<http://scans.gradle.com|scans.gradle.com>
and select
Gradle < 4.3
you still see it there.
e
Ah, I figured something like that was the case. Much before my time. 🙂 Thanks for pointing that out.
👌 1
h
Thanks again for your help folks! We were able to get things working
👌 1
🙌 1