Skip to content

Commit

Permalink
feat: block external repos only in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubydesic committed Dec 8, 2022
1 parent 617e641 commit abfd40f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ subprojects {
}
}
}
if (project.use_external_repositories == "true") {
if (!project.block_external_repositories) {
mavenLocal()
maven {
name = "ParchmentMC"
url = "https://maven.parchmentmc.org"
Expand All @@ -82,11 +83,10 @@ subprojects {
url = 'https://maven.tterrag.com/'
}
}
mavenLocal()
}

// Remove automatically added repos
if (project.use_external_repositories != "true") {
if (project.block_external_repositories) {
repositories.removeIf {
def url = it.url.toString()
url.contains("maven.minecraftforge.net") ||
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ forge_version=1.18.2-40.1.69
# Prevent kotlin from autoincluding stdlib as a dependency, which breaks
# gradle's composite builds (includeBuild) for some reason. We'll add it manually
kotlin.stdlib.default.dependency=false
# Enable if the VS maven is down or missing some dependency you want to add
use_external_repositories=true
# Left intentionally empty
vs_maven_url=
vs_maven_username=
Expand All @@ -21,3 +19,6 @@ curse_api_key=
curse_project_id=258371
modrinth_api_key=
modrinth_project_id=V5ujR2yw
# This is set to true in CI, to ensure that VS doesn't rely on a maven hosted in someone's basement to build
# you can also set it to true if some external maven is misbehaving (forge I'm looking @ u)
block_external_repositories=
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pluginManagement {
}
}
}
if (use_external_repositories != "true") {
if (!block_external_repositories) {
maven { url "https://maven.architectury.dev/" }
maven { url "https://maven.fabricmc.net/" }
}
Expand Down

0 comments on commit abfd40f

Please sign in to comment.