Skip to content

Commit

Permalink
support custom Sonatype hosts through Gradle property
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielittner committed Sep 19, 2024
1 parent 7672a28 commit 425e779
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ data class SonatypeHost internal constructor(
"DEFAULT" -> DEFAULT
"S01" -> S01
"CENTRAL_PORTAL" -> CENTRAL_PORTAL
else -> throw IllegalArgumentException("No SonatypeHost constant $sonatypeHost")
else -> if (sonatypeHost.startsWith("https://")) {
SonatypeHost(sonatypeHost)
} else {
throw IllegalArgumentException("No SonatypeHost constant $sonatypeHost")
}
}

@JvmField
Expand Down

0 comments on commit 425e779

Please sign in to comment.