Skip to content

Commit f9fceca

Browse files
authored
Merge pull request #23 from jenetics/issues/PRNGINE-21-update_build
#21: Update library build
2 parents 06acb37 + ba284da commit f9fceca

File tree

7 files changed

+50
-29
lines changed

7 files changed

+50
-29
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
sudo: false
22
language: java
33
jdk:
4-
- oraclejdk8
4+
- openjdk8
5+
- openjdk11
56

67
script: "./gradlew check --info --stacktrace"

README.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
# PRNGine (1.0.1)
1+
# PRNGine
22

3-
*PRNGine* is a pseudo-random number generator library for sequential and parallel [Monte Carlo simulations](https://de.wikipedia.org/wiki/Monte-Carlo-Simulation). It has been designed to work smoothly with the [Jenetics](http://jenetics.io) GA library, but it has no dependency to it. All PRNG implementations of this library extends the Java [Random](http://docs.oracle.com/javase/8/docs/api/java/util/Random.html) class, which makes it easily usable in other projects. *The PRNGs are* **not** *cryptographically strong RNGs.*
3+
[![Build Status](https://travis-ci.org/jenetics/prngine.svg?branch=master)](https://travis-ci.org/jenetics/jpx)
4+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.jenetics/prngine/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22jpx%22)
5+
[![Javadoc](https://www.javadoc.io/badge/io.jenetics/prngine.svg)](http://www.javadoc.io/doc/io.jenetics/prngine)
6+
[![Code Quality: Java](https://img.shields.io/lgtm/grade/java/g/jenetics/prngine.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/jenetics/prngine/context:java)
7+
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/jenetics/prngine.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/jenetics/prngine/alerts)
8+
9+
**PRNGine** is a pseudo-random number generator library for sequential and parallel [Monte Carlo simulations](https://de.wikipedia.org/wiki/Monte-Carlo-Simulation). It has been designed to work smoothly with the [Jenetics](http://jenetics.io) GA library, but it has no dependency to it. All PRNG implementations of this library extends the Java [Random](http://docs.oracle.com/javase/8/docs/api/java/util/Random.html) class, which makes it easily usable in other projects. *The PRNGs are* **not** *cryptographically strong RNGs.*
410

511
The following PRNGs are currently implemented:
612

@@ -12,22 +18,12 @@ The following PRNGs are currently implemented:
1218
* `XOR32ShiftRandom`: This generator was discovered and characterized by George Marsaglia [[Xorshift RNGs](http://www.jstatsoft.org/v08/i14/paper)]. In just three XORs and three shifts (generally fast operations) it produces a full period of 2<sup>32</sup> - 1 on 32 bits. (The missing value is zero, which perpetuates itself and must be avoided.) High and low bits pass Diehard.
1319
* `XOR64ShiftRandom`: This generator was discovered and characterized by George Marsaglia [[Xorshift RNGs](http://www.jstatsoft.org/v08/i14/paper)]. In just three XORs and three shifts (generally fast operations) it produces a full period of 2<sup>64</sup> - 1 on 64 bits. (The missing value is zero, which perpetuates itself and must be avoided.) High and low bits pass Diehard.
1420

15-
The full Javadoc can be found [here](http://jenetics.io/javadoc/prngine/1.0/index.html).
16-
1721
## Requirements
1822

19-
### Runtime
20-
* **JRE 8**: Java runtime version 8 is needed for using the library.
21-
22-
### Build time
23-
* **JDK 8**: The Java [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) must be installed.
24-
* **Gradle 3.x**: [Gradle](http://www.gradle.org/) is used for building the library. (Gradle is download automatically, if you are using the Gradle Wrapper script `./gradlew`, located in the base directory, for building the library.)
25-
* **TestNG 6.10**: PRNGine uses [TestNG](http://testng.org/doc/index.html) framework for unit tests.
23+
* **JRE 8**: Java runtime version 8 is needed for using the library.
2624

2725
## Building PRNGine
2826

29-
[![Build Status](https://travis-ci.org/jenetics/prngine.svg?branch=master)](https://travis-ci.org/jenetics/prngine)
30-
3127
For building the PRNGine library you have to check out the master branch from Github.
3228

3329
$ git clone https://github.com/jenetics/prngine.git
@@ -41,11 +37,6 @@ For building the PRNGine library you have to check out the master branch from G
4137

4238
$ ./gradle jar
4339

44-
## Download
45-
46-
* **Github**: <https://github.com/jenetics/prngine/archive/v1.0.1.zip>
47-
* **Maven**: `io.jenetics:prngine:1.0.1` on [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22prngine%22)
48-
4940
## Examples
5041

5142
### PRN creation

build.gradle

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,48 @@ allprojects {
4343
version = '1.0.2'
4444

4545
repositories {
46-
flatDir(dir: "${rootDir}/buildSrc/lib")
4746
mavenCentral()
4847
}
4948
}
5049

50+
subprojects { Project prj ->
51+
// The Javadoc doesn't work for
52+
// openjdk version "11.0.2" 2018-10-16
53+
// OpenJDK Runtime Environment 18.9 (build 11.0.2+7)
54+
// OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+7, mixed mode
55+
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
56+
prj.tasks.withType(Javadoc).all {
57+
enabled = false
58+
}
59+
}
60+
}
61+
5162
allprojects { Project prj ->
5263
if (prj.plugins.hasPlugin('java')) {
5364
sourceCompatibility = javaVersion
5465
targetCompatibility = javaVersion
5566
}
67+
68+
def XLINT_OPTIONS = [
69+
'cast',
70+
'classfile',
71+
'deprecation',
72+
'dep-ann',
73+
'divzero',
74+
'finally',
75+
'overrides',
76+
'rawtypes',
77+
'serial',
78+
'try',
79+
'unchecked'
80+
]
81+
82+
prj.tasks.withType(JavaCompile) { JavaCompile compile ->
83+
compile.options.compilerArgs = ["-Xlint:${XLINT_OPTIONS.join(',')}"]
84+
}
5685
}
5786

58-
task wrapper(type: Wrapper) {
59-
gradleVersion = '4.0.1'
87+
task upgradeGradle(type: Wrapper) {
88+
gradleVersion = '5.5.1'
6089
}
6190

gradle/wrapper/gradle-wrapper.jar

504 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jul 21 16:49:48 CEST 2017
1+
#Sun Jul 21 20:11:35 CEST 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip

gradlew

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prngine/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ afterEvaluate { project ->
183183
}
184184

185185
task sourcesJar(type: Jar) {
186-
classifier = 'sources'
186+
archiveClassifier = 'sources'
187187
from project.sourceSets.main.allSource
188188
filter(ReplaceTokens, tokens: [
189189
__identifier__: project.name + '-' + project.version,
@@ -192,7 +192,7 @@ afterEvaluate { project ->
192192
}
193193

194194
task javadocJar(type: Jar, dependsOn: javadoc) {
195-
classifier = 'javadoc'
195+
archiveClassifier = 'javadoc'
196196
from project.javadoc
197197
filter(ReplaceTokens, tokens: [
198198
__identifier__: project.name + '-' + project.version,

0 commit comments

Comments
 (0)