-
Notifications
You must be signed in to change notification settings - Fork 139
/
Copy pathbuild.gradle
70 lines (54 loc) · 1.85 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Check gradle version
def reguiredGradleVersionMajor = 2
def requiredGradleVersionMinor = 0
def (gradleVersionMajor, gradleVersionMinor) =
getGradle().gradleVersion.tokenize('.').collect {it.toInteger()}
if ( gradleVersionMajor < reguiredGradleVersionMajor ||
(gradleVersionMajor == reguiredGradleVersionMajor &&
gradleVersionMinor < requiredGradleVersionMinor))
{
throw new GradleException("Gradle version " +
"$reguiredGradleVersionMajor.$requiredGradleVersionMinor and higher required.")
}
allprojects {
apply plugin: 'java'
repositories { mavenCentral() }
}
// Python utilities
task joernTools(type: Exec) {
workingDir './python/joern-tools'
commandLine 'python3', 'setup.py', 'install', '--user'
}
// Copy extensions and plugins into Octopus plugin directory
task deploy(dependsOn: build) << {
copy {
into "projects/octopus/plugins"
from fileTree("projects/plugins").files
include '**/*.jar'
exclude '**/*-plain.jar'
includeEmptyDirs = false
}
copy {
into "projects/octopus/extensions"
from fileTree("projects/extensions").files
include '**/*.jar'
exclude '**/lucene-core-3.6.2.jar'
exclude '**/*-plain.jar'
includeEmptyDirs = false
}
}
dependencies{
compile group: 'com.tunnelvisionlabs', name: 'antlr4-runtime', version: '4.5.3'
compile group: 'commons-cli', name: 'commons-cli', version: '1.2'
compile group: 'org.apache.commons', name: 'commons-csv', version: '1.2'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
compile group: 'junit', name: 'junit', version: '4.12'
}
task copyToLib2(type: Copy) {
into "projects/octopus/lib"
from configurations.runtime
}
copyToLib2.dependsOn subprojects.build
build.dependsOn subprojects.build
build.dependsOn joernTools
build.dependsOn copyToLib2