Skip to content

Unable to deploy android library #35

@UmairKhalid786

Description

@UmairKhalid786

I'm trying to configure publishing for my Android library, and here's what my current setup looks like:

android {
    publishing {
        singleVariant("release")
    }
}
deployer {
    content {
        androidComponents("release") {
            kotlinSources()
            emptyDocs()
        }
    }
    projectInfo {
        artifactId = appName
        description = "**"
        url = "https://gitlab.com/someurl"
        scm.fromGitlab("username", "projectname")
        license("license")
        developer("", "", "", "")
    }
    centralPortalSpec(appName) {
        auth.user = secret("SONATYPE_USERNAME")
        auth.password = secret("SONATYPE_PASSWORD")
        allowMavenCentralSync = false
    }

    signing {
        key = secret("SIGNING_KEY")
        password = secret("SIGNING_PASSWORD")
    }
}

However, I'm getting the following error during the build:

* What went wrong:
A problem was found with the configuration of task ':MyLibrary:preDeployCentralPortalMyLibrary' (type 'CentralPortalInitializationTask').
  - In plugin 'io.deepmedia.tools.deployer' type 'io.deepmedia.tools.deployer.specs.CentralPortalInitializationTask' property 'service' doesn't have a configured value.
    
    Reason: This property isn't marked as optional and no value has been configured.
    
    Possible solutions:
      1. Assign a value to 'service'.
      2. Mark property 'service' as optional.
    
    For more information, please refer to https://docs.gradle.org/8.9/userguide/validation_problems.html#value_not_set in the Gradle documentation.

I'm pretty sure I'm just missing a small configuration detail here. This exact setup works fine for KMP Android deployment, but fails when used in a pure Android library module.

Any ideas on what I might be missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions