Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.gradle
/build/
bin/*

# Ignore Gradle GUI config
gradle-app.setting
Expand Down
60 changes: 28 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,60 +11,56 @@ repositories {
}

dependencies {
// JUnit framework
testCompile 'junit:junit:4.+'
compile 'junit:junit:4.+'
// JUnit 5 / Jupiter
testImplementation('org.junit.jupiter:junit-jupiter:5.10.0')
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.10.0')

// Test mocking framework
testCompile "org.mockito:mockito-core:1.+"
testImplementation "org.mockito:mockito-core:5.+"

// Google Guava lib
compile group: 'com.google.guava', name: 'guava', version: '22.0'
testImplementation group: 'com.google.guava', name: 'guava', version: '32.1.2-jre'

// Google truth API
compile "com.google.truth:truth:0.36"
testImplementation "com.google.truth:truth:1.1.5"

// Apache commons lang
compile 'org.apache.commons:commons-lang3:3.6'
implementation 'org.apache.commons:commons-lang3:3.13.0'
}

test {
dependsOn cleanTest
testLogging.showStandardStreams = true
}

String javaAlgorithmsPackage = "com/williamfiset/fastjavaio";
String javatestsAlgorithmsPackage = "javatests/com/williamfiset/fastjavaio";
tasks.named('test', Test) {
useJUnitPlatform()
}

sourceSets {
main {
java {
srcDirs = [
javaAlgorithmsPackage,
]
}
}
test {
java {
srcDirs = [
javatestsAlgorithmsPackage,
]
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs += [
'-Xlint:unchecked',
'-Xlint:deprecation'
]
}

// Options when compiling tests
compileTestJava {
options.encoding = 'UTF-8'
options.compilerArgs += [
'-Xlint:unchecked',
'-Xlint:deprecation'
]
}

task buildDependenciesFolder(type: Copy) {
from configurations.compile
from configurations.implementation
into './dependencies'
}

task compileInputReader(type: Exec) {
commandLine 'javac', (javaAlgorithmsPackage + '/InputReader.java')
}

// Creates fastjavaio jar file. Call with "$ gradle makeJar"
task makeJar(type: Exec) {
dependsOn compileInputReader
commandLine 'jar', '-cvf', 'fastjavaio.jar', (javaAlgorithmsPackage + '/InputReader.class')
jar {
archiveBaseName = 'fastjavaio'
archiveVersion = '1.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
* relative to Java's BufferedReader class
* @author William Fiset
**/
package javatests.com.williamfiset.fastjavaio;
package com.williamfiset.fastjavaio;

import com.williamfiset.fastjavaio.InputReader;
import java.io.*;

public class BenchMark {
Expand Down
Loading