Skip to content

Commit

Permalink
Remove jcenter dependencies from build (#1436)
Browse files Browse the repository at this point in the history
Motivation:
jcenter is deprecating bintray, and it will soon stop serving artifacts
eventually.

Modifications:
- Remove all references to jcenter from the build

Result:
No more direct references to jcenter from the build avoids dependency on
soon to be decommissioned repository.
  • Loading branch information
Scottmitch authored Mar 16, 2021
1 parent 0585f9f commit 376282b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 46 deletions.
41 changes: 0 additions & 41 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ See the link:https://docs.servicetalk.io/[ServiceTalk docs] for more information

ServiceTalk releases are available on link:https://repo1.maven.org/maven2/io/servicetalk/[Maven Central].

For Gradle as well as other build tools that don't use Maven Central as a default repository, additional configuration
is required.

.Gradle, build.gradle
[source,groovy]
----
repositories {
jcenter() // combines Maven Central and other popular repositories
}
----


Refer to the link:https://docs.servicetalk.io/[ServiceTalk docs] for various examples that will get you started with the
different features of ServiceTalk.

Expand Down Expand Up @@ -58,35 +46,6 @@ the project. Setting the `JAVA_TOOL_OPTIONS` env var to `-Dfile.encoding=UTF-8`
non-UTF-8 environments. Editors and IDEs must also support UTF-8 in order to successfully edit ServiceTalk's source
code.

==== Gradle Repositories

ServiceTalk's build produces custom Gradle plugins and thus has regular (i.e. non-`buildscript`) dependencies
on other plugins. This is the reason why the repositories that are provided if none are configured globally are the
following:

[source,groovy]
----
allprojects {
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
}
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
}
----

If you have defined repositories or repository mirrors in your global Gradle config (`~/.gradle/init.gradle`),
the build will detect them and attempt to inherit `buildscript` repositories into the main `repositories`
of the sub-projects that produce custom Gradle plugins.

NOTE: This inheritance mechanism can be disabled by setting a Gradle property: +
`-PdisableInheritBuildscriptRepositories`.

==== Build Commands

You should be able to run the following command to build ServiceTalk and verify that all
Expand Down
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ if (!repositories) {
allprojects {
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
}
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
}
Expand Down
1 change: 0 additions & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

if (!repositories) {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
} else {
Expand Down
1 change: 0 additions & 1 deletion docs/generation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
buildscript {
if (!repositories) {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/generation/gradle/validateSite.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

if (!repositories) {
repositories {
jcenter()
mavenCentral()
}
}

Expand Down

0 comments on commit 376282b

Please sign in to comment.