-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
118 lines (101 loc) · 3.54 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
plugins {
id 'java'
id 'groovy'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "8.1.1"
}
defaultTasks 'assemble', 'publishToMavenLocal', 'shadowJar', 'test'
repositories {
mavenLocal()
maven {
url = 'https://repo.maven.apache.org/maven2'
}
}
dependencies {
implementation ('org.hibernate.orm:hibernate-core:6.3.0.Final') {
transitive = false
}
//explicit the Hibernate dependencies we need:
implementation 'org.antlr:antlr4-runtime:4.10.1'
implementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
runtimeOnly 'jakarta.transaction:jakarta.transaction-api:2.0.1'
implementation 'net.bytebuddy:byte-buddy:1.14.5'
runtimeOnly 'org.jboss.logging:jboss-logging:3.5.0.Final'
runtimeOnly 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'org.hibernate.common:hibernate-commons-annotations:6.0.6.Final'
implementation 'io.smallrye:jandex:3.1.1'
runtimeOnly 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
testRuntimeOnly ('io.quarkus:quarkus-hibernate-orm-panache:3.1.0.Final') {
transitive = false
}
testRuntimeOnly ('io.quarkus:quarkus-panache-common:3.1.0.Final') {
transitive = false
}
implementation 'org.apache.groovy:groovy:4.0.12'
implementation 'org.eclipse.jdt:ecj:3.33.0'
// testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testImplementation 'junit:junit:4.13.2'
implementation 'javax.xml.bind:jaxb-api:2.3.1'
}
group = 'org.hibernate'
version = '2.0-SNAPSHOT'
description = 'query-validator'
sourceCompatibility = '8'
sourceSets {
main {
groovy {
srcDirs = ['src/main/java']
}
}
}
shadowJar {
dependencies {
exclude(dependency('org.eclipse.jdt:ecj'))
// exclude "tools.jar"
}
relocate ('org.hibernate', 'org.hibernate.query.validator.orm') {
exclude 'org.hibernate.query.validator.*'
}
relocate ('org.jboss', 'org.hibernate.query.validator') {
exclude 'org.jboss.logging.*'
}
relocate 'jakarta.persistence', 'org.hibernate.query.validator.jakarta.jpa'
relocate 'jakarta.transaction', 'org.hibernate.query.validator.jakarta.jta'
exclude 'jakarta.activation'
relocate 'net', 'org.hibernate.query.validator'
relocate 'org.antlr.v4.runtime', 'org.hibernate.query.validator.antlr'
relocate 'org.jboss.jandex', 'org.hibernate.query.validator.jandex'
relocate 'org.apache.groovy', 'org.hibernate.query.validator.groovy.apache'
relocate ('org.codehaus.groovy', 'org.hibernate.query.validator.groovy.codehaus') {
exclude 'org.codehaus.groovy.runtime.*'
exclude 'org.codehaus.groovy.runtime.callsite.*'
}
relocate ('groovy', 'org.hibernate.query.validator.groovy.groovy') {
exclude 'groovy.lang.*'
}
relocate 'groovyjarjarantlr', 'org.hibernate.query.validator.groovy.antlr'
relocate 'groovyjarjarasm', 'org.hibernate.query.validator.asm'
relocate 'groovyjarjarcommonscli', 'org.hibernate.query.validator.cli'
relocate 'groovyjarjarpicocli', 'org.hibernate.query.validator.picocli'
}
jar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
}
test {
dependsOn 'copyDependencies'
systemProperty 'gradle', 'true'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task copyDependencies(type: Copy) {
from configurations.testRuntimeClasspath
into 'test-runtime-libs'
}