Skip to content

Commit

Permalink
Configuration: remove Bintray et al. (step 3) (#2371)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelcarmena authored Apr 7, 2021
1 parent 6cecbc8 commit 025984d
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 28 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
env:
BASEDIR: ${{github.workspace}}/arrow-libs
JAVA_OPTS: -Xms512m -Xmx1024m
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}

runs-on: macos-latest
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish_arrow-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:

env:
BASEDIR: ${{github.workspace}}/arrow-libs
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}

runs-on: macos-latest
defaults:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Both successful or failed build checks allow to download the tests report to rev

#### What happens when merging a pull request

When merging the pull request, a new SNAPSHOT library will be published into [OSS repository](https://oss.jfrog.org/artifactory/oss-snapshot-local/io/arrow-kt/).
When merging the pull request, a new SNAPSHOT library will be published into [Sonatype OSSRH](https://oss.sonatype.org/service/local/repositories/snapshots/content/io/arrow-kt/).

On the other hand, the documentation for the next version (SNAPSHOT) will be updated:

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<a href="https://arrow-kt.io" title="Arrow website"><img src="img/logo/arrow-dark.svg" width="200" alt=""></a>

[![Maven Central](https://img.shields.io/maven-central/v/io.arrow-kt/arrow-core?color=4caf50&label=latest%20release)](https://maven-badges.herokuapp.com/maven-central/io.arrow-kt/arrow-core)
[![Latest snapshot](https://img.shields.io/maven-metadata/v?color=important&label=latest%20snapshot&metadataUrl=https%3A%2F%2Foss.jfrog.org%2Fartifactory%2Foss-snapshot-local%2Fio%2Farrow-kt%2Farrow-core%2Fmaven-metadata.xml)](https://oss.jfrog.org/artifactory/oss-snapshot-local/io/arrow-kt/arrow-core/)
[![Kotlin version badge](https://img.shields.io/badge/Kotlin-1.4-blue)](https://kotlinlang.org/docs/reference/whatsnew14.html)
[![Latest snapshot](https://img.shields.io/maven-metadata/v?label=latest%20snapshot&metadataUrl=https%3A%2F%2Foss.sonatype.org%2Fservice%2Flocal%2Frepositories%2Fsnapshots%2Fcontent%2Fio%2Farrow-kt%2Farrow-core%2Fmaven-metadata.xml)](https://oss.sonatype.org/service/local/repositories/snapshots/content/io/arrow-kt/)
[![Kotlin version](https://img.shields.io/badge/Kotlin-1.4-blue)](https://kotlinlang.org/docs/reference/whatsnew14.html)

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![StackOverflow](https://img.shields.io/badge/arrow--kt-grey.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/arrow-kt)
Expand Down Expand Up @@ -208,7 +208,7 @@ If you want to try the latest features, replace `0.13.1` with `1.0.0-SNAPSHOT` a
allprojects {
repositories {
...
maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
```
Expand Down
10 changes: 8 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ LATEST_VERSION=0.10.5

When merging that pull request:

* New RELEASE version will be published into Bintray for all the Arrow libraries.
* New RELEASE version will be published for all the Arrow libraries into Sonatype staging repository.
* A tag will be created with the RELEASE version.
* Release notes will be created and associated to that tag.
* The website will be updated with a new RELEASE version (`doc` and `doc/major.minor` directories)

Then, it will be necessary to sync Bintray with Maven.
Then, it will be necessary to close and release the Sonatype repository to sync with Maven Central:

1. Login to https://oss.sonatype.org/ > `Staging repositories`
3. Check the content and then: **Close** (it will check if the content meet the requirements)
4. **Release** to sync with Maven Central (**Drop** and repeat if there are issues).

NOTE: [This plugin](https://github.com/gradle-nexus/publish-plugin) provides tasks for closing and releasing the staging repositories. However, that plugin must be applied to the root project and it would be necessary to discard modules for publication. Let's keep this note here to give it a try later on.
4 changes: 2 additions & 2 deletions arrow-libs/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ RETROFIT_VERSION=2.8.1
RX_JAVA_VERSION=2.2.13
SCALA_LIBRARY_VERSION=2.13.1
# Publication
RELEASE_REPOSITORY=https://api.bintray.com/maven/arrow-kt/arrow-kt/arrow
SNAPSHOT_REPOSITORY=https://oss.jfrog.org/artifactory/oss-snapshot-local
RELEASE_REPOSITORY=https://oss.sonatype.org/service/local/staging/deploy/maven2/
SNAPSHOT_REPOSITORY=https://oss.sonatype.org/content/repositories/snapshots/
# Pomfile definitions
POM_DESCRIPTION=Functional companion to Kotlin's Standard Library
POM_URL=https://github.com/arrow-kt/arrow/
Expand Down
18 changes: 15 additions & 3 deletions arrow-libs/gradle/publication.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* limitations under the License.
*/

apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'

afterEvaluate {
publishing {
Expand Down Expand Up @@ -59,13 +60,24 @@ afterEvaluate {
repositories {
maven {
credentials {
username "$System.env.BINTRAY_USER"
password "$System.env.BINTRAY_API_KEY"
username "$System.env.SONATYPE_USER"
password "$System.env.SONATYPE_PWD"
}
url = VERSION_NAME.endsWith('SNAPSHOT') ? SNAPSHOT_REPOSITORY : RELEASE_REPOSITORY
}
}
}

// Guide: https://docs.gradle.org/current/userguide/signing_plugin.html
if (project.hasProperty("signingKey") && project.hasProperty("signingPassword")) {
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)

sign publishing.publications.mavenJava
}
}
}

task sourcesJar(type: Jar, dependsOn: classes) {
Expand Down
16 changes: 8 additions & 8 deletions arrow-libs/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
This file includes the configuration of 'projectDir' beyond 'include' to
allow to work with:
- All the libraries when opening 'arrow-libs'
- CORE libraries when opening 'arrow-libs/core'
- FX libraries when opening 'arrow-libs/fx'
- OPTICS libraries when opening 'arrow-libs/optics'
- ANK libraries when opening 'arrow-libs/ank'
This distribution is also useful to publish the artifacts from GitHub tasks (the number of
artifacts for publication into Bintray in a single task is limited).
- All the libraries when opening 'arrow-libs'
- CORE libraries when opening 'arrow-libs/core'
- FX libraries when opening 'arrow-libs/fx'
- OPTICS libraries when opening 'arrow-libs/optics'
- ANK libraries when opening 'arrow-libs/ank'
This distribution is also useful to publish the artifacts in case there is any limit about
the number of artifacts in a single task.
*/

Expand Down
6 changes: 3 additions & 3 deletions arrow-site/docs/docs/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ permalink: /core/
---

[![Maven Central](https://img.shields.io/maven-central/v/io.arrow-kt/arrow-core?color=4caf50&label=latest%20release)](https://maven-badges.herokuapp.com/maven-central/io.arrow-kt/arrow-core)
[![Latest snapshot](https://img.shields.io/maven-metadata/v?color=important&label=latest%20snapshot&metadataUrl=https%3A%2F%2Foss.jfrog.org%2Fartifactory%2Foss-snapshot-local%2Fio%2Farrow-kt%2Farrow-core%2Fmaven-metadata.xml)](https://oss.jfrog.org/artifactory/oss-snapshot-local/io/arrow-kt/arrow-core/)
[![Kotlin version badge](https://img.shields.io/badge/Kotlin-1.4-blue)](https://kotlinlang.org/docs/reference/whatsnew14.html)
[![Latest snapshot](https://img.shields.io/maven-metadata/v?label=latest%20snapshot&metadataUrl=https%3A%2F%2Foss.sonatype.org%2Fservice%2Flocal%2Frepositories%2Fsnapshots%2Fcontent%2Fio%2Farrow-kt%2Farrow-core%2Fmaven-metadata.xml)](https://oss.sonatype.org/service/local/repositories/snapshots/content/io/arrow-kt/)
[![Kotlin version](https://img.shields.io/badge/Kotlin-1.4-blue)](https://kotlinlang.org/docs/reference/whatsnew14.html)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![StackOverflow](https://img.shields.io/badge/arrow--kt-grey.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/arrow-kt)
[![Twitter](https://img.shields.io/twitter/follow/arrow_kt?color=blue&style=flat)](https://twitter.com/arrow_kt)
Expand Down Expand Up @@ -199,7 +199,7 @@ If you want to try the latest features, replace `0.13.1` with `1.0.0-SNAPSHOT` a
allprojects {
repositories {
...
maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
```
15 changes: 13 additions & 2 deletions arrow-stack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ buildscript {
plugins {
id "maven-publish"
id "java-platform"
id "signing"
}

dependencies {
Expand Down Expand Up @@ -67,10 +68,20 @@ publishing {
repositories {
maven {
credentials {
username System.getenv('BINTRAY_USER')
password System.getenv('BINTRAY_API_KEY')
username System.getenv('SONATYPE_USER')
password System.getenv('SONATYPE_PWD')
}
url = VERSION_NAME.endsWith('SNAPSHOT') ? SNAPSHOT_REPOSITORY : RELEASE_REPOSITORY
}
}
}

if (project.hasProperty("signingKey") && project.hasProperty("signingPassword")) {
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)

sign publishing.publications.myPlatform
}
}

0 comments on commit 025984d

Please sign in to comment.