Skip to content

Commit

Permalink
chore: update after release v1.0.0-Alpha29 📦
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Nov 27, 2024
1 parent 525398c commit 060a4a1
Show file tree
Hide file tree
Showing 12 changed files with 192 additions and 143 deletions.
205 changes: 102 additions & 103 deletions README.md

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions cffu-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@
<artifactId>cffu</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.foldright</groupId>
<artifactId>cffu-kotlin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.foldright</groupId>
<artifactId>cffu-ttl-executor-wrapper</artifactId>
Expand Down
34 changes: 34 additions & 0 deletions cffu-kotlin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 🦝 `Cffu` kotlin support 🍩

<p align="center">
<a href="https://kotlinlang.org"><img src="https://img.shields.io/badge/Kotlin-1.6+-7F52FF.svg?logo=kotlin&logoColor=white" alt="Kotlin"></a>
<a href="https://central.sonatype.com/artifact/io.foldright/cffu-kotlin/0.9.0/versions"><img src="https://img.shields.io/maven-central/v/io.foldright/cffu-kotlin?logo=apache-maven&logoColor=white" alt="Maven Central"></a>
<a href="https://foldright.io/api-docs/cffu-kotlin/"><img src="https://img.shields.io/github/release/foldright/cffu?label=dokka&color=339933&logo=kotlin&logoColor=white" alt="dokka"></a>
</p>

This module provides the extension methods to leverage Kotlin language.

- `Kotlin API` documentation(dokka): https://foldright.io/api-docs/cffu-kotlin/
- `Kotlin extensions`:
- [`CffuExtensions.kt`](src/main/java/io/foldright/cffu/kotlin/CffuExtensions.kt)
- [`CompletableFutureExtensions.kt`](src/main/java/io/foldright/cffu/kotlin/CompletableFutureExtensions.kt)
- Dependency:
- For `Maven` projects:

```xml
<dependency>
<groupId>io.foldright</groupId>
<artifactId>cffu-kotlin</artifactId>
<version>1.0.0-Alpha29</version>
</dependency>
```
- For `Gradle` projects:

```groovy
// Gradle Kotlin DSL
implementation("io.foldright:cffu-kotlin:1.0.0-Alpha29")
```
```groovy
// Gradle Groovy DSL
implementation 'io.foldright:cffu-kotlin:1.0.0-Alpha29'
```
30 changes: 30 additions & 0 deletions cffu-listenable-future/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Guava ListenableFuture Integration with CompletableFuture

<p align="center">
<a href="https://central.sonatype.com/artifact/io.foldright/cffu-listenable-future/0.9.0/versions"><img src="https://img.shields.io/maven-central/v/io.foldright/cffu-listenable-future?logo=apache-maven&logoColor=white" alt="Maven Central"></a>
<a href="https://foldright.io/api-docs/cffu-listenable-future/"><img src="https://img.shields.io/github/release/foldright/cffu?label=dokka&color=339933&logo=kotlin&logoColor=white" alt="dokka"></a>
</p>

- Sources:
- [`ListenableFutureUtils.java`](src/main/java/io/foldright/cffu/lf/ListenableFutureUtils.java)
- [`ListenableFutureExtensions.kt`](src/main/java/io/foldright/cffu/lf/kotlin/ListenableFutureExtensions.kt)
- Dependency:
- For `Maven` projects:

```xml
<dependency>
<groupId>io.foldright</groupId>
<artifactId>cffu-listenable-future</artifactId>
<version>1.0.0-Alpha29</version>
</dependency>
```
- For `Gradle` projects:

```groovy
// Gradle Kotlin DSL
implementation("io.foldright:cffu-listenable-future:1.0.0-Alpha29")
```
```groovy
// Gradle Groovy DSL
implementation 'io.foldright:cffu-listenable-future:1.0.0-Alpha29'
```
2 changes: 1 addition & 1 deletion cffu-listenable-future/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>

<artifactId>cffu-listenable-future</artifactId>
<name>ListenableFuture Integration to CompletableFuture</name>
<name>Guava ListenableFuture Integration with CF</name>
<description>${project.name}</description>
<url>https://github.com/foldright/cffu</url>
<inceptionYear>2023</inceptionYear>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.foldright.lf;
package io.foldright.cffu.lf;

import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.foldright.lf.kotlin
package io.foldright.cffu.lf.kotlin

import com.google.common.util.concurrent.ListenableFuture
import com.google.common.util.concurrent.MoreExecutors
import io.foldright.cffu.Cffu
import io.foldright.cffu.CffuFactory
import io.foldright.lf.ListenableFutureUtils
import io.foldright.cffu.lf.ListenableFutureUtils
import java.util.concurrent.CompletableFuture
import java.util.concurrent.Executor

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.foldright.lf;
package io.foldright.cffu.lf;

import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
Expand All @@ -13,7 +13,7 @@
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicBoolean;

import static io.foldright.lf.ListenableFutureUtils.*;
import static io.foldright.cffu.lf.ListenableFutureUtils.*;
import static io.foldright.test_utils.TestUtils.*;
import static io.foldright.test_utils.TestingConstants.*;
import static io.foldright.test_utils.TestingExecutorUtils.testCffuFac;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.foldright.lf.kotlin
package io.foldright.cffu.lf.kotlin

import com.google.common.util.concurrent.Futures
import io.foldright.cffu.CompletableFutureUtils.failedFuture
import io.foldright.lf.kotlin.toCffu
import io.foldright.lf.kotlin.toCompletableFuture
import io.foldright.lf.kotlin.toListenableFuture
import io.foldright.cffu.lf.kotlin.toCffu
import io.foldright.cffu.lf.kotlin.toCompletableFuture
import io.foldright.cffu.lf.kotlin.toListenableFuture
import io.foldright.test_utils.n
import io.foldright.test_utils.rte
import io.foldright.test_utils.testCffuFac
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.foldright.lf.study
package io.foldright.cffu.lf.study

import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture
Expand Down
6 changes: 3 additions & 3 deletions cffu-ttl-executor-wrapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ For `Maven` projects:
<groupId>io.foldright</groupId>
<artifactId>cffu-ttl-executor-wrapper</artifactId>
<scope>runtime</scope>
<version>1.0.0-Alpha28</version>
<version>1.0.0-Alpha29</version>
</dependency>
```

For `Gradle` projects:

```groovy
// Gradle Kotlin DSL
runtimeOnly("io.foldright:cffu-ttl-executor-wrapper:1.0.0-Alpha28")
runtimeOnly("io.foldright:cffu-ttl-executor-wrapper:1.0.0-Alpha29")
```

```groovy
// Gradle Groovy DSL
runtimeOnly 'io.foldright:cffu-ttl-executor-wrapper:1.0.0-Alpha28'
runtimeOnly 'io.foldright:cffu-ttl-executor-wrapper:1.0.0-Alpha29'
```

`cffu-ttl-executor-wrapper` has published to maven central, find the latest version at
Expand Down
33 changes: 12 additions & 21 deletions scripts/bump_cffu_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,20 @@ set -eEuo pipefail
SELF_PATH=$(realpath -- "$0")
readonly SELF_PATH SELF_DIR=${SELF_PATH%/*}
# cd to script dir
cd "$SELF_DIR"
cd "$SELF_DIR"/..

source "$PWD/bash-buddy/lib/trap_error_info.sh"
source "$PWD/bash-buddy/lib/common_utils.sh"
source "$PWD/bash-buddy/lib/java_utils.sh"
source "$PWD/bash-buddy/lib/maven_utils.sh"

readonly newline=$'\n'
source "$SELF_DIR/bash-buddy/lib/trap_error_info.sh"
source "$SELF_DIR/bash-buddy/lib/common_utils.sh"
source "$SELF_DIR/bash-buddy/lib/java_utils.sh"
source "$SELF_DIR/bash-buddy/lib/maven_utils.sh"

# shellcheck disable=SC2154
[ $# -ne 1 ] && cu::die "need only 1 argument for version!$newline${newline}usage:$newline $0 x.y.z"
readonly new_version="$1"

bump_cffu_version() {
mvu::mvn_cmd \
org.codehaus.mojo:versions-maven-plugin:2.15.0:set \
-DgenerateBackupPoms=false \
-DprocessAllModules=true \
-DnewVersion="$new_version"
}
[ $# -ne 2 ] && cu::die "need only 2 argument for old and new versions!"

cd ..
bump_cffu_version
readonly old_version="$1"
readonly new_version="$2"

cd demos
bump_cffu_version
# shellcheck disable=SC2046
sed -i "s/1.0.0-Alpha29/$new_version/g" $(rg 1.0.0-Alpha29 -l)
# shellcheck disable=SC2046
sed -i "s/$old_version/$new_version/g" $(rg "$old_version" -l)

0 comments on commit 060a4a1

Please sign in to comment.