Skip to content

Commit 50d8e9d

Browse files
committed
Merged from series/5.x
2 parents f794623 + 4671564 commit 50d8e9d

36 files changed

Lines changed: 207 additions & 158 deletions

.travis.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,25 @@ language: java
66
jdk:
77
- openjdk11
88

9-
script:
10-
- ./gradlew clean build
11-
12-
after_success:
13-
- bash <(curl -s https://codecov.io/bash)
14-
- '[ "$TRAVIS_BRANCH" = "series/6.x" -a "$TRAVIS_PULL_REQUEST" = "false" -a -z "$TRAVIS_TAG" ]
15-
&& ./gradlew uploadArchives'
16-
179
matrix:
1810
fast_finish: true
1911

2012
include:
2113

2214
allow_failures:
2315

16+
script:
17+
- ./gradlew build --no-daemon
2418

2519
env:
2620
global:
2721
- secure: Bun+1FZ29Q3dR9gZ/5brxcSf+zcY5tWrsqOA4GUb5bYCMyORuXQB0FYXuhKR4wB1pFrk1a9EYwRwSu3GwRJVWb+UzF0CNOWF/QG5tGPx32IOXScwlL/KonI4Vhs7Oc0fF4Wdb7euNrT27BU61jbUugjJ642b3n0VBYFYDdquprU=
2822
- secure: QAxhjqLRa+WHKIzgIJPZ/rM5a5uzqG7E5rsC0YvB25cO712oYXmzsYPia/oSp0chXlYLYMfk2UnLeQCSx2e6ogXRRRa977Q+B33Nt0Hd9SGLtduv6DBrbA2ehLU12Ib4DWe5VhF5eueAunycYcllTvqA5h+pzTtEVbd68ZHncM4=
2923

24+
before_cache:
25+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
26+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
27+
3028
cache:
3129
directories:
3230
- $HOME/.gradle/caches/

README.adoc

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ image::http://www.functionaljava.org/img/logo-600x144.png[]
88

99
Functional Java is an open source library facilitating functional programming in Java. The library implements numerous basic and advanced programming abstractions that assist composition oriented development. Functional Java also serves as a platform for learning functional programming concepts by introducing these concepts using a familiar language.
1010

11-
The library is intended for use in production applications and is thoroughly tested using the technique of automated specification-based testing with ScalaCheck and Functional Java's quickcheck module. Functional Java is compiled with Java 8 targeting Java 7 bytecode. The use of lambdas within the project are back ported with the Retro Lambda library, supporting Java versions 6 to 8.
11+
The library is intended for use in production applications and is thoroughly tested using the technique of automated specification-based testing with ScalaCheck and Functional Java's quickcheck module.
1212

1313
Functional Java provides abstractions for the following types:
1414

@@ -32,51 +32,36 @@ The recommended way to download and use the project is through your build tool.
3232

3333
The Functional Java artifact is published to Maven Central using the group `org.functionaljava` with three published artifacts:
3434

35-
* the core library (`functionaljava` or `functionaljava_1.8` if you use Java 8+)
36-
* Java 8 specific support (`functionaljava-java8`)
37-
* property based testing (`functionaljava-quickcheck` or `functionaljava-quickcheck_1.8` if you use Java 8+)
35+
* the core library (`functionaljava`)
36+
* property based testing (`functionaljava-quickcheck`)
3837

39-
The latest stable version is `4.9`. This can be added to your Gradle project by adding the dependencies:
38+
The latest stable version is `5.0`. This can be added to your Gradle project by adding the dependencies:
4039
----
41-
compile "org.functionaljava:functionaljava:4.9"
42-
compile "org.functionaljava:functionaljava-java8:4.9"
43-
compile "org.functionaljava:functionaljava-quickcheck:4.9"
44-
compile "org.functionaljava:functionaljava-java-core:4.9"
40+
compile "org.functionaljava:functionaljava:5.0"
41+
compile "org.functionaljava:functionaljava-quickcheck:5.0"
4542
----
4643

4744
and in Maven:
4845
----
4946
<dependency>
5047
<groupId>org.functionaljava</groupId>
5148
<artifactId>functionaljava</artifactId>
52-
<version>4.9</version>
53-
</dependency>
54-
<dependency>
55-
<groupId>org.functionaljava</groupId>
56-
<artifactId>functionaljava-java8</artifactId>
57-
<version>4.9</version>
49+
<version>5.0</version>
5850
</dependency>
5951
<dependency>
6052
<groupId>org.functionaljava</groupId>
6153
<artifactId>functionaljava-quickcheck</artifactId>
62-
<version>4.9</version>
63-
</dependency>
64-
<dependency>
65-
<groupId>org.functionaljava</groupId>
66-
<artifactId>functionaljava-java-core</artifactId>
67-
<version>4.9</version>
54+
<version>5.0</version>
6855
</dependency>
6956
----
7057

7158
== Building
7259

73-
FunctionalJava uses the Retro Lambda project to backport Java 8 lambdas to Java 6 bytecode. This requires access to both JDK 6 and 8. The build system requires the environment variables `JAVA6_HOME` and `JAVA8_HOME` to refer to the appropriate directories.
74-
75-
Building is done using Gradle 6.8.3. In the root directory run:
60+
Building is done using Gradle 7.4. In the root directory run:
7661
----
7762
./gradlew
7863
----
79-
This requires access to Java and will download the Gradle build tool and necessary dependencies and build FunctionalJava.
64+
This requires access to Java 8 and will download the Gradle build tool and necessary dependencies and build FunctionalJava.
8065

8166
== Features
8267

@@ -126,4 +111,4 @@ link:etc/LICENCE[The Functional Java license] uses the BSD 3 license (3-clause l
126111

127112
== Release Notes
128113

129-
For release notes for each version, see the directory etc/release-notes.
114+
For release notes for each version, see the directory etc/release-notes.

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ apply plugin: "com.github.ben-manes.versions"
66
buildscript {
77
repositories {
88
mavenLocal()
9-
jcenter()
109
mavenCentral()
10+
gradlePluginPortal()
1111
}
1212

1313
dependencies {
14-
classpath "com.github.ben-manes:gradle-versions-plugin:0.36.0"
14+
classpath "com.github.ben-manes:gradle-versions-plugin:0.42.0"
1515
classpath "biz.aQute.bnd:biz.aQute.bnd.gradle:6.1.0"
1616
}
1717

1818
wrapper {
19-
gradleVersion = "6.8.3"
19+
gradleVersion = "7.4"
2020
distributionType = Wrapper.DistributionType.ALL
2121
}
2222
}
@@ -35,7 +35,7 @@ allprojects {
3535
apply plugin: "jacoco"
3636

3737
jacoco {
38-
toolVersion = "0.8.2"
38+
toolVersion = "0.8.7"
3939
}
4040

4141
defaultTasks "build"
@@ -46,9 +46,10 @@ allprojects {
4646

4747
snapshotAppendix = "-SNAPSHOT"
4848
fjVersion = fjBaseVersion + (isSnapshot ? snapshotAppendix : "")
49-
fjConsumeVersion = "4.9"
49+
fjConsumeVersion = "5.0"
5050

5151
signModule = false
52+
uploadModule = false
5253

5354
projectTitle = "Functional Java"
5455
projectName = "functionaljava"
@@ -82,9 +83,8 @@ allprojects {
8283
}
8384

8485
repositories {
85-
jcenter()
86-
mavenCentral()
8786
mavenLocal()
87+
mavenCentral()
8888
}
8989

9090
version = fjVersion
@@ -97,6 +97,7 @@ subprojects {
9797

9898
buildscript {
9999
repositories {
100+
mavenLocal()
100101
mavenCentral()
101102
}
102103
}
@@ -107,7 +108,6 @@ subprojects {
107108

108109
repositories {
109110
mavenLocal()
110-
jcenter()
111111
mavenCentral()
112112
maven {
113113
url sonatypeRepositoryUrl
@@ -123,8 +123,8 @@ subprojects {
123123
tasks.withType(Test).configureEach {
124124
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
125125
if (!generateTestReports) {
126-
reports.html.enabled = false
127-
reports.junitXml.enabled = false
126+
reports.html.required = false
127+
reports.junitXml.required = false
128128
}
129129
}
130130

@@ -140,8 +140,8 @@ task coverage(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
140140
getSourceDirectories().from(files(subprojects.findAll {subproject -> subproject.name in projectForFoverage} .sourceSets.main.allSource.srcDirs))
141141

142142
reports {
143-
html.enabled = true
144-
xml.enabled = true
143+
html.required = true
144+
xml.required = true
145145
}
146146
}
147147

core/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
ext {
33
signModule = true
4+
uploadModule = true
5+
46
}
57

68
archivesBaseName = project.projectName
@@ -13,6 +15,4 @@ dependencies {
1315
}
1416

1517
performSigning(signingEnabled, signModule)
16-
configureUpload(signingEnabled, signModule)
17-
18-
uploadArchives.enabled = true
18+
configureUpload(signingEnabled, signModule, uploadModule)

core/src/main/java/fj/function/Strings.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,8 @@ public static F<List<String>, String> unlines() {
9696
return Strings::unlines;
9797
}
9898

99+
public static F<String, String> reverse() {
100+
return s -> new StringBuilder(s).reverse().toString();
101+
}
102+
99103
}

core/src/test/java/fj/FFunctionsTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import fj.data.TreeZipper;
55
import org.junit.Test;
66
import static org.hamcrest.core.Is.is;
7-
import static org.junit.Assert.*;
87
import static org.hamcrest.MatcherAssert.assertThat;
98

109
public class FFunctionsTest {

core/src/test/java/fj/MonoidTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import static org.hamcrest.core.Is.is;
1111
import static org.hamcrest.MatcherAssert.assertThat;
1212

13-
1413
public class MonoidTest {
1514

1615
@Test

core/src/test/java/fj/OrderingTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
import static fj.Ordering.GT;
99
import static fj.Ordering.LT;
1010
import static org.hamcrest.core.Is.is;
11-
import static org.junit.Assert.*;
1211
import static org.hamcrest.MatcherAssert.assertThat;
1312

14-
1513
public class OrderingTest {
1614

1715
@Test

core/src/test/java/fj/PTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import static org.hamcrest.core.Is.is;
77
import static org.hamcrest.MatcherAssert.assertThat;
88

9-
109
public class PTest {
1110
@Test
1211
public void testPF(){

core/src/test/java/fj/data/IOFunctionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import static fj.data.Stream.cons;
1313
import static fj.data.Stream.nil_;
1414
import static org.hamcrest.CoreMatchers.is;
15-
import static org.junit.Assert.*;
1615
import static org.hamcrest.MatcherAssert.assertThat;
16+
import static org.junit.Assert.fail;
1717

1818
public class IOFunctionsTest {
1919

0 commit comments

Comments
 (0)