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

no configured signatory issue #2

Closed
hanrw opened this issue Feb 16, 2024 · 5 comments
Closed

no configured signatory issue #2

hanrw opened this issue Feb 16, 2024 · 5 comments

Comments

@hanrw
Copy link

hanrw commented Feb 16, 2024

I have two plugins files under module - convention-plugins which comming from - https://github.com/Kotlin/multiplatform-library-template/tree/main/convention-plugins

was trying to migrate to your plugin but i got some errors.

module.publication.gradle.kts

import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.bundling.Jar
import org.gradle.kotlin.dsl.`maven-publish`

plugins {
    id("com.gradleup.nmcp")
    `maven-publish`
    signing
}


nmcp {
    publishAllPublications {}
}

signing {
    val signingKey: String? by project
    val signingKeyId: String? by project
    val signingPassword: String? by project
    useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
    sign(publishing.publications)
}

publishing {
    // Configure all publications
    publications.withType<MavenPublication> {
        // Stub javadoc.jar artifact
        artifact(tasks.register("${name}JavadocJar", Jar::class) {
            archiveClassifier.set("javadoc")
            archiveAppendix.set([email protected])
        })

        // Provide artifacts information required by Maven Central
        pom {
            name.set("Kotlin Multiplatform library template")
            description.set("Dummy library to test deployment to Maven Central")
            url.set("https://github.com/Kotlin/multiplatform-library-template")

            licenses {
                license {
                    name.set("MIT")
                    url.set("https://opensource.org/licenses/MIT")
                }
            }
            developers {
                developer {
                    id.set("JetBrains")
                    name.set("JetBrains Team")
                    organization.set("JetBrains")
                    organizationUrl.set("https://www.jetbrains.com")
                }
            }
            scm {
                url.set("https://github.com/Kotlin/multiplatform-library-template")
            }
        }
    }
}

and root.publication.gradle.kts

plugins {
    id("com.gradleup.nmcp")
    id("maven-publish")
}

nmcp {
    publishAggregation {
        project(":openai-client")
        project(":openai-client:openai-client-core")
        project(":openai-client:openai-client-darwin")
        project(":openai-client:openai-client-cio")
        publicationType = "AUTOMATIC"
    }
}

but when run gradle publish i got an error below:

Execution failed for task ':openai-client:openai-client-cio:signJvmPublication'.
> Cannot perform signing task ':openai-client:openai-client-cio:signJvmPublication' because it has no configured signatory
@hanrw hanrw closed this as completed Mar 1, 2024
@lucasbordini
Copy link

did you find a solution ?

@martinbonnin
Copy link
Member

@lucasbordini this happens when the signing plugin cannot find credentials. See https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials for more details

@cromefire
Copy link

It would kinda be good if that didn't hook automatically on build or can be disable or so, because I just forked a repository in order to work on it (with no intention to publish it myself), but I can build it without setting up signing. Singing sounds to me like something that should happen during the publishing stage and not on any dev build.

@martinbonnin
Copy link
Member

It would kinda be good if that didn't hook automatically on build

Version 0.0.9 is rolling out with a fix for this. Should be live in a few minutes.

@cromefire
Copy link

Thanks

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

No branches or pull requests

4 participants