gpt4 book ai didi

maven - 2021 年, "jcenter()"的最佳替代品?

转载 作者:行者123 更新时间:2023-12-04 11:08:15 43 4
gpt4 key购买 nike

安卓专家,

Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.


在今天的实践中,我应该用什么替换下面的“jcenter”?
不幸的是,在过去的一两年里,所有关于这方面的信息似乎都发生了巨大的变化?因此请教这里的专家。
应用程序只有在重要时才 24+。
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0-beta06'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}

最佳答案

我想目前的建议是使用 mavenCentral()。不幸的是,到目前为止,并非所有软件包都可用。
据我所知,大多数项目将转移到或已经转移到 mavenCentral(显然是 Java 和其他与 JVM 相关的项目)。当前的日落时间延长至 2021 年 3 月下旬,这意味着,在此时间点之后,无法在 jcenter() 上发布任何新包,但仍可从其检索(直到 2022 年 1 月)。
这可以在 https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/ 上重新阅读其中指出:

On May 1, 2021, the sunset will impact all existing Bintray users. Bintray users will be blocked and will no longer be able to use theBintray service. This includes existing software distribution, accountadministrative access, UI access, and the REST API.

After this date JCenter repository will still resolve artifacts, but end users should migrate to the canonical repo (e.g. Java packagesshould be retrieved from Maven Central). On Feb 1st, 2022 JCenter willonly resolve artifacts for Artifactory clients.

关于maven - 2021 年, "jcenter()"的最佳替代品?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66707273/

43 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com