-
Notifications
You must be signed in to change notification settings - Fork 220
/
build.gradle
63 lines (54 loc) · 1.94 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
plugins {
id 'eclipse'
}
eclipse.project.natures 'org.eclipse.pde.PluginNature'
dependencies {
api(project(':com.ibm.wala.core')) {
because 'public method AstCGNode.addTarget receives an argument of type CGNode'
}
implementation(
'commons-io:commons-io:2.10.0',
project(':com.ibm.wala.shrike'),
project(':com.ibm.wala.util'),
)
testImplementation(
'junit:junit:4.13.2',
)
}
tasks.named('javadoc', Javadoc) {
final jsTasks = project(':com.ibm.wala.cast.js').tasks
classpath += files jsTasks.named('compileJava', JavaCompile)
final jsCreatePackageList = jsTasks.named('createPackageList', CreatePackageList)
final packageListDirectory = jsCreatePackageList.flatMap { it.packageListDirectory }
it.inputs.dir packageListDirectory
doFirst {
final jsJavadoc = jsTasks.named('javadoc', Javadoc)
options.linksOffline(
jsJavadoc.get().destinationDir.path,
packageListDirectory.get().toString()
)
}
}
final getProjectLibraryDirectory(project_name, link_task_name) {
final library_project = project(project_name)
final link_task = library_project.tasks.getByName(link_task_name)
final library_file = getNativeLibraryOutput(link_task)
return library_file.parent
}
tasks.named('test') {
final xlator_project_name = 'xlator_test'
final link_task_name = 'linkDebug'
dependsOn "$xlator_project_name:$link_task_name"
doFirst {
systemProperty 'java.library.path', getProjectLibraryDirectory(xlator_project_name, link_task_name)
if (isWindows) {
// Windows has nothing akin to RPATH for embedding DLL search paths in other DLLs or
// executables. Instead, we need to ensure that any required DLLs are in the standard
// executable search path at test run time.
final path_key = environment.keySet().find { it.equalsIgnoreCase('path') }
assert path_key != null
environment[path_key] += ";${getProjectLibraryDirectory(':com.ibm.wala.cast:cast', link_task_name)}"
}
}
}
apply from: rootProject.file("gradle-mvn-push.gradle")