forked from openrewrite/rewrite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
executable file
·78 lines (59 loc) · 2.79 KB
/
build.gradle.kts
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
71
72
73
74
75
76
77
78
import nl.javadude.gradle.plugins.license.LicenseExtension
plugins {
id("org.openrewrite.build.language-library")
}
dependencies {
api(project(":rewrite-xml"))
api("org.jetbrains:annotations:latest.release")
api("com.fasterxml.jackson.core:jackson-annotations")
implementation(project(":rewrite-core"))
compileOnly(project(":rewrite-test"))
// Caffeine 2.x works with Java 8, Caffeine 3.x is Java 11 only.
implementation("com.github.ben-manes.caffeine:caffeine:2.+")
implementation("org.antlr:antlr4-runtime:4.11.1")
implementation("dev.failsafe:failsafe:latest.release")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-smile")
implementation("com.fasterxml.jackson.module:jackson-module-jaxb-annotations")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8")
// needed by AddDependency
implementation(project(":rewrite-java"))
compileOnly("guru.nidi:graphviz-java:latest.release")
compileOnly("org.rocksdb:rocksdbjni:latest.release")
compileOnly(project(":rewrite-yaml"))
implementation(project(":rewrite-properties"))
implementation("io.micrometer:micrometer-core:1.9.+")
implementation("org.apache.commons:commons-text:latest.release")
testImplementation(project(":rewrite-test"))
testImplementation("com.squareup.okhttp3:mockwebserver:4.+")
testImplementation("com.squareup.okio:okio-jvm:3.0.0")
testImplementation("org.mapdb:mapdb:latest.release")
testImplementation("guru.nidi:graphviz-java:latest.release")
testRuntimeOnly("org.mapdb:mapdb:latest.release")
testRuntimeOnly(project(":rewrite-java-17"))
testRuntimeOnly("org.rocksdb:rocksdbjni:latest.release")
}
tasks.register<JavaExec>("generateAntlrSources") {
mainClass.set("org.antlr.v4.Tool")
args = listOf(
"-o", "src/main/java/org/openrewrite/maven/internal/grammar",
"-package", "org.openrewrite.maven.internal.grammar",
"-visitor"
) + fileTree("src/main/antlr").matching { include("**/*.g4") }.map { it.path }
classpath = sourceSets["main"].runtimeClasspath
}
tasks.withType<Javadoc> {
// generated ANTLR sources violate doclint
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
// TODO
// openrewrite/rewrite/rewrite-maven/src/main/java/org/openrewrite/maven/AddDependency.java:29: error: cannot find symbol
// @AllArgsConstructor(onConstructor_=@JsonCreator)
// ^
// symbol: method onConstructor_()
// location: @interface AllArgsConstructor
// 1 error
exclude("**/VersionRangeParser**", "**/AddDependency**")
}
configure<LicenseExtension> {
excludePatterns.add("**/unresolvable.txt")
}