-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtoday-core-aot.gradle
96 lines (78 loc) · 3.36 KB
/
today-core-aot.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import infra.building.shadow.ShadowSource
description = "Core for AOT infrastructure."
def javapoetVersion = "1.13.0"
configurations {
java21Api.extendsFrom(api)
java21Implementation.extendsFrom(implementation)
graalvm
javapoet
}
tasks.register('javapoetRepackJar', ShadowJar) {
archiveBaseName = 'today-javapoet-repack'
archiveVersion = javapoetVersion
configurations = [project.configurations.javapoet]
relocate('com.squareup.javapoet', 'infra.javapoet')
}
tasks.register('javapoetSource', ShadowSource) {
configurations = [project.configurations.javapoet]
relocate('com.squareup.javapoet', 'infra.javapoet')
outputDirectory.set file("build/shadow-source/javapoet")
}
tasks.register('javapoetSourceJar', Jar) {
archiveBaseName = 'today-javapoet-repack'
archiveVersion = javapoetVersion
archiveClassifier = 'sources'
from javapoetSource
}
dependencies {
javapoet("com.squareup:javapoet:${javapoetVersion}@jar")
api(files(javapoetRepackJar))
api(project(":today-core"))
compileOnly("org.graalvm.sdk:graal-sdk")
testImplementation("jakarta.xml.bind:jakarta.xml.bind-api")
testImplementation("com.google.code.findbugs:jsr305")
testImplementation("com.fasterxml.woodstox:woodstox-core")
testImplementation("org.xmlunit:xmlunit-assertj")
testImplementation("org.xmlunit:xmlunit-matchers")
testImplementation("io.projectreactor:reactor-test")
testImplementation("io.projectreactor.tools:blockhound")
testImplementation("org.skyscreamer:jsonassert")
testImplementation("com.squareup.okhttp3:mockwebserver")
testImplementation("com.fasterxml.jackson.core:jackson-databind")
testImplementation 'org.codehaus.janino:janino:3.1.6'
testImplementation("ch.qos.logback:logback-classic")
testImplementation 'org.apache.logging.log4j:log4j-core'
testImplementation "com.google.truth:truth:1.1.5"
testImplementation "com.google.testing.compile:compile-testing:0.21.0"
testImplementation 'com.google.jimfs:jimfs:1.2'
testImplementation 'org.eclipse.jdt.core.compiler:ecj:4.6.1'
testImplementation(project(":today-test"))
testImplementation("org.awaitility:awaitility")
testImplementation(testFixtures(project(":today-core")))
testImplementation("com.networknt:json-schema-validator");
testFixturesImplementation(testFixtures(project(":today-core")))
testFixturesImplementation("com.google.code.findbugs:jsr305")
testFixturesImplementation("org.junit.platform:junit-platform-launcher")
testFixturesImplementation("org.junit.jupiter:junit-jupiter-api")
testFixturesImplementation("org.junit.jupiter:junit-jupiter-params")
testFixturesImplementation("org.assertj:assertj-core")
testFixturesImplementation("org.xmlunit:xmlunit-assertj")
testFixturesImplementation("io.projectreactor:reactor-test")
}
jar {
manifest.attributes["Dependencies"] = "jdk.unsupported" // for WildFly (-> Objenesis 3.2)
dependsOn javapoetRepackJar
from(zipTree(javapoetRepackJar.archiveFile)) {
include "infra/javapoet/**"
}
}
test {
// Make sure the classes dir is used on the test classpath (required by ResourceTests).
// When test fixtures are involved, the JAR is used by default.
classpath = sourceSets.main.output.classesDirs + files(sourceSets.main.output.resourcesDir) + classpath - files(jar.archiveFile)
}
sourcesJar {
dependsOn javapoetSourceJar
from javapoetSource
}