Skip to content

Commit

Permalink
Prepare for 2.0 publication
Browse files Browse the repository at this point in the history
Co-authored-by: Alejandro Serrano <[email protected]>
Co-authored-by: franciscodr <[email protected]>
  • Loading branch information
3 people authored Nov 22, 2024
1 parent a203862 commit 63b162f
Show file tree
Hide file tree
Showing 15 changed files with 179 additions and 207 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/githubpages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: githubpages

on:
release:
types: [published]
types: [ released ]

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.kotlin.dsl.internal.io.timeout=120000 -Dorg.gradle.jvmargs="-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
Expand Down
38 changes: 11 additions & 27 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
name: "Publish all libs, Arrow-stack and Docs"

on:
push:
branches: [ main ]
workflow_dispatch:
branches: [ main ]
inputs:
version:
description: 'Version'
required: true
type: string
release:
types: [ published ]

env:
BASEDIR: ${{github.workspace}}/arrow-libs
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.kotlin.dsl.internal.io.timeout=120000 -Dorg.gradle.jvmargs="-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
OSS_USER: '${{ secrets.OSS_USER }}'
OSS_TOKEN: '${{ secrets.OSS_TOKEN }}'
OSS_STAGING_PROFILE_ID: '${{ secrets.OSS_STAGING_PROFILE_ID }}'
SIGNING_KEY_NAME: '${{ secrets.SIGNING_KEY_NAME }}'
SIGNING_KEY_ID: '${{ secrets.SIGNING_KEY_ID }}'
SIGNING_KEY_PASSPHRASE: '${{ secrets.SIGNING_KEY_PASSPHRASE }}'
SIGNING_KEY: '${{ secrets.SIGNING_KEY }}'
ORG_GRADLE_PROJECT_mavenCentralUsername: '${{ secrets.OSS_USER }}'
ORG_GRADLE_PROJECT_mavenCentralPassword: '${{ secrets.OSS_TOKEN }}'
ORG_GRADLE_PROJECT_signingInMemoryKeyId: '${{ secrets.SIGNING_KEY_ID }}'
ORG_GRADLE_PROJECT_signingInMemoryKey: '${{ secrets.SIGNING_KEY }}'
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: '${{ secrets.SIGNING_KEY_PASSPHRASE }}'

jobs:
publish:
Expand All @@ -40,17 +31,10 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: Assemble
run: ./gradlew assemble -Pversion=${{ inputs.version }} -Penable_wasm=true
run: ./gradlew assemble -Pversion=${{ github.event.release.name }} -Penable_wasm=true

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'

- name: Publish next major SNAPSHOT version
run: ./gradlew -Pversion=${{ inputs.version }} publish
- name: Publish artifacts
run: ./gradlew -Pversion=${{ github.event.release.name }} publish -Penable_wasm=true
20 changes: 10 additions & 10 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: Knit and API checks
run: ./gradlew knitCheck apiCheck --scan
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: iOS and watchOS tests
run: ./gradlew iosSimulatorArm64Test iosX64Test watchosSimulatorArm64Test watchosX64Test --parallel --scan
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: Update API files
run: ./gradlew apiDump
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: Apply Spotless rules
run: ./gradlew spotlessApply
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: macOS and tvOS tests
run: ./gradlew macosArm64Test macosX64Test tvosSimulatorArm64Test tvosX64Test --parallel --scan
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: Windows (MinGW-w64) tests
run: ./gradlew mingwX64Test --scan
Expand Down Expand Up @@ -207,7 +207,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: JVM tests
run: ./gradlew jvmTest --scan
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: Upgrade yarn.lock
run: ./gradlew kotlinUpgradeYarnLock
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: Linux (x64) tests
run: ./gradlew linuxX64Test --scan
Expand Down Expand Up @@ -315,7 +315,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}

- name: Compile WebAssembly
run: ./gradlew wasmJsApiBuild wasmJsJar wasmJsTest -Penable_wasm=true --scan
Expand Down
2 changes: 1 addition & 1 deletion arrow-libs/core/arrow-cache4k/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Maven publishing configuration
POM_NAME=Arrow + cache4k
POM_NAME=Arrow Cache4k
# Build configuration
kapt.incremental.apt=false
2 changes: 1 addition & 1 deletion arrow-libs/core/arrow-core-serialization/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)

alias(libs.plugins.publish)
alias(libs.plugins.kotlinx.kover)
alias(libs.plugins.spotless)
id(libs.plugins.kotlinx.serialization.get().pluginId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public inline fun <Error, A, B> EagerEffect<Error, A>.fold(recover: (error: Erro

/**
* The most general way to execute a computation using [Raise].
* Depending on the outcome of the block, one of the two continuations is run:
* Depending on the outcome of the block, one of the two lambdas is run:
* - _success_ [transform] result of [A] to a value of [B].
* - _raised_ [recover] from `raised` value of [Error] to a value of [B].
*
Expand All @@ -116,7 +116,7 @@ public inline fun <Error, A, B> fold(

/**
* The most general way to execute a computation using [Raise].
* Depending on the outcome of the block, one of the three continuations is run:
* Depending on the outcome of the block, one of the three lambdas is run:
* - _success_ [transform] result of [A] to a value of [B].
* - _raised_ [recover] from `raised` value of [Error] to a value of [B].
* - _exception_ [catch] from [Throwable] by transforming value into [B].
Expand Down Expand Up @@ -172,16 +172,16 @@ public inline fun <Error, A, B> fold(
* }
* ```
* ```text
* arrow.core.continuations.RaiseCancellationException: Raised Continuation
* at arrow.core.continuations.DefaultRaise.raise(Fold.kt:77)
* arrow.core.raise.RaiseCancellationException: Raised Continuation
* at arrow.core.raise.DefaultRaise.raise(Fold.kt:77)
* at MainKtKt$main$error$1.invoke(MainKt.kt:6)
* at MainKtKt$main$error$1.invoke(MainKt.kt:6)
* at arrow.core.continuations.Raise$DefaultImpls.bind(Raise.kt:22)
* at arrow.core.continuations.DefaultRaise.bind(Fold.kt:74)
* at arrow.core.continuations.Effect__TracingKt$traced$2.invoke(Traced.kt:46)
* at arrow.core.continuations.Effect__TracingKt$traced$2.invoke(Traced.kt:46)
* at arrow.core.continuations.Effect__FoldKt.fold(Fold.kt:92)
* at arrow.core.continuations.Effect.fold(Unknown Source)
* at arrow.core.raise.Raise$DefaultImpls.bind(Raise.kt:22)
* at arrow.core.raise.DefaultRaise.bind(Fold.kt:74)
* at arrow.core.raise.Effect__TracingKt$traced$2.invoke(Traced.kt:46)
* at arrow.core.raise.Effect__TracingKt$traced$2.invoke(Traced.kt:46)
* at arrow.core.raise.Effect__FoldKt.fold(Fold.kt:92)
* at arrow.core.raise.Effect.fold(Unknown Source)
* at MainKtKt.main(MainKt.kt:8)
* at MainKtKt.main(MainKt.kt)
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class EffectSpec {
}
}

@Test fun issue2779HandleErrorWithDoesNotMakeNestedContinuationsHang() = runTest {
@Test fun issue2779HandleErrorWithDoesNotMakeNestedEffectHang() = runTest {
checkAll(Arb.string()) { error ->
val failed: Effect<String, Int> = effect {
withContext(Dispatchers.Default) {}
Expand All @@ -405,7 +405,7 @@ class EffectSpec {
}
}

@Test fun issue2779BindNestedInFoldDoesNotMakeNestedContinuationsHang() = runTest {
@Test fun issue2779BindNestedInFoldDoesNotMakeNestedEffectHang() = runTest {
checkAll(Arb.string()) { error ->
val failed: Effect<String, Int> = effect {
withContext(Dispatchers.Default) {}
Expand Down
2 changes: 1 addition & 1 deletion arrow-libs/core/arrow-functions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ kotlin {
jvm {
tasks.jvmJar {
manifest {
attributes["Automatic-Module-Name"] = "arrow.continuations"
attributes["Automatic-Module-Name"] = "arrow.functions"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion arrow-libs/fx/arrow-fx-coroutines/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Maven publishing configuration
POM_NAME=Arrow-Fx-Coroutines
POM_NAME=Arrow Fx Coroutines
2 changes: 1 addition & 1 deletion arrow-libs/fx/arrow-fx-stm/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Maven publishing configuration
POM_NAME=Arrow-Fx-STM
POM_NAME=Arrow Fx STM
3 changes: 0 additions & 3 deletions arrow-libs/optics/arrow-optics-ksp-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Maven publishing configuration
POM_NAME=Arrow Optics Compiler KSP Plugin
POM_ARTIFACT_ID=arrow-optics-ksp-plugin
POM_PACKAGING=jar

POM_NAME=Arrow Optics Compiler KSP Plugin
4 changes: 1 addition & 3 deletions arrow-libs/optics/arrow-optics-reflect/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# Maven publishing configuration
POM_NAME=Arrow Optics for Kotlin Reflection
# Build configuration
kapt.incremental.apt=false
POM_NAME=Arrow Optics Kotlin Reflection
2 changes: 1 addition & 1 deletion arrow-libs/resilience/arrow-resilience/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Maven publishing configuration
POM_NAME=Arrow-Fx-Resilience
POM_NAME=Arrow Fx Resilience
8 changes: 3 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Package definitions
projects.group=io.arrow-kt
projects.version=2.0.0-SNAPSHOT

enable_wasm=true
ksp.useKSP2=true

# Pomfile definitions
#RELEASE_SIGNING_ENABLED=true
GROUP=io.arrow-kt
SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true

POM_DESCRIPTION=Functional companion to Kotlin's Standard Library
POM_URL=https://github.com/arrow-kt/arrow/
Expand Down
Loading

0 comments on commit 63b162f

Please sign in to comment.