Skip to content

Commit 7445294

Browse files
committed
build(gradle): remove jcenter and add gradle plugin portal
- Remove jcenter repository from all projects - Add gradle plugin portal repository - Log warning message for removed jcenter repository - Replace jcenter with mavenCentral for all artifact repositories
1 parent 218d48f commit 7445294

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

build.gradle

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,19 @@ buildscript {
1414
apply from: rootProject.file("config.gradle")
1515

1616
repositories {
17+
all { ArtifactRepository repo ->
18+
println repo.url.toString()
19+
if (repo.url.toString().startsWith("https://jcenter.bintray.com/")) {
20+
project.logger.warn "Repository ${repo.url} removed."
21+
remove repo
22+
mavenCentral()
23+
}
24+
}
25+
gradlePluginPortal()
1726
mavenLocal()
1827
mavenCentral()
1928
maven { url 'https://jitpack.io' }
20-
jcenter { url 'https://jcenter.bintray.com/'}
29+
// jcenter { url 'https://jcenter.bintray.com/'}
2130
google()
2231
}
2332

@@ -32,6 +41,15 @@ buildscript {
3241
allprojects {
3342

3443
repositories {
44+
all { ArtifactRepository repo ->
45+
println repo.url.toString()
46+
if (repo.url.toString().startsWith("https://jcenter.bintray.com/")) {
47+
project.logger.warn "Repository ${repo.url} removed."
48+
remove repo
49+
mavenCentral()
50+
}
51+
}
52+
gradlePluginPortal()
3553
mavenLocal()
3654
// for custom android repository
3755
// maven { url LIB_CUSTOM_ANDROID_REPOSITORY_URL }
@@ -46,7 +64,7 @@ allprojects {
4664
// maven { url 'https://maven.aliyun.com/repository/public/' }
4765
mavenCentral()
4866
maven { url 'https://jitpack.io' }
49-
jcenter { url 'https://jcenter.bintray.com/'}
67+
// jcenter { url 'https://jcenter.bintray.com/'}
5068
google()
5169
}
5270

0 commit comments

Comments
 (0)