Override settings in gradle.properties

Hello,

I’m using the bare workflow and I use EAS cli to build my Android application. I’ve been trying to implement Sentry, which requires some configuration in gradle.

One of the main config changes needed is having the property org.gradle.configureondemand set to false in gradle.properties file. I did that but still Sentry wasn’t working. After more research I found this page Build server infrastructure - Expo Documentation which shows that org.gradle.configureondemand is always set as true, and that’s what’s blocking my Sentry implementation from working.

Is there a way to override this property? I need to change it otherwise I can’t get Sentry to work at all.

Thanks in advance!

I think that your gradle.properties should override global config, did you tried setting it to false there?

If that won’t work you can try removing ~/.gradle/gradle.properties in npm hook Integrating with JavaScript tooling - Expo Documentation

Global gradle properties will override the project gradle properties (Build Environment).
Anyway I tried your suggestion to use the npm hook to remove the global properties file, and it worked!
I’ll stick to this approach for now.
Thanks a lot!

Global gradle properties will override the project gradle properties (Build Environment).

We missed that, you are right. We will need to switch to using GRADLE_OPTS env instead.