-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
64 lines (55 loc) · 1.99 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
plugins {
id "groovy"
id "com.github.johnrengelman.shadow" version "6.0.0"
id "io.micronaut.application" version '1.0.0'
}
version "0.1"
group "com.objectcomputing.wetted"
repositories {
mavenCentral()
jcenter()
maven { url "https://oss.jfrog.org/oss-snapshot-local" }
}
micronaut {
runtime "netty"
testRuntime "spock2"
processing {
incremental true
annotations "com.objectcomputing.wetted.*"
}
}
dependencies {
annotationProcessor("io.micronaut.openapi:micronaut-openapi")
compileOnly("org.graalvm.nativeimage:svm")
implementation("io.micronaut:micronaut-validation")
implementation("io.micronaut:micronaut-runtime")
implementation("io.micronaut:micronaut-http-client")
implementation("io.swagger.core.v3:swagger-annotations")
runtimeOnly("ch.qos.logback:logback-classic")
testImplementation("io.micronaut:micronaut-http-client")
}
mainClassName = "com.objectcomputing.wetted.Application"
java {
sourceCompatibility = JavaVersion.toVersion('1.8')
targetCompatibility = JavaVersion.toVersion('1.8')
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs.addAll([
'-parameters',
// enables incremental compilation
'-Amicronaut.processing.incremental=true',
'-Amicronaut.processing.annotations=com.objectcomputing.*',
"-Amicronaut.processing.group=$project.group",
"-Amicronaut.processing.module=$project.name",
])
// if the following is enabled compile fails using gradle 6.7-rc-2 with the error
// Execution failed for task ':compileJava'.
// > java.lang.NoClassDefFoundError: com/sun/tools/javac/code/Symbol$ClassSymbol
// see stacktrace.txt in the project
// if I change to gradle 6.6.1 it works.
options.fork = true
options.forkOptions.jvmArgs = [
'-Dmicronaut.openapi.views.spec=redoc.enabled=true,rapidoc.enabled=true,swagger-ui.enabled=true,swagger-ui.theme=flattop'
]
}