Are there are any special steps necessary to use t...
# multiplatform
a
Are there are any special steps necessary to use the maven-publish plugin with a Multiplatform project? I followed these instructions here and but get the following error when attempting to publish.
Copy code
Execution failed for task ':module:publishJvmPublicationToGitHubPackagesRepository'.
> Failed to publish publication 'jvm' to repository 'GitHubPackages'
   > java.lang.NullPointerException (no error message)
I have defined a repository in my root project directory with the correct credentials
p
Can you do local publishing? Just to see if is setting related or repo related
a
Yeah I have had no issue with that
Decided to do to GitHub (which I’m using on various other projects) and received that error
I resolved this - turns out the repositories handler didn’t actually set the URL to the repos (i.e. typo). Very frustrating that the error was quite useless
Copy code
maven {
 name = "GitHubPackages"
 uri("my url here")
 credentials {
    username = githubUsername
    password = githubToken
 }
}
Changed to (note to others - spot check your gradle scripts 🙂 )
Copy code
maven {
 name = "GitHubPackages"
 url = uri("my url here")
 credentials {
    username = githubUsername
    password = githubToken
 }
}
a
I prefer this format for this reason :)
Copy code
maven("my url here") {
 name = "GitHubPackages"
 // ...
}
p
Ahh I see, good catch. Yeah same experience with the error messages and the publish plugin