diff --git a/build.gradle b/build.gradle index 70e3e1ea8b..767db79ab1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,20 +1,16 @@ -buildscript { - repositories { - jcenter() - } - - dependencies { - classpath 'com.bmuschko:gradle-nexus-plugin:2.2' - } -} - plugins { - id 'me.champeau.gradle.jmh' version '0.2.0' + id "me.champeau.jmh" version "0.6.5" + id 'maven-publish' + id 'signing' +} +repositories { + mavenCentral() } -def custom = { "$rootDir/gradle/${it}.gradle" } //find custom plugins locally - - +dependencies { + jmh 'org.openjdk.jmh:jmh-core:1.29' + jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.28' +} jar { manifest { @@ -23,28 +19,127 @@ jar { } + subprojects { + apply plugin: 'me.champeau.jmh' + apply plugin: 'java-library' + apply plugin: 'maven-publish' + apply plugin: 'signing' + + group 'com.oath.cyclops' +// sourceCompatibility = 1.8 +// targetCompatibility = 1.8 - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } + java { + withJavadocJar() + withSourcesJar() + + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 + } + /** + signing { + sign publishing.publications.mavenJava } - } -} + **/ + if (JavaVersion.current().isJava8Compatible()) { + allprojects { + tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') + } + } + } + javadoc { + if(JavaVersion.current().isJava9Compatible()) { + options.addBooleanOption('html5', true) + } + } + artifacts { + archives javadocJar, sourcesJar + } + signing { + sign configurations.archives + } + dependencies { + compileOnly "org.projectlombok:lombok:${lombokVersion}" + annotationProcessor "org.projectlombok:lombok:${lombokVersion}" -task wrapper(type: Wrapper) { - gradleVersion = '2.14.1' -} + // Test Dependencies + testCompileOnly "org.projectlombok:lombok:${lombokVersion}" + testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}" + } + publishing { + publications { + mavenJava(MavenPublication) { + from components.java + version "$version" + pom { + name = POM_NAME + packaging = POM_PACKAGING + description = POM_DESCRIPTION + url = POM_URL + scm { + url = 'scm:git@github.com:aol/cyclops-react.git' + connection = 'scm:git@github.com:aol/cyclops-react.git' + developerConnection = 'scm:git@github.com:aol/simple-react.git' + } + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution = 'repo' + } + } + + + developers { + developer { + id = 'johnmcclean-aol' + name = 'John McClean' + email = 'john.mcclean@teamaol.com' + } + developer { + id = 'kewangie' + name = 'Ke Wang' + email = 'ke.wang@teamaol.com' + } + + developer { + id = 'tkountis' + name = 'Thomas Kountis Wang' + email = 'thomas.kountis@adtech.com' + } + developer { + id = 'colinfkennedy' + name = 'Colin Kennedy' + email = 'Colin.Kennedy@teamaol.com' + } + } + } + } + } + repositories { + mavenLocal() + maven { + url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' + credentials { + username = nexusUsername + password = nexusPassword + } + } + } + + } +} +/** allprojects { - tasks.withType(JavaCompile).configureEach { + tasks.withType(JavaCompile) { options.fork = true options.incremental = true } } + + **/ diff --git a/cyclops-anym/build.gradle b/cyclops-anym/build.gradle index e662d579cd..420c033646 100644 --- a/cyclops-anym/build.gradle +++ b/cyclops-anym/build.gradle @@ -12,7 +12,7 @@ buildscript { apply plugin: 'java' apply plugin: 'maven-publish' -apply plugin: 'com.bmuschko.nexus' + sourceCompatibility = 1.8 jar { @@ -25,26 +25,20 @@ repositories { mavenCentral() jcenter() } -configurations { - provided -} + dependencies { - compile project(':cyclops') - compile project(':cyclops-futurestream') - compile project(':cyclops-reactive-collections') - compile project(':cyclops-pure') - provided 'org.projectlombok:lombok:1.16.20' - testCompile project(':cyclops').sourceSets.test.output - testCompile 'io.projectreactor:reactor-core:3.0.7.RELEASE' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile 'org.hamcrest:hamcrest-all:1.3' - testCompile 'com.github.stefanbirkner:system-rules:1.10.0' -} -sourceSets { - main.compileClasspath += [configurations.provided] - test.compileClasspath += [configurations.provided] - test.runtimeClasspath += [configurations.provided] + api project(':cyclops') + api project(':cyclops-futurestream') + api project(':cyclops-reactive-collections') + api project(':cyclops-pure') + compileOnly 'org.projectlombok:lombok:1.16.20' + testImplementation project(':cyclops').sourceSets.test.output + testImplementation 'io.projectreactor:reactor-core:3.0.7.RELEASE' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation 'org.hamcrest:hamcrest-all:1.3' + testImplementation 'com.github.stefanbirkner:system-rules:1.10.0' } + task packageTests(type: Jar) { from sourceSets.test.output classifier = 'tests' @@ -59,66 +53,5 @@ test { artifacts.archives packageTests -modifyPom { - project { - name 'cyclops-anym' - description 'A higher kinded monad abstraction for Java' - url 'https://github.com/aol/cyclops-react' - inceptionYear '2015' - - groupId 'com.oath.cyclops' - artifactId 'cyclops-anym' - version "$version" - - scm { - url 'scm:git@github.com:aol/cyclops-react.git' - connection 'scm:git@github.com:aol/cyclops-react.git' - developerConnection 'scm:git@github.com:aol/simple-react.git' - } - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'johnmcclean' - name 'John McClean' - email 'john.mcclean@oath.com' - } - developer { - id 'kewangie' - name 'Ke Wang' - email 'ke.wang@teamaol.com' - } - developer { - id 'tkountis' - name 'Thomas Kountis Wang' - email 'thomas.kountis@adtech.com' - } - developer { - id 'colinfkennedy' - name 'Colin Kennedy' - email 'Colin.Kennedy@teamaol.com' - } - } - } -} - -extraArchive { - sources = true - tests = true - javadoc = true -} - -nexus { - sign = true - repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' - snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots' -} diff --git a/cyclops-anym/gradle.properties b/cyclops-anym/gradle.properties new file mode 100644 index 0000000000..1c6d40fb76 --- /dev/null +++ b/cyclops-anym/gradle.properties @@ -0,0 +1 @@ +POM_NAME=cyclops-anym diff --git a/cyclops-futurestream/build.gradle b/cyclops-futurestream/build.gradle index 28af2a6aa5..a7a77fd0a5 100644 --- a/cyclops-futurestream/build.gradle +++ b/cyclops-futurestream/build.gradle @@ -11,7 +11,7 @@ buildscript { apply plugin: 'java' apply plugin: 'maven-publish' -apply plugin: 'com.bmuschko.nexus' + sourceCompatibility = 1.8 jar { @@ -29,28 +29,24 @@ configurations { } dependencies { - compile project(':cyclops') - compile project(':cyclops-reactive-collections') + api project(':cyclops') + api project(':cyclops-reactive-collections') - provided 'org.projectlombok:lombok:1.16.20' - testCompile project(':cyclops').sourceSets.test.output - testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0' - testCompile 'org.mockito:mockito-core:1.9.5' - testCompile 'io.projectreactor:reactor-core:3.0.7.RELEASE' - testCompile 'org.hamcrest:hamcrest-all:1.3' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile 'org.testng:testng:5.14.10' - testCompile 'com.github.stefanbirkner:system-rules:1.10.0' - testCompile 'io.vertx:vertx-core:3.0.0' - testCompile(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final') - testCompile (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final') -} -sourceSets { - main.compileClasspath += [configurations.provided] - test.compileClasspath += [configurations.provided] - test.runtimeClasspath += [configurations.provided] + compileOnly 'org.projectlombok:lombok:1.16.20' + testImplementation project(':cyclops').sourceSets.test.output + testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.0' + testImplementation 'org.mockito:mockito-core:1.9.5' + testImplementation 'io.projectreactor:reactor-core:3.0.7.RELEASE' + testImplementation 'org.hamcrest:hamcrest-all:1.3' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation 'org.testng:testng:5.14.10' + testImplementation 'com.github.stefanbirkner:system-rules:1.10.0' + testImplementation 'io.vertx:vertx-core:3.0.0' + testImplementation(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final') + testImplementation (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final') } + test { reports.html.destination = file("$buildDir/reports/test") forkEvery = 1 @@ -59,66 +55,4 @@ test { } } -modifyPom { - project { - name 'cyclops-futurestream' - description 'Asynchronous parallel streaming via futures' - url 'https://github.com/aol/cyclops-react' - inceptionYear '2015' - - groupId 'com.oath.cyclops' - artifactId 'cyclops-futurestream' - version "$version" - - scm { - url 'scm:git@github.com:aol/cyclops-react.git' - connection 'scm:git@github.com:aol/cyclops-react.git' - developerConnection 'scm:git@github.com:aol/simple-react.git' - } - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'johnmcclean' - name 'John McClean' - email 'john.mcclean@oath.com' - } - developer { - id 'kewangie' - name 'Ke Wang' - email 'ke.wang@teamaol.com' - } - - developer { - id 'tkountis' - name 'Thomas Kountis Wang' - email 'thomas.kountis@adtech.com' - } - developer { - id 'colinfkennedy' - name 'Colin Kennedy' - email 'Colin.Kennedy@teamaol.com' - } - } - } -} - -extraArchive { - sources = true - tests = true - javadoc = true -} - -nexus { - sign = true - repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' - snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots' -} diff --git a/cyclops-futurestream/gradle.properties b/cyclops-futurestream/gradle.properties new file mode 100644 index 0000000000..40b278f81a --- /dev/null +++ b/cyclops-futurestream/gradle.properties @@ -0,0 +1 @@ +POM_NAME=cyclops-futurestream diff --git a/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java b/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java index 8e0d8c9188..a17851cc96 100644 --- a/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java +++ b/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java @@ -22,6 +22,8 @@ import cyclops.data.Seq; import cyclops.reactive.ReactiveSeq; import cyclops.reactive.Spouts; +import lombok.Builder; +import lombok.experimental.Wither; import org.reactivestreams.Publisher; import com.oath.cyclops.internal.react.FutureStreamImpl; @@ -35,8 +37,7 @@ import lombok.Getter; import lombok.ToString; -import lombok.experimental.Builder; -import lombok.experimental.Wither; + /** * diff --git a/cyclops-jackson-integration/build.gradle b/cyclops-jackson-integration/build.gradle index dff97eea82..9f00a20a6b 100644 --- a/cyclops-jackson-integration/build.gradle +++ b/cyclops-jackson-integration/build.gradle @@ -1,17 +1,11 @@ apply plugin: 'java' apply plugin: 'eclipse' -apply plugin: 'com.bmuschko.nexus' apply plugin: 'maven-publish' buildscript { repositories { jcenter() } - - dependencies { - classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' - - } } sourceCompatibility = 1.8 @@ -33,75 +27,23 @@ configurations { dependencies { - compile project(':cyclops') - compile 'com.fasterxml.jackson.core:jackson-databind:'+jacksonVersion - provided group: 'org.projectlombok', name: 'lombok', version: lombokVersion - testCompile project(':cyclops-reactive-collections') - testCompile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:'+jacksonVersion - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3' - testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5' + api project(':cyclops') + api 'com.fasterxml.jackson.core:jackson-databind:'+jacksonVersion + compileOnly group: 'org.projectlombok', name: 'lombok', version: lombokVersion + testImplementation project(':cyclops-reactive-collections') + testImplementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:'+jacksonVersion + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3' + testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.9.5' } -sourceSets { - main.compileClasspath += [configurations.provided] - test.compileClasspath += [configurations.provided] - test.runtimeClasspath += [configurations.provided] -} -eclipse.classpath.plusConfigurations += [configurations.provided] // Eclipse users only + test { systemProperties 'property': 'value' } -modifyPom { - project { - name 'cyclops-jackson' - description 'Cyclops integration for Jackson' - url 'https://github.com/oath/cyclops' - inceptionYear '2015' - - groupId 'com.oath.cyclops' - artifactId 'cyclops-jackson-integration' - version "$version" - - scm { - url 'ssh://git@github.com:aol/cyclops.git' - connection 'ssh://git@github.com:aol/cyclops.git' - developerConnection 'ssh://git@github.com:aol/cyclops.git' - } - - licenses { - license { - name 'The MIT License (MIT)' - url 'https://github.com/oath/cyclops/blob/master/licence.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'johnmcclean' - name 'John McClean' - email 'john.mcclean@oath.com' - } - } - } -} - -extraArchive { - sources = true - tests = true - javadoc = true -} - -nexus { - sign = true - repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' - snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots' -} - diff --git a/cyclops-jackson-integration/gradle.properties b/cyclops-jackson-integration/gradle.properties new file mode 100644 index 0000000000..93b74143fd --- /dev/null +++ b/cyclops-jackson-integration/gradle.properties @@ -0,0 +1 @@ +POM_NAME=cyclops-jackson-integration diff --git a/cyclops-pure/build.gradle b/cyclops-pure/build.gradle index d424db962d..95e8b14bfb 100644 --- a/cyclops-pure/build.gradle +++ b/cyclops-pure/build.gradle @@ -2,16 +2,11 @@ buildscript { repositories { jcenter() } - - dependencies { - classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' - - } } apply plugin: 'java' apply plugin: 'maven-publish' -apply plugin: 'com.bmuschko.nexus' + sourceCompatibility = 1.8 jar { @@ -30,26 +25,22 @@ configurations { dependencies { - compile project(':cyclops') - compile project(':cyclops-reactive-collections') + api project(':cyclops') + api project(':cyclops-reactive-collections') - provided 'org.projectlombok:lombok:1.16.20' - testCompile project(':cyclops').sourceSets.test.output - testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0' - testCompile 'org.mockito:mockito-core:1.9.5' - testCompile 'io.projectreactor:reactor-core:3.0.7.RELEASE' - testCompile 'org.hamcrest:hamcrest-all:1.3' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile 'org.testng:testng:5.14.10' - testCompile 'com.github.stefanbirkner:system-rules:1.10.0' - testCompile 'io.vertx:vertx-core:3.0.0' + compileOnly 'org.projectlombok:lombok:1.16.20' + testImplementation project(':cyclops').sourceSets.test.output + testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.0' + testImplementation 'org.mockito:mockito-core:1.9.5' + testImplementation 'io.projectreactor:reactor-core:3.0.7.RELEASE' + testImplementation 'org.hamcrest:hamcrest-all:1.3' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation 'org.testng:testng:5.14.10' + testImplementation 'com.github.stefanbirkner:system-rules:1.10.0' + testImplementation 'io.vertx:vertx-core:3.0.0' } -sourceSets { - main.compileClasspath += [configurations.provided] - test.compileClasspath += [configurations.provided] - test.runtimeClasspath += [configurations.provided] -} + test { reports.html.destination = file("$buildDir/reports/test") @@ -59,66 +50,5 @@ test { } } -modifyPom { - project { - name 'cyclops-pure' - description 'Pure funcional programming for Java 8 and beyond' - url 'https://github.com/aol/cyclops-react' - inceptionYear '2017' - - groupId 'com.oath.cyclops' - artifactId 'cyclops-pure' - version "$version" - - scm { - url 'scm:git@github.com:aol/cyclops-react.git' - connection 'scm:git@github.com:aol/cyclops-react.git' - developerConnection 'scm:git@github.com:aol/simple-react.git' - } - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'johnmcclean' - name 'John McClean' - email 'john.mcclean@oath.com' - } - developer { - id 'kewangie' - name 'Ke Wang' - email 'ke.wang@teamaol.com' - } - - developer { - id 'tkountis' - name 'Thomas Kountis Wang' - email 'thomas.kountis@adtech.com' - } - developer { - id 'colinfkennedy' - name 'Colin Kennedy' - email 'Colin.Kennedy@teamaol.com' - } - } - } -} - -extraArchive { - sources = true - tests = true - javadoc = true -} -nexus { - sign = true - repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' - snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots' -} diff --git a/cyclops-pure/gradle.properties b/cyclops-pure/gradle.properties new file mode 100644 index 0000000000..6ccc07618c --- /dev/null +++ b/cyclops-pure/gradle.properties @@ -0,0 +1 @@ +POM_NAME=cyclops-pure diff --git a/cyclops-reactive-collections/build.gradle b/cyclops-reactive-collections/build.gradle index 986064daeb..d2bb4acbfb 100644 --- a/cyclops-reactive-collections/build.gradle +++ b/cyclops-reactive-collections/build.gradle @@ -11,7 +11,6 @@ buildscript { apply plugin: 'java' apply plugin: 'maven-publish' -apply plugin: 'com.bmuschko.nexus' sourceCompatibility = 1.8 jar { @@ -28,28 +27,24 @@ configurations { provided } dependencies { - compile project(':cyclops') - testCompile project(':cyclops').sourceSets.test.output - provided 'org.projectlombok:lombok:1.16.12' - testCompile project(':cyclops').sourceSets.test.output - testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0' - testCompile group: 'io.projectreactor', name: 'reactor-test', version: '3.2.2.RELEASE' - testCompile 'org.mockito:mockito-core:1.9.5' - testCompile 'io.projectreactor:reactor-core:3.0.7.RELEASE' - testCompile 'org.hamcrest:hamcrest-all:1.3' - testCompile 'com.google.guava:guava:19.0' - testCompile 'com.google.guava:guava-testlib:19.0' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile 'org.testng:testng:5.14.10' - testCompile 'com.github.stefanbirkner:system-rules:1.10.0' - testCompile 'io.vertx:vertx-core:3.0.0' -} -sourceSets { - main.compileClasspath += [configurations.provided] - test.compileClasspath += [configurations.provided] - test.runtimeClasspath += [configurations.provided] + api project(':cyclops') + testImplementation project(':cyclops').sourceSets.test.output + compileOnly 'org.projectlombok:lombok:1.16.12' + testImplementation project(':cyclops').sourceSets.test.output + testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.0' + testImplementation group: 'io.projectreactor', name: 'reactor-test', version: '3.2.2.RELEASE' + testImplementation 'org.mockito:mockito-core:1.9.5' + testImplementation 'io.projectreactor:reactor-core:3.0.7.RELEASE' + testImplementation 'org.hamcrest:hamcrest-all:1.3' + testImplementation 'com.google.guava:guava:19.0' + testImplementation 'com.google.guava:guava-testlib:19.0' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation 'org.testng:testng:5.14.10' + testImplementation 'com.github.stefanbirkner:system-rules:1.10.0' + testImplementation 'io.vertx:vertx-core:3.0.0' } + test { reports.html.destination = file("$buildDir/reports/test") // forkEvery = 1 @@ -57,67 +52,3 @@ test { events "started", "passed", "skipped", "failed"//, "standardOut", "standardError" } } - -modifyPom { - project { - name 'cyclops-reactive-collections' - description 'Reactive collections' - url 'https://github.com/aol/cyclops-react' - inceptionYear '2017' - - groupId 'com.oath.cyclops' - artifactId 'cyclops-reactive-collections' - version "$version" - - scm { - url 'scm:git@github.com:aol/cyclops-react.git' - connection 'scm:git@github.com:aol/cyclops-react.git' - developerConnection 'scm:git@github.com:aol/simple-react.git' - } - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'johnmcclean' - name 'John McClean' - email 'john.mcclean@oath.com' - } - developer { - id 'kewangie' - name 'Ke Wang' - email 'ke.wang@teamaol.com' - } - - developer { - id 'tkountis' - name 'Thomas Kountis Wang' - email 'thomas.kountis@adtech.com' - } - developer { - id 'colinfkennedy' - name 'Colin Kennedy' - email 'Colin.Kennedy@teamaol.com' - } - } - } -} - -extraArchive { - sources = true - tests = true - javadoc = true -} - -nexus { - sign = true - repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' - snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots' -} - diff --git a/cyclops-reactive-collections/gradle.properties b/cyclops-reactive-collections/gradle.properties new file mode 100644 index 0000000000..d3a2809c6d --- /dev/null +++ b/cyclops-reactive-collections/gradle.properties @@ -0,0 +1 @@ +POM_NAME=cyclops-reactive-collections diff --git a/cyclops-reactor-integration/build.gradle b/cyclops-reactor-integration/build.gradle index 1b2bb8e524..fd6cbe4b5e 100644 --- a/cyclops-reactor-integration/build.gradle +++ b/cyclops-reactor-integration/build.gradle @@ -1,6 +1,5 @@ apply plugin: 'java' apply plugin: 'eclipse' -apply plugin: 'com.bmuschko.nexus' apply plugin: 'maven-publish' buildscript { @@ -21,14 +20,6 @@ jar { } } -if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } - } -} - repositories { mavenCentral() } @@ -42,35 +33,28 @@ configurations { } dependencies { - compile project(':cyclops') - compile project(':cyclops-pure') - compile project(':cyclops-anym') - compile project(':cyclops-futurestream') - compile project(':cyclops-reactive-collections') - compile 'io.projectreactor:reactor-core:' + reactorVersion - testCompile project(':cyclops-anym').sourceSets.test.output - testCompile project(':cyclops').sourceSets.test.output - provided group: 'org.projectlombok', name: 'lombok', version: lombokVersion - - testCompile 'commons-io:commons-io:2.4' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3' - testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5' - testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0' - testCompile 'org.assertj:assertj-core:3.2.0' - testCompile 'com.github.stefanbirkner:system-rules:1.10.0' - testCompile(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final') - testCompile (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final') + api project(':cyclops') + api project(':cyclops-pure') + api project(':cyclops-anym') + api project(':cyclops-futurestream') + api project(':cyclops-reactive-collections') + api 'io.projectreactor:reactor-core:' + reactorVersion + testImplementation project(':cyclops-anym').sourceSets.test.output + testImplementation project(':cyclops').sourceSets.test.output + compileOnly group: 'org.projectlombok', name: 'lombok', version: lombokVersion + + testImplementation 'commons-io:commons-io:2.4' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3' + testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.9.5' + testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.0' + testImplementation 'org.assertj:assertj-core:3.2.0' + testImplementation 'com.github.stefanbirkner:system-rules:1.10.0' + testImplementation(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final') + testImplementation (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final') } -sourceSets { - main.compileClasspath += [configurations.provided] - test.compileClasspath += [configurations.provided] - test.runtimeClasspath += [configurations.provided] -} - -eclipse.classpath.plusConfigurations += [configurations.provided] // Eclipse users only test { systemProperties 'property': 'value' @@ -97,51 +81,4 @@ test { artifacts { testArtifacts packageTests } -//artifacts.archives packageTests - -modifyPom { - project { - name 'cyclops-reactor' - description 'Cyclops integrations for Reactor' - url 'https://github.com/aol/cyclops' - inceptionYear '2016' - - groupId 'com.oath.cyclops' - artifactId 'cyclops-reactor-integration' - version "$version" - - scm { - url 'ssh://git@github.com:aol/cyclops.git' - connection 'ssh://git@github.com:aol/cyclops.git' - developerConnection 'ssh://git@github.com:aol/cyclops.git' - } - - licenses { - license { - name 'The MIT License (MIT)' - url 'https://github.com/oath/cyclops/blob/master/licence.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'johnmcclean' - name 'John McClean' - email 'john.mcclean@oath.com' - } - } - } -} - -extraArchive { - sources = true - tests = true - javadoc = true -} -nexus { - sign = true - repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' - snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots' -} diff --git a/cyclops-reactor-integration/gradle.properties b/cyclops-reactor-integration/gradle.properties new file mode 100644 index 0000000000..d885942d20 --- /dev/null +++ b/cyclops-reactor-integration/gradle.properties @@ -0,0 +1 @@ +POM_NAME=cyclops-reactor-integration diff --git a/cyclops-rxjava2-integration/build.gradle b/cyclops-rxjava2-integration/build.gradle index f1e3757596..3a5a6c5649 100644 --- a/cyclops-rxjava2-integration/build.gradle +++ b/cyclops-rxjava2-integration/build.gradle @@ -1,17 +1,11 @@ apply plugin: 'java' apply plugin: 'eclipse' -apply plugin: 'com.bmuschko.nexus' apply plugin: 'maven-publish' buildscript { repositories { jcenter() } - - dependencies { - classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' - - } } sourceCompatibility = 1.8 @@ -32,34 +26,27 @@ configurations { } dependencies { - compile project(':cyclops') - compile project(':cyclops-anym') - compile project(':cyclops-futurestream') - compile project(':cyclops-reactive-collections') - compile group: 'io.reactivex.rxjava2', name: 'rxjava', version: rxJava2Version - provided group: 'org.projectlombok', name: 'lombok', version: lombokVersion - testCompile project(':cyclops-anym').sourceSets.test.output - testCompile project(':cyclops').sourceSets.test.output - testCompile 'io.projectreactor:reactor-core:' + reactorVersion - testCompile 'commons-io:commons-io:2.4' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3' - testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5' - testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0' - testCompile 'org.assertj:assertj-core:3.2.0' - testCompile 'com.github.stefanbirkner:system-rules:1.10.0' - testCompile(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final') - testCompile (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final') -} - -sourceSets { - main.compileClasspath += [configurations.provided] - test.compileClasspath += [configurations.provided] - test.runtimeClasspath += [configurations.provided] + api project(':cyclops') + api project(':cyclops-anym') + api project(':cyclops-futurestream') + api project(':cyclops-reactive-collections') + api group: 'io.reactivex.rxjava2', name: 'rxjava', version: rxJava2Version + compileOnly group: 'org.projectlombok', name: 'lombok', version: lombokVersion + testImplementation project(':cyclops-anym').sourceSets.test.output + testImplementation project(':cyclops').sourceSets.test.output + testImplementation 'io.projectreactor:reactor-core:' + reactorVersion + testImplementation 'commons-io:commons-io:2.4' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3' + testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.9.5' + testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.0' + testImplementation 'org.assertj:assertj-core:3.2.0' + testImplementation 'com.github.stefanbirkner:system-rules:1.10.0' + testImplementation(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final') + testImplementation (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final') } -eclipse.classpath.plusConfigurations += [configurations.provided] // Eclipse users only test { systemProperties 'property': 'value' @@ -70,49 +57,3 @@ test { } } -modifyPom { - project { - name 'cyclops-rxjava2' - description 'Cyclops integration with RxJava 2' - url 'https://github.com/oath/cyclops' - inceptionYear '2017' - - groupId 'com.oath.cyclops' - artifactId 'cyclops-rx2-integration' - version "$version" - - scm { - url 'ssh://git@github.com:aol/cyclops.git' - connection 'ssh://git@github.com:aol/cyclops.git' - developerConnection 'ssh://git@github.com:aol/cyclops.git' - } - - licenses { - license { - name 'The MIT License (MIT)' - url 'https://github.com/aol/cyclops/blob/master/licence.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'johnmcclean' - name 'John McClean' - email 'john.mcclean@oath.com' - } - } - } -} - -extraArchive { - sources = true - tests = true - javadoc = true -} - -nexus { - sign = true - repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' - snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots' -} diff --git a/cyclops-rxjava2-integration/gradle.properties b/cyclops-rxjava2-integration/gradle.properties new file mode 100644 index 0000000000..e85866a104 --- /dev/null +++ b/cyclops-rxjava2-integration/gradle.properties @@ -0,0 +1 @@ +POM_NAME=cyclops-rxjava2-integration diff --git a/cyclops/build.gradle b/cyclops/build.gradle index c47b09eb3d..d3a6610bd0 100644 --- a/cyclops/build.gradle +++ b/cyclops/build.gradle @@ -1,23 +1,12 @@ -buildscript { - repositories { - jcenter() - } - - dependencies { - classpath 'com.bmuschko:gradle-nexus-plugin:2.2' - } -} -/** - plugins {id 'me.champeau.gradle.jmh' version '0.2.0'}**/ def custom = { "$rootDir/gradle/${it}.gradle" } //find custom plugins locally -apply plugin: 'me.champeau.gradle.jmh' + apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'maven-publish' -apply plugin: 'com.bmuschko.nexus' +//apply plugin: 'com.bmuschko.nexus' apply plugin: 'jacoco' apply from: custom('jacoco-version') apply from: custom('jacoco-config') @@ -37,47 +26,36 @@ repositories { jcenter() } -if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } - } -} -configurations { - provided -} + dependencies { - compile 'org.agrona:Agrona:0.9.1' - compile 'org.reactivestreams:reactive-streams:1.0.0' - compile 'io.kindedj:kindedj:'+kindedJVersion - provided 'org.projectlombok:lombok:1.16.20' - testCompile group: 'io.projectreactor', name: 'reactor-test', version: '3.2.2.RELEASE' - testCompile 'com.github.stefanbirkner:system-rules:1.10.0' - testCompile 'io.projectreactor:reactor-core:3.2.2.RELEASE' - testCompile 'com.google.guava:guava:19.0' - testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0' - testCompile 'junit:junit:4.12' - testCompile 'org.hamcrest:hamcrest-all:1.3' - testCompile 'org.mockito:mockito-all:1.9.5' - testCompile 'io.javaslang:javaslang:2.0.2' - testCompile 'org.assertj:assertj-core:3.8.0' - testCompile(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final') - testCompile (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final') - testCompile group: 'org.hsqldb', name: 'hsqldb', version: '2.0.0' + api 'org.agrona:Agrona:0.9.1' + api 'org.reactivestreams:reactive-streams:1.0.0' + api 'io.kindedj:kindedj:'+kindedJVersion + + testImplementation group: 'io.projectreactor', name: 'reactor-test', version: '3.2.2.RELEASE' + testImplementation 'com.github.stefanbirkner:system-rules:1.10.0' + testImplementation 'io.projectreactor:reactor-core:3.2.2.RELEASE' + testImplementation 'com.google.guava:guava:19.0' + testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.0' + testImplementation 'junit:junit:4.12' + testImplementation 'org.hamcrest:hamcrest-all:1.3' + testImplementation 'org.mockito:mockito-all:1.9.5' + testImplementation 'io.javaslang:javaslang:2.0.2' + testImplementation 'org.assertj:assertj-core:3.8.0' + testImplementation(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final') + testImplementation (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final') + testImplementation group: 'org.hsqldb', name: 'hsqldb', version: '2.0.0' + jmh 'com.github.akarnokd:ixjava:1.0.0-RC5' jmh 'io.vavr:vavr:0.9.2' jmh 'com.google.guava:guava:19.0' } -sourceSets { - main.compileClasspath += [configurations.provided] - test.compileClasspath += [configurations.provided] - test.runtimeClasspath += [configurations.provided] -} + +/** jacocoTestReport { afterEvaluate { classDirectories = files(classDirectories.files.collect { @@ -85,11 +63,11 @@ jacocoTestReport { }) } } - +**/ jmh { - jmhVersion = '1.14' + jmhVersion = '1.29' humanOutputFile = null - include = ".*scrabble*" + // include = ".*scrabble*" } task testNG(type: Test) { @@ -100,12 +78,6 @@ task testNG(type: Test) { reports.html.destination = file("$buildDir/reports/test") } -task testSuite(type: Test) { - - include '**/*TestSuite.class' - reports.junitXml.destination = "$buildDir/reports/test" - reports.html.destination = "$buildDir/reports/test" -} test { reports.html.destination = file("$buildDir/reports/test") @@ -113,6 +85,10 @@ test { testLogging { events "started", "passed", "skipped", "failed"//, "standardOut", "standardError" } + minHeapSize = "512m" // initial heap size + maxHeapSize = "1024m" // maximum heap size + jvmArgs '-XX:MaxPermSize=256m' // mem argument for the test JVM + } test { @@ -126,68 +102,12 @@ task packageTests(type: Jar) { artifacts.archives packageTests - -modifyPom { - project { - name 'cyclops' - description 'Platform for Functional Reactive Programming with Java 8' - url 'https://github.com/aol/cyclops-react' - inceptionYear '2015' - - groupId 'com.oath.cyclops' - artifactId 'cyclops' - version "$version" - - scm { - url 'scm:git@github.com:aol/cyclops-react.git' - connection 'scm:git@github.com:aol/cyclops-react.git' - developerConnection 'scm:git@github.com:aol/simple-react.git' - } - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'johnmcclean-aol' - name 'John McClean' - email 'john.mcclean@teamaol.com' - } - developer { - id 'kewangie' - name 'Ke Wang' - email 'ke.wang@teamaol.com' - } - - developer { - id 'tkountis' - name 'Thomas Kountis Wang' - email 'thomas.kountis@adtech.com' - } - developer { - id 'colinfkennedy' - name 'Colin Kennedy' - email 'Colin.Kennedy@teamaol.com' - } - } - } -} - -extraArchive { - sources = true - tests = true - javadoc = true -} +/** nexus { sign = true repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots' } -/** - task wrapper(type: Wrapper) {gradleVersion = '2.14.1'}**/ + **/ + diff --git a/cyclops/gradle.properties b/cyclops/gradle.properties new file mode 100644 index 0000000000..0a5186d10f --- /dev/null +++ b/cyclops/gradle.properties @@ -0,0 +1,4 @@ +POM_NAME=cyclops +POM_PACKAGING=jar +POM_DESCRIPTION=Platform for Functional Reactive Programming with Java 8 +POM_URL=https://github.com/aol/cyclops diff --git a/cyclops/src/jmh/java/cyclops/VectorOps.java b/cyclops/src/jmh/java/cyclops/VectorOps.java index 7293f28d9c..5add27705d 100644 --- a/cyclops/src/jmh/java/cyclops/VectorOps.java +++ b/cyclops/src/jmh/java/cyclops/VectorOps.java @@ -1,11 +1,8 @@ package cyclops; -import com.google.common.collect.ImmutableList; import cyclops.data.Vector; -import cyclops.data.tuple.Tuple; -import cyclops.reactive.collections.immutable.VectorX; -import io.vavr.collection.Stream; + import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -17,7 +14,7 @@ import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; -import java.util.List; + import java.util.concurrent.TimeUnit; @@ -26,13 +23,13 @@ public class VectorOps { Vector vector; - VectorX vectorX; + // VectorX vectorX; io.vavr.collection.Vector js; @Setup public void before() { vector = Vector.range(0, 100_000); - vectorX = VectorX.range(0, 100_000); + // vectorX = VectorX.range(0, 100_000); js = io.vavr.collection.Vector.range(0, 100_000); } @@ -83,7 +80,7 @@ public void vavrOps() { } - +/** @Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.MILLISECONDS) @@ -110,6 +107,7 @@ public void vectorXOps() { } + **/ } diff --git a/cyclops/src/jmh/java/cyclops/data/vector/VectorMap.java b/cyclops/src/jmh/java/cyclops/data/vector/VectorMap.java index 38a730e9bc..1ae323dd28 100644 --- a/cyclops/src/jmh/java/cyclops/data/vector/VectorMap.java +++ b/cyclops/src/jmh/java/cyclops/data/vector/VectorMap.java @@ -1,7 +1,7 @@ package cyclops.data.vector; import cyclops.data.Vector; -import cyclops.reactive.collections.immutable.VectorX; + import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; diff --git a/cyclops/src/main/java/cyclops/control/Option.java b/cyclops/src/main/java/cyclops/control/Option.java index f2ee3cbbdb..f09e4beb3b 100644 --- a/cyclops/src/main/java/cyclops/control/Option.java +++ b/cyclops/src/main/java/cyclops/control/Option.java @@ -36,7 +36,7 @@ @see Maybe is a lazy / reactive sub-class of Option **/ -public interface Option extends To>, +public interface Option extends To>, OrElseValue>, MonadicValue, Zippable, @@ -102,7 +102,7 @@ static Option none() { } static Option some(T value){ - return new Option.Some<>(value); + return new Option.Some(value); } static Option fromFuture(Future future){ diff --git a/gradle.properties b/gradle.properties index e1165c7446..fcff491526 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,5 +5,11 @@ reactorVersion=3.3.1.RELEASE rxJava2Version=2.2.16 kindedJVersion=1.1.0 hamcrestVersion=1.3 -lombokVersion=1.18.4 +lombokVersion=1.16.20 jacksonVersion=2.10.1 + + +POM_NAME=cyclops +POM_PACKAGING=jar +POM_DESCRIPTION=Platform for Functional Reactive Programming with Java 8 +POM_URL=https://github.com/aol/cyclops diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ed88a042a2..3baa851b28 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index adf86b1710..a808e289de 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Oct 08 14:08:16 EDT 2017 +#Wed May 11 16:46:50 IST 2022 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip diff --git a/gradlew b/gradlew index 95bbe9e8cc..27309d9231 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash ############################################################################## ## @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn () { +warn ( ) { echo "$*" } -die () { +die ( ) { echo echo "$*" echo @@ -123,7 +123,7 @@ if $cygwin ; then SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" - # Add a account-defined pattern to the cygpath arguments + # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi @@ -154,19 +154,11 @@ if $cygwin ; then esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") } -APP_ARGS=$(save "$@") +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat index e95643d6a2..f6d5974e72 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -49,6 +49,7 @@ goto fail @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -59,6 +60,11 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ :execute @rem Setup the command line