diff --git a/plugin/src/main/kotlin/com/vanniktech/maven/publish/SonatypeHost.kt b/plugin/src/main/kotlin/com/vanniktech/maven/publish/SonatypeHost.kt index ed0bf1e1..aa1466ac 100644 --- a/plugin/src/main/kotlin/com/vanniktech/maven/publish/SonatypeHost.kt +++ b/plugin/src/main/kotlin/com/vanniktech/maven/publish/SonatypeHost.kt @@ -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