What's the best way to add a repository (Jitpack) to android/build.gradle?

Please provide the following:

  1. SDK Version: v47
  2. Platforms(Android/iOS/web/all): all

I’m trying to use this package - fidel-react-native - npm

I’d like to stick to the manage workflow and need to add the following to the android/build.gradle file

allprojects {
  repositories {
    ...
    maven { url "https://jitpack.io" }
  }
}

Is the only\appropriate way to do this to create a plugin and use “withProjectBuildGradle?”

As far as I know, the best way would be for fidel-react-native to do whatever’s needed to have Autolinking take care of it for you. I might be wrong, but I think Autolinking normally handles that sort of thing for you.

If you do actually need to add it yourself, then yes, you’d need a Config Plugin. Try searching in the expo/expo, expo/expo-cli, expo/config-plugins repositories (and maybe elsewhere on GitHub) for usages of withProjectBuildGradle.

1 Like

As it turns out, the configuration above is already included in expo by default…

1 Like

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