davidliu
Committed by GitHub

Use settings.gradle for dependency resolution (#451)

@@ -60,7 +60,7 @@ dependencies { @@ -60,7 +60,7 @@ dependencies {
60 60
61 Compose-based apps should check out our [Android Components SDK](https://github.com/livekit/components-android) for composables support. 61 Compose-based apps should check out our [Android Components SDK](https://github.com/livekit/components-android) for composables support.
62 62
63 -You'll also need jitpack as one of your repositories. 63 +You'll also need JitPack as one of your repositories. In your `settings.gradle` file:
64 64
65 ```groovy title="settings.gradle" 65 ```groovy title="settings.gradle"
66 dependencyResolutionManagement { 66 dependencyResolutionManagement {
@@ -28,12 +28,6 @@ subprojects { @@ -28,12 +28,6 @@ subprojects {
28 return 28 return
29 } 29 }
30 30
31 - repositories {  
32 - google()  
33 - mavenCentral()  
34 - maven { url 'https://jitpack.io' }  
35 - }  
36 -  
37 apply plugin: "com.diffplug.spotless" 31 apply plugin: "com.diffplug.spotless"
38 spotless { 32 spotless {
39 // optional: limit format enforcement to just the files changed by this feature branch 33 // optional: limit format enforcement to just the files changed by this feature branch
1 pluginManagement { 1 pluginManagement {
2 repositories { 2 repositories {
  3 + google {
  4 + content {
  5 + includeGroupByRegex("com\\.android.*")
  6 + includeGroupByRegex("com\\.google.*")
  7 + includeGroupByRegex("androidx.*")
  8 + }
  9 + }
  10 + mavenCentral()
3 gradlePluginPortal() 11 gradlePluginPortal()
4 } 12 }
5 } 13 }
  14 +dependencyResolutionManagement {
  15 + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  16 + repositories {
  17 + google()
  18 + mavenCentral()
  19 + maven { url 'https://jitpack.io' }
  20 + }
  21 +}
6 include ':sample-app', ':sample-app-compose', ':livekit-android-sdk' 22 include ':sample-app', ':sample-app-compose', ':livekit-android-sdk'
7 rootProject.name = 'livekit-android' 23 rootProject.name = 'livekit-android'
8 include ':sample-app-common' 24 include ':sample-app-common'