Build Native C++ binaries and Java code in a single gradle project.
C++ is built by calling make Original commit: elastic/x-pack-elasticsearch@bd52bfd316
This commit is contained in:
parent
5b40acdc52
commit
f367ecf1e2
|
@ -0,0 +1,52 @@
|
|||
description = 'Builds the Prelert Engine native binaries and Java classes'
|
||||
|
||||
project.ext.numCpus = Runtime.runtime.availableProcessors() -1
|
||||
|
||||
|
||||
task clean(type: Exec) {
|
||||
commandLine 'make'
|
||||
args 'clean', 'BUILD_ENGINE_API=1'
|
||||
}
|
||||
|
||||
task objcompile(type: Exec) {
|
||||
commandLine 'make'
|
||||
args '-j' + numCpus, 'objcompile', 'BUILD_ENGINE_API=1'
|
||||
}
|
||||
|
||||
task make(type: Exec) {
|
||||
commandLine 'make'
|
||||
args '-j' + numCpus, 'BUILD_ENGINE_API=1'
|
||||
}
|
||||
|
||||
task test(type: Exec) {
|
||||
commandLine 'make'
|
||||
args '-j' + numCpus, 'BUILD_ENGINE_API=1', 'test'
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'java'
|
||||
|
||||
group = 'com.prelert'
|
||||
version = '2.1.1'
|
||||
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.hamcrest', name: 'hamcrest-core', version: '1.3'
|
||||
testCompile group: 'junit', name: 'junit', version:'4.11'
|
||||
testCompile group: 'org.ini4j', name: 'ini4j', version:'0.5.2'
|
||||
testCompile group: 'org.mockito', name: 'mockito-all', version:'1.10.19'
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
rootProject.name = 'prelert-engine-api'
|
||||
include ':engine-api-java'
|
||||
include ':prelert-engine-api-common'
|
||||
include ':data-extractors'
|
||||
include ':engine-api'
|
||||
include ':prelert-engine-api-client'
|
||||
include ':engine-api-server'
|
||||
include ':elasticsearch-persistence'
|
||||
|
||||
project(':engine-api-java').projectDir = "$rootDir/java/apps/engineApi" as File
|
||||
project(':prelert-engine-api-common').projectDir = "$rootDir/java/apps/engineApi/api-common" as File
|
||||
project(':data-extractors').projectDir = "$rootDir/java/apps/engineApi/data-extractors" as File
|
||||
project(':engine-api').projectDir = "$rootDir/java/apps/engineApi/engine-api" as File
|
||||
project(':prelert-engine-api-client').projectDir = "$rootDir/java/apps/engineApi/apiClient" as File
|
||||
project(':engine-api-server').projectDir = "$rootDir/java/apps/engineApi/apiServer" as File
|
||||
project(':elasticsearch-persistence').projectDir = "$rootDir/java/apps/engineApi/elasticsearch-persistence" as File
|
||||
|
Loading…
Reference in New Issue