-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathbuild.gradle
More file actions
64 lines (53 loc) · 2.38 KB
/
build.gradle
File metadata and controls
64 lines (53 loc) · 2.38 KB
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
apply plugin: 'application'
apply plugin: 'com.palantir.external-publish-jar'
mainClassName = 'com.palantir.javaformat.java.Main'
description = 'Palantir Java Format'
dependencies {
api project(':palantir-java-format-spi')
api 'com.google.guava:guava'
implementation 'org.functionaljava:functionaljava'
implementation 'tools.jackson.core:jackson-core'
implementation 'tools.jackson.core:jackson-databind'
testImplementation 'com.google.guava:guava-testlib'
testImplementation 'com.google.testing.compile:compile-testing'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-migrationsupport'
testImplementation 'org.junit.jupiter:junit-jupiter'
compileOnly 'com.google.auto.service:auto-service'
annotationProcessor 'com.google.auto.service:auto-service'
compileOnly "org.immutables:value::annotations"
annotationProcessor "org.immutables:value"
compileOnly 'org.derive4j:derive4j-annotation'
annotationProcessor 'org.derive4j:derive4j'
implementation 'com.google.code.findbugs:jsr305'
}
moduleJvmArgs {
exports().addAll(
'jdk.compiler/com.sun.tools.javac.file',
'jdk.compiler/com.sun.tools.javac.main',
'jdk.compiler/com.sun.tools.javac.parser',
'jdk.compiler/com.sun.tools.javac.tree',
'jdk.compiler/com.sun.tools.javac.util',
'jdk.compiler/com.sun.tools.javac.code',
'jdk.compiler/com.sun.tools.javac.api')
}
tasks.withType(JavaCompile).named('compileJava') {
// By setting the source and target compatibility to 11, while still using a higher level
// JDK for compilation, we can compile against the AST classes we need to support >11 source
// features but still run on 11 JDKs (with the addition of checking the java version at runtime
// and dynamically loading the correct formatter implementation)
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
// false positives due to org.junit.runners.* in the test cases
tasks.named("checkJUnitDependencies") {
enabled = false
}
tasks.named("test") {
// Run all classes and tests in parallel
// https://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution
systemProperty 'junit.jupiter.execution.parallel.mode.default', 'concurrent'
}
javaVersion {
target = 21
}