-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
100 lines (78 loc) · 3 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
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
97
98
99
100
plugins {
id 'java-library'
id 'org.hibernate.build.xjc-jakarta' version '1.0.2'
}
repositories {
mavenCentral()
}
dependencies {
ext {
jakartaJaxbRuntimeVersion = '3.0.2'
junit5Version = '5.8.2'
assertjVersion = '3.14.0'
libraries = [
jakarta_jpa: 'jakarta.persistence:jakarta.persistence-api:3.0.0',
jakarta_jta: 'jakarta.transaction:jakarta.transaction-api:2.0.0',
jandex: 'org.jboss:jandex:2.4.2.Final',
classmate: 'com.fasterxml:classmate:1.5.1',
logging: 'org.jboss.logging:jboss-logging:3.4.3.Final',
logging_annotations: 'org.jboss.logging:jboss-logging-annotations:2.2.1.Final',
logging_processor: 'org.jboss.logging:jboss-logging-processor:2.2.1.Final',
junit5_api: "org.junit.jupiter:junit-jupiter-api:${junit5Version}",
junit5_jupiter: "org.junit.jupiter:junit-jupiter-engine:${junit5Version}",
assertj: "org.assertj:assertj-core:${assertjVersion}",
assertj_api: "org.assertj:assertj-core-api:${assertjVersion}",
jakarta_jaxb_api: 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1',
jakarta_jaxb_xjc: "org.glassfish.jaxb:jaxb-xjc:${jakartaJaxbRuntimeVersion}",
jakarta_jaxb_runtime: "org.glassfish.jaxb:jaxb-runtime:${jakartaJaxbRuntimeVersion}",
jakarta_inject: 'jakarta.inject:jakarta.inject-api:2.0.0',
]
}
api libraries.jakarta_jpa
api libraries.jakarta_jta
api libraries.jandex
api libraries.classmate
implementation libraries.jakarta_jaxb_api
implementation libraries.jakarta_jaxb_runtime
implementation libraries.jakarta_inject
implementation 'org.hibernate.orm:hibernate-core:6.0.0.Beta3'
implementation libraries.logging
compileOnly libraries.logging_annotations
annotationProcessor libraries.logging_processor
annotationProcessor libraries.logging
annotationProcessor libraries.logging_annotations
testImplementation libraries.junit5_api
testImplementation libraries.junit5_jupiter
testImplementation libraries.assertj
xjc libraries.jakarta_jaxb_xjc
xjc libraries.jakarta_jaxb_runtime
xjc fileTree(dir: 'patched-libs/jaxb2-basics', include: '*.jar')
}
ext {
jaxbTargetDir = file( "${buildDir}/generated-src/jaxb/main" )
}
sourceSets {
main {
java {
srcDir jaxbTargetDir
}
}
}
xjc {
outputDirectory = jaxbTargetDir
schemas {
mapping {
xsdFile = file( 'src/main/resources/org/hibernate/orm/xsd/mapping-1.0.0.xsd' )
xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' )
xjcExtensions += ['inheritance']
}
}
}
tasks.withType( Test.class ).each { test ->
test.useJUnitPlatform()
}
wrapper {
// To upgrade the version of gradle used in the wrapper, run:
// ./gradlew wrapper --gradle-version NEW_VERSION
distributionType = Wrapper.DistributionType.ALL
}