Skip to content

Commit

Permalink
Update the Paper repository endpoint for old dev bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Jan 1, 2025
1 parent e505434 commit 562ffc1
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ abstract class PaperweightUser : Plugin<Project> {
}
}

// Update the Paper repository endpoint for old dev bundles
private fun String.fixRepoUrl(): String = replace("https://papermc.io/repo/", "https://repo.papermc.io/")

private fun Project.configureRepositories(userdevSetup: UserdevSetup) = repositories {
userdevSetup.mache?.url?.let {
maven(it) {
Expand All @@ -233,13 +236,13 @@ abstract class PaperweightUser : Plugin<Project> {
}
}
userdevSetup.paramMappings?.url?.let {
maven(it) {
maven(it.fixRepoUrl()) {
name = PARAM_MAPPINGS_REPO_NAME
content { onlyForConfigurations(PARAM_MAPPINGS_CONFIG) }
}
}
userdevSetup.remapper?.url?.let {
maven(it) {
maven(it.fixRepoUrl()) {
name = REMAPPER_REPO_NAME
content { onlyForConfigurations(REMAPPER_CONFIG) }
}
Expand All @@ -249,13 +252,13 @@ abstract class PaperweightUser : Plugin<Project> {
content { onlyForConfigurations(PLUGIN_REMAPPER_CONFIG) }
}
userdevSetup.decompiler?.url?.let {
maven(it) {
maven(it.fixRepoUrl()) {
name = DECOMPILER_REPO_NAME
content { onlyForConfigurations(DECOMPILER_CONFIG) }
}
}
for (repo in userdevSetup.libraryRepositories) {
maven(repo)
maven(repo.fixRepoUrl())
}
}

Expand Down

0 comments on commit 562ffc1

Please sign in to comment.