Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set insecure deps behind a property option #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ propertyDefaultIfUnset("gradleTokenVersion", "")
propertyDefaultIfUnset("useSrcApiPath", false)
propertyDefaultIfUnset("includeWellKnownRepositories", true)
propertyDefaultIfUnset("includeCommonDevEnvMods", true)
propertyDefaultIfUnset("allowInsecureDependencySources", false)
propertyDefaultIfUnset("noPublishedSources", false)
propertyDefaultIfUnset("forceEnableMixins", false)
propertyDefaultIfUnsetWithEnvVar("enableCoreModDebug", false, "CORE_MOD_DEBUG")
Expand Down Expand Up @@ -392,7 +393,7 @@ tasks.named('processIdeaSettings').configure {

// Allow unsafe repos but warn
repositories.configureEach { repo ->
if (repo instanceof UrlArtifactRepository) {
if (allowInsecureDependencySources.toBoolean() && repo instanceof UrlArtifactRepository) {
if (repo.getUrl() != null && repo.getUrl().getScheme() == "http" && !repo.allowInsecureProtocol) {
logger.warn("Deprecated: Allowing insecure connections for repo '${repo.name}' - add 'allowInsecureProtocol = true'")
repo.allowInsecureProtocol = true
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ includeWellKnownRepositories = true
# Overrides the above setting to be always true, as these repositories are needed to fetch the mods
includeCommonDevEnvMods = true

# Allows fetching dependencies from sources deemed insecure, ie, may be over http
# Will log the source repository when this is enabled
allowInsecureDependencySources = false

# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
Expand Down