Skip to content

Commit 12d8c25

Browse files
committed
refactor: split cffu-utils and cffu-kotlin modules from cffu-core 📐
1 parent 16511e8 commit 12d8c25

36 files changed

+638
-380
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
JAVA21_HOME: ${{ env.JAVA_HOME_21_X64 }}
5959

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

6363
- name: Upload coverage reports to Codecov
6464
uses: codecov/codecov-action@v3

.github/workflows/fast_ci.yaml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://docs.github.com/en/actions/quickstart
33

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

21-
- name: setup Java 8
22-
uses: actions/setup-java@v3
23-
with:
24-
java-version: 8
25-
distribution: zulu
26-
# only first java setup need enable cache
27-
cache: maven
2821
- name: setup Java 19
2922
uses: actions/setup-java@v3
3023
with:
3124
java-version: 19
3225
distribution: temurin
33-
26+
# only first java setup need enable cache
27+
cache: maven
3428
- name: build and test with Java 19
35-
run: ./mvnw -V --no-transfer-progress clean package
29+
run: ./mvnw -V --no-transfer-progress clean install
30+
31+
- name: setup Java 8
32+
uses: actions/setup-java@v3
33+
with:
34+
java-version: 8
35+
distribution: zulu
3636
- name: test with Java 8
37-
run: ../mvnw -V --no-transfer-progress surefire:test
38-
working-directory: cffu-core
39-
env:
40-
JAVA_HOME: ${{ env.JAVA_HOME_8_X64 }}
37+
run: ./mvnw -V --no-transfer-progress surefire:test
38+
39+
- name: 'remove self maven install files(OS: *nix)'
40+
run: rm -rf $HOME/.m2/repository/io/foldright/cffu*
41+
# https://docs.github.com/en/actions/learn-github-actions/expressions
42+
# https://docs.github.com/en/actions/learn-github-actions/variables#detecting-the-operating-system
43+
if: runner.os != 'Windows'
44+
- name: 'remove self maven install files(OS: Windows)'
45+
run: Remove-Item -Recurse -Force $home/.m2/repository/io/foldright/cffu*
46+
if: runner.os == 'Windows'

cffu-core/pom.xml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<artifactId>cffu</artifactId>
1212
<name>CompletableFuture-Fu(cffu)</name>
1313
<description>
14-
🦝 A tiny 0-dependency sidekick library for CompletableFuture to improve user experience and reduce misuse.
14+
🦝 A tiny sidekick library for CompletableFuture to improve user experience and reduce misuse.
1515
</description>
1616
<url>https://github.com/foldright/cffu</url>
1717
<inceptionYear>2023</inceptionYear>
@@ -54,11 +54,25 @@
5454

5555
<dependencies>
5656
<dependency>
57-
<groupId>org.jetbrains.kotlin</groupId>
58-
<artifactId>kotlin-stdlib-jdk8</artifactId>
59-
<optional>true</optional>
57+
<groupId>io.foldright</groupId>
58+
<artifactId>cffu-utils</artifactId>
59+
<version>${project.version}</version>
6060
</dependency>
61+
6162
<!-- testing libs -->
63+
<dependency>
64+
<groupId>io.foldright</groupId>
65+
<artifactId>cffu-utils</artifactId>
66+
<version>${project.version}</version>
67+
<!--
68+
Guide to using attached tests
69+
reuse the tests that you have created for one project in another
70+
https://maven.apache.org/guides/mini/guide-attached-tests.html
71+
-->
72+
<classifier>tests</classifier>
73+
<type>test-jar</type>
74+
<scope>test</scope>
75+
</dependency>
6276
<dependency>
6377
<groupId>org.apache.commons</groupId>
6478
<artifactId>commons-lang3</artifactId>

cffu-core/src/main/java/io/foldright/cffu/package-info.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
2-
* A tiny 0-dependency sidekick library for CompletableFuture
3-
* to improve user experience and reduce misuse.
2+
* A tiny sidekick library for CompletableFuture to improve user experience and reduce misuse.
43
* <p>
5-
* the core class is {@link io.foldright.cffu.Cffu}.
4+
* The core class is {@link io.foldright.cffu.Cffu}.
65
*
76
* @see io.foldright.cffu.Cffu
87
* @see io.foldright.cffu.CffuFactory
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<html lang="en">
22
<body>
33
<p>This is the API documentation for the
4-
<a href="https://github.com/foldright/cffu" target="_blank">
5-
🦝 Java CompletableFuture Fu(aka. <dfn>CF-Fu</dfn>, pronounced "Shifu")</a>,
6-
a tiny 0-dependency sidekick library for
7-
<a href="https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/concurrent/CompletableFuture.html"><code>CompletableFuture</code></a>
8-
to improve user experience and reduce misuse.
4+
<a href="https://github.com/foldright/cffu" target="_blank">
5+
🦝 Java CompletableFuture Fu(aka. <dfn>CF-Fu</dfn>, pronounced "Shifu")</a>,
6+
a tiny sidekick library for
7+
<a href="https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/concurrent/CompletableFuture.html"><code>CompletableFuture</code></a>
8+
to improve user experience and reduce misuse.
99
<p>The <a href="https://github.com/foldright/cffu" target="_blank"><dfn>CF-Fu</dfn> GitHub repo</a>
10-
also include the best practice/traps guide 📚 for <code>CompletableFuture</code> 💗.
10+
also include the best practice/traps guide 📚 for <code>CompletableFuture</code> 💗.
1111
</body>
1212
</html>

0 commit comments

Comments
 (0)