An example of a mod for gradleProperties

Hi, I am using EAS to build my app. I am trying to mod the gradle.properties file but scratching my head on how to set that up. I have an app.config.js file with:

export default ({ config }) => {
  return Object.assign(config, {
    name: appName,
    version,
    mods: {
      ios: {
        /* iOS mods... */
      },
      android: {
        gradleProperties: {
          AsyncStorage_db_size_in_MB: 1000,
        },
      },
    },
  });
};

When I run expo config --type introspect i get back:

[android.gradleProperties]: withAndroidGradlePropertiesBaseMod: nextMod is not a function

I believe my gradleProperties object isn’t correct, but I’ve searched the web and can’t find an example.

The docs say:

mods.android.gradleProperties -- Modify the android/gradle.properties as a Properties.PropertiesItem[].

Any help with this?

1 Like

Here’s an example config plugin that makes use of the withGradleProperties mod: expo-cli/JsEngine.ts at master · expo/expo-cli · GitHub

Another in-place one (which I think is what you’re trying to do) can be found here, although that’s just the callsite

The file that actually is implementing that mod is here

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.