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

automatic uploads to Sonatype #6

Open
danwallach opened this issue Apr 17, 2019 · 2 comments
Open

automatic uploads to Sonatype #6

danwallach opened this issue Apr 17, 2019 · 2 comments

Comments

@danwallach
Copy link
Member

Here's a script that doesn't seem to do the job:

uploadArchives {
    repositories {
        mavenDeployer {
            beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

            repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
                authentication(userName: ossrhUsername, password: ossrhPassword)
            }

            snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
                authentication(userName: ossrhUsername, password: ossrhPassword)
            }

            pom.withXml { fixPomXml(it) }
        }
    }
}

Deleted for now since it was throwing errors on Travis (and I don't want to set up username/password environment variables there.).

If we're going to release versions of RiceChecks on a regular basis, we need to get the uploading process properly automated. Manual upload sucks.

@danwallach
Copy link
Member Author

Seemingly helpful links and multiple possible solutions to the problem:
http://www.albertgao.xyz/2018/01/18/how-to-publish-artifact-to-maven-central-via-gradle/
https://medium.com/dot-debug/deploying-artifacts-to-maven-using-gradle-b669acc1b6f8

Various plugins:
https://github.com/bmuschko/gradle-nexus-plugin
https://github.com/Codearte/gradle-nexus-staging-plugin
https://github.com/marcphilipp/nexus-publish-plugin -- this seems to be the most straightforward

Possibly related, maybe not:
researchgate/gradle-release#244
Codearte/gradle-nexus-staging-plugin#76
-- specifically useful note: Codearte/gradle-nexus-staging-plugin#76 (comment)

Open question: whether we want Travis-CI to automatically publish snapshots. Probably good enough to do it with a local Gradle task.

@danwallach
Copy link
Member Author

danwallach commented Dec 3, 2019

Or, maybe switch over to GitHub's alternative to OSS Sonatype? But data transfer costs are not free for private, although maybe free for public: https://github.com/features/packages

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

1 participant