Skip to content

Commit

Permalink
refactor: split cffu-utils and cffu-kotlin modules from `cffu-cor…
Browse files Browse the repository at this point in the history
…e` 📐
  • Loading branch information
oldratlee committed May 15, 2023
1 parent 16511e8 commit 12d8c25
Show file tree
Hide file tree
Showing 36 changed files with 638 additions and 380 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
JAVA21_HOME: ${{ env.JAVA_HOME_21_X64 }}

- name: remove self maven install files
run: rm -rf $HOME/.m2/repository/io/foldright/cffu/
run: rm -rf $HOME/.m2/repository/io/foldright/cffu*

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand Down
34 changes: 20 additions & 14 deletions .github/workflows/fast_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://docs.github.com/en/actions/quickstart

name: Fast CI
on: [push, pull_request, workflow_dispatch]
on: [ push, pull_request, workflow_dispatch ]
jobs:
test:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners
Expand All @@ -18,23 +18,29 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: setup Java 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: zulu
# only first java setup need enable cache
cache: maven
- name: setup Java 19
uses: actions/setup-java@v3
with:
java-version: 19
distribution: temurin

# only first java setup need enable cache
cache: maven
- name: build and test with Java 19
run: ./mvnw -V --no-transfer-progress clean package
run: ./mvnw -V --no-transfer-progress clean install

- name: setup Java 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: zulu
- name: test with Java 8
run: ../mvnw -V --no-transfer-progress surefire:test
working-directory: cffu-core
env:
JAVA_HOME: ${{ env.JAVA_HOME_8_X64 }}
run: ./mvnw -V --no-transfer-progress surefire:test

- name: 'remove self maven install files(OS: *nix)'
run: rm -rf $HOME/.m2/repository/io/foldright/cffu*
# https://docs.github.com/en/actions/learn-github-actions/expressions
# https://docs.github.com/en/actions/learn-github-actions/variables#detecting-the-operating-system
if: runner.os != 'Windows'
- name: 'remove self maven install files(OS: Windows)'
run: Remove-Item -Recurse -Force $home/.m2/repository/io/foldright/cffu*
if: runner.os == 'Windows'
22 changes: 18 additions & 4 deletions cffu-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<artifactId>cffu</artifactId>
<name>CompletableFuture-Fu(cffu)</name>
<description>
🦝 A tiny 0-dependency sidekick library for CompletableFuture to improve user experience and reduce misuse.
🦝 A tiny sidekick library for CompletableFuture to improve user experience and reduce misuse.
</description>
<url>https://github.com/foldright/cffu</url>
<inceptionYear>2023</inceptionYear>
Expand Down Expand Up @@ -54,11 +54,25 @@

<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<optional>true</optional>
<groupId>io.foldright</groupId>
<artifactId>cffu-utils</artifactId>
<version>${project.version}</version>
</dependency>

<!-- testing libs -->
<dependency>
<groupId>io.foldright</groupId>
<artifactId>cffu-utils</artifactId>
<version>${project.version}</version>
<!--
Guide to using attached tests
reuse the tests that you have created for one project in another
https://maven.apache.org/guides/mini/guide-attached-tests.html
-->
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions cffu-core/src/main/java/io/foldright/cffu/package-info.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* A tiny 0-dependency sidekick library for CompletableFuture
* to improve user experience and reduce misuse.
* A tiny sidekick library for CompletableFuture to improve user experience and reduce misuse.
* <p>
* the core class is {@link io.foldright.cffu.Cffu}.
* The core class is {@link io.foldright.cffu.Cffu}.
*
* @see io.foldright.cffu.Cffu
* @see io.foldright.cffu.CffuFactory
Expand Down
12 changes: 6 additions & 6 deletions cffu-core/src/main/javadoc/overview.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<html lang="en">
<body>
<p>This is the API documentation for the
<a href="https://github.com/foldright/cffu" target="_blank">
🦝 Java CompletableFuture Fu(aka. <dfn>CF-Fu</dfn>, pronounced "Shifu")</a>,
a tiny 0-dependency sidekick library for
<a href="https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/concurrent/CompletableFuture.html"><code>CompletableFuture</code></a>
to improve user experience and reduce misuse.
<a href="https://github.com/foldright/cffu" target="_blank">
🦝 Java CompletableFuture Fu(aka. <dfn>CF-Fu</dfn>, pronounced "Shifu")</a>,
a tiny sidekick library for
<a href="https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/concurrent/CompletableFuture.html"><code>CompletableFuture</code></a>
to improve user experience and reduce misuse.
<p>The <a href="https://github.com/foldright/cffu" target="_blank"><dfn>CF-Fu</dfn> GitHub repo</a>
also include the best practice/traps guide 📚 for <code>CompletableFuture</code> 💗.
also include the best practice/traps guide 📚 for <code>CompletableFuture</code> 💗.
</body>
</html>
Loading

0 comments on commit 12d8c25

Please sign in to comment.