Closed vRallev closed 1 month ago
SonatypeHost has a public single argument costructor that takes the url for a host. That's what Google is using for their Sonatype instance https://github.com/google/horologist/blob/8ce20e41a98507d5cbe20f4efb512412954af762/build.gradle.kts#L86
I don't know how, but I missed that line. It would be great if SONATYPE_HOST
in gradle.properties
would support that or maybe a different parameter SONATYPE_ROOT_URL
. But I also understand that this request is rare and you don't want to support that.
Feel free to close the issue.
We could do something simple like if the value of SONATYPE_HOST
starts with https
we accept it and call that constructor
That would be neat and remove boilerplate in our build files. The setup through the properties files is convenient.
SonatypeHost
isdata class
to hold two primitive properties. It defines built-in defaults for known hosts, but doesn't expose the constructor or a factory method to create new ones and throws an exception instead.I'm asking adding a factory method or making the constructor public. Sonatype provides custom domains for organizations, e.g. AWS uses
aws.oss.sonatype.org
. Without changing the host we cannot publish our artifacts through this plugin.As a workaround I copied the existing source file into
buildSrc
, modified it my needs and then publishing just worked fine.