2016-09-16 12:30:45 -04:00
|
|
|
description = 'Builds the Prelert Engine native binaries and Java classes'
|
|
|
|
|
2016-09-19 09:08:35 -04:00
|
|
|
import org.gradle.internal.os.OperatingSystem
|
2016-09-16 12:30:45 -04:00
|
|
|
|
2016-09-19 09:08:35 -04:00
|
|
|
project.ext.make = OperatingSystem.current().isLinux() ? "make" : "gnumake"
|
|
|
|
project.ext.numCpus = Runtime.runtime.availableProcessors()
|
2016-09-16 12:30:45 -04:00
|
|
|
|
2016-09-19 09:36:40 -04:00
|
|
|
task cppclean(type: Exec) {
|
2016-09-19 09:08:35 -04:00
|
|
|
commandLine make
|
|
|
|
args 'clean'
|
2016-09-16 12:30:45 -04:00
|
|
|
}
|
|
|
|
|
2016-09-19 09:36:40 -04:00
|
|
|
task cppobjcompile(type: Exec) {
|
2016-09-19 09:08:35 -04:00
|
|
|
commandLine make
|
|
|
|
args '-j' + numCpus, 'objcompile'
|
2016-09-16 12:30:45 -04:00
|
|
|
}
|
|
|
|
|
2016-09-19 09:36:40 -04:00
|
|
|
task cppmake(type: Exec) {
|
2016-09-19 09:08:35 -04:00
|
|
|
commandLine make
|
|
|
|
args '-j' + numCpus
|
2016-09-16 12:30:45 -04:00
|
|
|
}
|
|
|
|
|
2016-09-19 09:08:35 -04:00
|
|
|
task cpptest(type: Exec) {
|
|
|
|
commandLine make
|
|
|
|
args '-j' + numCpus, 'test'
|
2016-09-16 12:30:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
apply plugin: 'maven'
|
|
|
|
apply plugin: 'java'
|
|
|
|
|
2016-09-19 09:36:40 -04:00
|
|
|
compileJava.options.encoding = 'UTF-8'
|
2016-09-19 10:00:38 -04:00
|
|
|
compileTestJava.options.encoding = 'UTF-8'
|
2016-09-19 09:36:40 -04:00
|
|
|
|
2016-09-16 12:30:45 -04:00
|
|
|
group = 'com.prelert'
|
2016-10-04 04:18:52 -04:00
|
|
|
version = '2.3.0'
|
2016-09-16 12:30:45 -04:00
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
maven { url "http://repo.maven.apache.org/maven2" }
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations.all {
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile group: 'log4j', name: 'log4j', version:'1.2.17'
|
|
|
|
testCompile group: 'org.ini4j', name: 'ini4j', version:'0.5.2'
|
2016-10-03 16:36:15 -04:00
|
|
|
// Includes: junit, hamcrest and mockito
|
|
|
|
testCompile group: 'org.elasticsearch.test', name: 'framework', version: '5.0.0-alpha5'
|
2016-09-16 12:30:45 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|