2018-06-30 19:36:50 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2018 dorkbox, llc
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2018-06-20 17:14:57 +02:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2018-08-19 01:03:01 +02:00
|
|
|
id 'java-library' // give us access to api/implementation differences for building java libraries
|
2018-06-20 17:14:57 +02:00
|
|
|
id 'maven'
|
2018-08-18 14:33:47 +02:00
|
|
|
|
|
|
|
// // setup checking for the latest version of a plugin or dependency (and updating the gradle build)
|
|
|
|
// id "se.patrikerdes.use-latest-versions" version "0.2.3"
|
|
|
|
// id 'com.github.ben-manes.versions' version '0.16.0'
|
2018-06-20 17:14:57 +02:00
|
|
|
}
|
|
|
|
|
2018-08-28 01:42:35 +02:00
|
|
|
// common dependencies configuration
|
2018-08-31 10:52:37 +02:00
|
|
|
apply from: 'scripts/gradle/utilities.gradle'
|
2018-06-20 17:14:57 +02:00
|
|
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
setSrcDirs Collections.singletonList('src')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
java {
|
|
|
|
setSrcDirs Collections.singletonList('test')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
2018-06-30 19:36:50 +02:00
|
|
|
jcenter()
|
2018-06-20 17:14:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-08-28 01:49:55 +02:00
|
|
|
// utilities dependencies compile only (this is so the IDE can compile the util source)
|
2018-08-31 10:52:37 +02:00
|
|
|
compileOnly utilDependencies
|
2018-08-19 01:03:01 +02:00
|
|
|
|
2018-11-06 00:47:18 +01:00
|
|
|
// ALSO so tests can run
|
|
|
|
testImplementation utilDependencies
|
|
|
|
|
2018-08-28 01:42:35 +02:00
|
|
|
// api 'com.koloboke:koloboke-api-jdk8:1.0.0'
|
|
|
|
// runtime 'com.koloboke:koloboke-impl-jdk8:1.0.0'
|
2018-06-20 17:14:57 +02:00
|
|
|
|
|
|
|
// unit testing
|
2018-06-30 19:36:50 +02:00
|
|
|
testImplementation group: 'junit', name: 'junit', version: '4.12'
|
2018-06-20 17:14:57 +02:00
|
|
|
testRuntime group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.6'
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
options.incremental = true
|
|
|
|
options.fork = true
|
|
|
|
options.forkOptions.executable = 'javac'
|
|
|
|
|
|
|
|
// setup compile options. we specifically want to suppress usage of "Unsafe"
|
|
|
|
options.compilerArgs += ['-XDignore.symbol.file', '-Xlint:deprecation']
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-25 19:21:15 +02:00
|
|
|
/////////////////////////////
|
|
|
|
//// Gradle Wrapper Configuration.
|
|
|
|
/// Run this task, then refresh the gradle project
|
|
|
|
/////////////////////////////
|
|
|
|
task updateWrapper(type: Wrapper) {
|
|
|
|
gradleVersion = '4.10.2'
|
|
|
|
distributionUrl = distributionUrl.replace("bin", "all")
|
|
|
|
setDistributionType(Wrapper.DistributionType.ALL)
|
|
|
|
}
|