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

Open up SonatypeHost #504

Merged
merged 6 commits into from
Jan 27, 2023
Merged

Open up SonatypeHost #504

merged 6 commits into from
Jan 27, 2023

Conversation

yschimke
Copy link
Contributor

Relates to https://issues.sonatype.org/browse/OSSRH-88192

Make SonatypeHost a value class instead of an enum.

fixes #503

@yschimke
Copy link
Contributor Author

Testing failed

org.gradle.internal.snapshot.ValueSnapshottingException: Could not serialize value of type SonatypeHost

@yschimke
Copy link
Contributor Author

Now working at least to the point of a 403.

Caused by: java.io.IOException: Cannot get stagingProfiles for account yuri@schimke.ee: <html>
  <head>
    <title>403 - Forbidden</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <link rel="icon" type="image/png" href="https://google.oss.sonatype.org/favicon.png">
    <!--[if IE]>
    <link rel="SHORTCUT ICON" href="https://google.oss.sonatype.org/favicon.ico"/>
    <![endif]-->

Copy link
Collaborator

@gabrielittner gabrielittner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need an overload like this in MavenPublishBaseExtension:

@JvmOverloads
fun publishToMavenCentral(host: String = "DEFAULT" automaticRelease: Boolean = false) 

Groovy (or maybe just Gradle) has something that allows passing an enum value as string to a function.

@yschimke
Copy link
Contributor Author

I think we also need an overload like this in MavenPublishBaseExtension:

@JvmOverloads
fun publishToMavenCentral(host: String = "DEFAULT" automaticRelease: Boolean = false) 

Groovy (or maybe just Gradle) has something that allows passing an enum value as string to a function.

I'm not confident about this part of the change. Won't the overload conflict when no params are provided? Like publishToMavenCentral()

@yschimke
Copy link
Contributor Author

Feel free to takeover this PR, or suggest further changes.

@gabrielittner
Copy link
Collaborator

Looks like there is a ktlint issue, can you run ktlintFormat once? Otherwise I can also do that before merging

> Task :plugin:ktlintMainSourceSetCheck FAILED
/home/runner/work/gradle-maven-publish-plugin/gradle-maven-publish-plugin/plugin/src/main/kotlin/com/vanniktech/maven/publish/SonatypeHost.kt:14:2 Missing spacing before ":"

Copy link
Collaborator

@gabrielittner gabrielittner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I can create a new release with this soon, but we're also blocked by the Sonatype issues 😬

@gabrielittner gabrielittner merged commit f041faa into vanniktech:main Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to set a custom host in publishToMavenCentral?
2 participants