-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
Copy pathhibernate-envers.gradle
76 lines (61 loc) · 1.69 KB
/
hibernate-envers.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
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
plugins {
id "local.publishing-java-module"
id "local.publishing-group-relocation"
}
description = "Hibernate's entity version (audit/history) support"
dependencies {
api project( ':hibernate-core' )
implementation libs.hibernateModels
implementation jakartaLibs.jaxbApi
implementation jakartaLibs.jaxb
implementation libs.jandex
implementation libs.hibernateModels
compileOnly libs.ant
annotationProcessor project( ':hibernate-processor' )
compileOnly jakartaLibs.annotation
testImplementation project( ':hibernate-testing' )
testAnnotationProcessor project( ':hibernate-processor' )
}
test {
include '**/**'
}
sourceSets {
test {
ext {
enversDemoJavaDir = file( "src/demo/java" )
enversDemoResourcesDir = file( "src/demo/resources" )
}
java {
srcDir enversDemoJavaDir
}
resources {
srcDir enversDemoResourcesDir
}
}
}
configurations {
tests {
description = 'Configuration for the produced test jar'
}
}
tasks.withType( Test.class ).each { test ->
if ( project.db == "h2" || project.db == "hsqldb" ) {
// Parallel test runs when running with in-memory databases
test.maxParallelForks = Runtime.runtime.availableProcessors().intdiv( 2 ) ?: 1
}
}
sourcesJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
task testJar(type: Jar, dependsOn: testClasses) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveClassifier.set( 'test' )
from sourceSets.test.output
}
artifacts {
tests testJar
}