/
build.gradle
57 lines (49 loc) · 1.51 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
/**
* Guava compatibility adapter.
*
* The tests are forked from Guava commit e370dde.
*/
dependencies {
api project(':caffeine')
api libraries.guava
testImplementation testLibraries.junit
testImplementation testLibraries.truth
testImplementation testLibraries.jctools
testImplementation testLibraries.easymock
testImplementation testLibraries.guavaTestLib
}
compileJava {
modularity.inferModulePath = false
}
jar.manifest {
attributes 'Bundle-SymbolicName': 'com.github.ben-manes.caffeine.guava'
attributes 'Import-Package': [
'com.google.common.cache',
'com.github.benmanes.caffeine.cache',
'com.github.benmanes.caffeine.cache.stats'].join(',')
attributes 'Export-Package': 'com.github.benmanes.caffeine.guava'
attributes 'Automatic-Module-Name': 'com.github.benmanes.caffeine.guava'
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
test {
useJUnit {
excludeCategories 'com.github.benmanes.caffeine.guava.OSGiTests'
}
}
task osgiTests(type: Test, group: 'Cache tests', description: 'Isolated OSGi tests') {
enabled = !JavaVersion.current().isJava9Compatible()
tasks.test.dependsOn(it)
useJUnit {
includeCategories 'com.github.benmanes.caffeine.guava.OSGiTests'
}
options {
jvmArgs '-noverify'
}
}
tasks.withType(Test) {
systemProperty 'guava.osgi.version', versions.guava
systemProperty 'caffeine.osgi.jar', project(':caffeine').jar.archivePath.path
systemProperty 'caffeine-guava.osgi.jar', project(':guava').jar.archivePath.path
}