diff --git a/build.gradle b/build.gradle
index b386b5d3..c070903d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -18,6 +18,11 @@ buildscript {
dependencies {
classpath "com.ofg:uptodate-gradle-plugin:$uptodateVersion"
}
+
+ wrapper {
+ gradleVersion = "4.10.2"
+ distributionType = Wrapper.DistributionType.ALL
+ }
}
if (JavaVersion.current().isJava8Compatible()) {
@@ -111,23 +116,10 @@ subprojects {
}
}
- jacocoTestReport {
- additionalSourceDirs = files(sourceSets.main.allSource.srcDirs)
- sourceDirectories = files(sourceSets.main.allSource.srcDirs)
- classDirectories = files(sourceSets.main.output)
- reports {
- html.enabled = true
- xml.enabled = true
- csv.enabled = false
- }
- }
-
- task coverage(dependsOn: ["test", "jacocoTestReport"]) << {}
-
}
task coverage(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
- dependsOn = subprojects.coverage
+ dependsOn = subprojects*.test
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
// We only care about coverage of:
def projectForFoverage = ["core", "quickcheck", "java-core"]
@@ -148,6 +140,10 @@ configure(subprojects.findAll { it.name != "props-core" }) {
sourceCompatibility = "1.8"
+ javadoc {
+ options.addBooleanOption('html5', true)
+ }
+
task javadocJar(type: Jar, dependsOn: "javadoc") {
classifier = 'javadoc'
from "build/docs/javadoc"
@@ -186,7 +182,7 @@ configure(subprojects.findAll { it.name != "props-core" }) {
}
// Output MANIFEST.MF statically so eclipse can see it for plugin development
- task eclipsePluginManifest(dependsOn: jar) << {
+ task eclipsePluginManifest(dependsOn: jar) doLast {
file("META-INF").mkdirs()
jar.manifest.writeTo(file("META-INF/MANIFEST.MF"))
}
@@ -194,6 +190,6 @@ configure(subprojects.findAll { it.name != "props-core" }) {
eclipseProject.dependsOn eclipsePluginManifest
}
-task env << {
+task env doLast {
println System.getenv()
}
diff --git a/core/src/main/java/fj/Function.java b/core/src/main/java/fj/Function.java
index f95b1c87..995c179d 100644
--- a/core/src/main/java/fj/Function.java
+++ b/core/src/main/java/fj/Function.java
@@ -778,11 +778,11 @@ public static F join(final F> f) {
/**
* Partial application of the second argument to the supplied function to get a function of type
- * A -> C. Same as flip(f).f(b).
+ * {@code A -> C}. Same as {@code flip(f).f(b)}.
*
* @param f The function to partially apply.
* @param b The value to apply to the function.
- * @return A new function based on f with its second argument applied.
+ * @return A new function based on {@code f} with its second argument applied.
*/
public static F partialApply2(final F> f, final B b) {
return a -> uncurryF2(f).f(a, b);
@@ -790,11 +790,11 @@ public static F partialApply2(final F> f, final B b)
/**
* Partial application of the third argument to the supplied function to get a function of type
- * A -> B -> D.
+ * {@code A -> B -> D}.
*
* @param f The function to partially apply.
* @param c The value to apply to the function.
- * @return A new function based on f with its third argument applied.
+ * @return A new function based on {@code f} with its third argument applied.
*/
public static F> partialApply3(final F>> f, final C c) {
return a -> b -> uncurryF3(f).f(a, b, c);
@@ -802,11 +802,11 @@ public static F> partialApply3(final F>>
/**
* Partial application of the fourth argument to the supplied function to get a function of type
- * A -> B -> C -> E.
+ * {@code A -> B -> C -> E}.
*
* @param f The function to partially apply.
* @param d The value to apply to the function.
- * @return A new function based on f with its fourth argument applied.
+ * @return A new function based on {@code f} with its fourth argument applied.
*/
public static F>> partialApply4(final F>>> f, final D d) {
return a -> b -> c -> uncurryF4(f).f(a, b, c, d);
@@ -814,11 +814,11 @@ public static F>> partialApply4(final FA -> B -> C -> D -> F$.
+ * {@code A -> B -> C -> D -> F$}.
*
* @param f The function to partially apply.
* @param e The value to apply to the function.
- * @return A new function based on f with its fifth argument applied.
+ * @return A new function based on {@code f} with its fifth argument applied.
*/
public static F>>> partialApply5(final F>>>> f,
final E e) {
@@ -827,11 +827,11 @@ public static F>> partialApply4(final FA -> B -> C -> D -> E -> G.
+ * {@code A -> B -> C -> D -> E -> G}.
*
* @param f The function to partially apply.
* @param f$ The value to apply to the function.
- * @return A new function based on f with its sixth argument applied.
+ * @return A new function based on {@code f} with its sixth argument applied.
*/
public static F>>>> partialApply6(
final F>>>>> f, final F$ f$) {
@@ -840,11 +840,11 @@ public static F>> partialApply4(final FA -> B -> C -> D -> E -> F$ -> H.
+ * {@code A -> B -> C -> D -> E -> F$ -> H}.
*
* @param f The function to partially apply.
* @param g The value to apply to the function.
- * @return A new function based on f with its seventh argument applied.
+ * @return A new function based on {@code f} with its seventh argument applied.
*/
public static F>>>>> partialApply7(
final F>>>>>> f, final G g) {
@@ -853,11 +853,11 @@ public static F>> partialApply4(final FA -> B -> C -> D -> E -> F$ -> G -> I.
+ * {@code A -> B -> C -> D -> E -> F$ -> G -> I}.
*
* @param f The function to partially apply.
* @param h The value to apply to the function.
- * @return A new function based on f with its eigth argument applied.
+ * @return A new function based on {@code f} with its eigth argument applied.
*/
public static F>>>>>> partialApply8(
final F>>>>>>> f, final H h) {
diff --git a/core/src/main/java/fj/Monoid.java b/core/src/main/java/fj/Monoid.java
index cdb8e746..0c09b558 100644
--- a/core/src/main/java/fj/Monoid.java
+++ b/core/src/main/java/fj/Monoid.java
@@ -246,7 +246,7 @@ public A zero() {
/**
* Returns a value summed n times (a + a + ... + a).
* The default definition uses peasant multiplication, exploiting
- * associativity to only require `O(log n)` uses of
+ * associativity to only require {@code O(log n)} uses of
* {@link #sum(Object, Object)}.
*
* @param n multiplier
diff --git a/core/src/main/java/fj/P1.java b/core/src/main/java/fj/P1.java
index 555a28ae..5e627403 100644
--- a/core/src/main/java/fj/P1.java
+++ b/core/src/main/java/fj/P1.java
@@ -42,10 +42,11 @@ public static Fn + 1 times (
* a + a + ... + a) The default definition uses peasant
- * multiplication, exploiting associativity to only require `O(log n)` uses of
+ * multiplication, exploiting associativity to only require {@code O(log n)} uses of
* {@link #sum(Object, Object)}.
*
* @param n multiplier
@@ -527,8 +527,9 @@ public NonEmptyList sum(NonEmptyList nea, F0
A user typically creates an {@link
* Arbitrary arbitrary} to return a generator using the 'combinator methods' below. For example,
* suppose a class Person:
-
+{@code
class Person {
final int age;
final String name;
@@ -45,23 +45,23 @@ class Person {
this.male = male;
}
}
-
+}
* In a case like this one, a user may create a generator over Person by
* invoking the {@link #bind(F)} methods — in this case, {@link #bind(Gen , Gen , F)} the one
* that takes two generator arguments}, since the class has one more than two fields (the bind
* method is invoked on a generator adding the extra one to the count as they are composed). The
* class fields are of types for which there exist generators (on {@link Gen} so those can be
* used to compose a generator for Person:
+{@code
static Gen<Person> personArbitrary() {
return arbInteger.bind(arbString(), arbBoolean(),
// compose the generators
{int age => {String name => {boolean male => new Person(age, name, male)}}};
}
-
+}
*
* The example above uses Java 7 closure syntax. Here is the same example using objects instead:
-
+{@code
static Gen<Person> personArbitrary() {
return arbInteger.bind(arbString, arbBoolean,
// compose the generators
@@ -79,7 +79,7 @@ public Person f(final Boolean male) {
}
});
}
-
+}
*
* @version %build.number%
*/