settings.gradle 1.1 KB

12345678910111213141516171819202122232425262728
  1. pluginManagement {
  2. repositories {
  3. // 国内镜像,顺序越靠前优先级越高
  4. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  5. maven { url 'https://maven.aliyun.com/repository/google' }
  6. google()
  7. gradlePluginPortal() // 官方插件仓库兜底
  8. }
  9. }
  10. // Gradle 7+ 专用:所有模块的依赖也走阿里云
  11. dependencyResolutionManagement {
  12. repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)
  13. repositories {
  14. maven { url 'https://maven.aliyun.com/repository/google' }
  15. maven { url 'https://maven.aliyun.com/repository/central' }
  16. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  17. google()
  18. mavenCentral()
  19. }
  20. }
  21. rootProject.name = 'taroDemo'
  22. apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
  23. include ':app'
  24. includeBuild(file('../node_modules/@react-native/gradle-plugin').toPath().toRealPath().toAbsolutePath().toString())
  25. apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
  26. useExpoModules()