forked from TNG/ArchUnit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
136 lines (116 loc) · 6.18 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0' apply false
id 'com.github.spotbugs' version '4.6.0' apply false
id "de.marcphilipp.nexus-publish" version "0.4.0" apply false
id "com.diffplug.spotless" version "5.8.2" apply false
}
def appAndSourceUrl = 'https://github.com/TNG/ArchUnit'
ext {
year = "${Calendar.getInstance().get(Calendar.YEAR)}"
app = [
name : 'ArchUnit',
urls : [
entry : appAndSourceUrl,
doc : appAndSourceUrl,
issues: "${appAndSourceUrl}/issues",
source: appAndSourceUrl
],
gitRepo: 'git@github.com:TNG/ArchUnit.git',
license: [
name: 'The Apache Software License, Version 2.0',
url : 'http://www.apache.org/licenses/LICENSE-2.0.txt'
]
]
company = [
name: 'TNG Technology Consulting GmbH',
url : 'https://www.tngtech.com/'
]
thirdPartyRelocationPackage = 'com.tngtech.archunit.thirdparty'
asmRelocationPackage = "${thirdPartyRelocationPackage}.org.objectweb.asm"
googleRelocationPackage = "${thirdPartyRelocationPackage}.com.google"
dependency = [
asm : [group: 'org.ow2.asm', name: 'asm', version: '9.0'],
guava : [group: 'com.google.guava', name: 'guava', version: '20.0'],
slf4j : [group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'],
log4j_api : [group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.1'],
log4j_core : [group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.1'],
log4j_slf4j : [group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.1'],
junit4 : [group: 'junit', name: 'junit', version: '4.13'],
junit5VintageEngine : [group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.6.2'],
junit5JupiterApi : [group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.6.2'],
junit5JupiterEngine : [group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.6.2'],
junitPlatform : [group: 'org.junit.platform', name: 'junit-platform-runner', version: '1.6.2'],
junitPlatformCommons: [group: 'org.junit.platform', name: 'junit-platform-commons', version: '1.6.2'],
junitPlatformEngine : [group: 'org.junit.platform', name: 'junit-platform-engine', version: '1.6.2'],
hamcrest : [group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'],
junit_dataprovider : [group: 'com.tngtech.java', name: 'junit-dataprovider', version: '1.11.0'],
mockito : [group: 'org.mockito', name: 'mockito-core', version: '2.27.0'],
assertj : [group: 'org.assertj', name: 'assertj-core', version: '2.9.1'],
assertj_guava : [group: 'org.assertj', name: 'assertj-guava', version: '2.0.1'],
// Dependencies for example projects / tests
javaxAnnotationApi : [group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'],
springBeans : [group: 'org.springframework', name: 'spring-beans', version: '5.2.2.RELEASE'],
jakartaInject : [group: 'jakarta.inject', name: 'jakarta.inject-api', version: '1.0'],
jakartaAnnotations : [group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '1.3.5'],
guice : [group: 'com.google.inject', name: 'guice', version: '4.2.3'],
// NOTE: The pure javaee-api dependencies are crippled, so to run any test we need to choose a full implementation provider
geronimoEjb : [group: 'org.apache.geronimo.specs', name: 'geronimo-ejb_3.1_spec', version: '1.0'],
geronimoJpa : [group: 'org.apache.geronimo.specs', name: 'geronimo-jpa_2.0_spec', version: '1.0'],
// NOTE: using an old version of JodaTime that is compatible with Java7, Java8, and above
jodaTime : [group: 'joda-time', name: 'joda-time', version: '2.0'],
joox : [group: 'org.jooq', name: 'joox-java-6', version: '1.6.0']
]
postfixedJar = { File jarFile, String postfix ->
new File(jarFile.parentFile, jarFile.name.replaceAll(/\.jar$/, "-${postfix}.jar"))
}
tempJar = { File jarFile -> postfixedJar(jarFile, 'tmp') }
productionProjects = [
project(':archunit'),
project(':archunit-junit'),
project(':archunit-junit4'),
project(':archunit-junit5-api'),
project(':archunit-junit5-engine-api'),
project(':archunit-junit5-engine'),
project(':archunit-junit5')]
releaseProjects = [
project(':archunit'),
project(':archunit-junit4'),
project(':archunit-junit5-api'),
project(':archunit-junit5-engine-api'),
project(':archunit-junit5-engine'),
project(':archunit-junit5')]
createModuleDescription = { description, proj -> "${description} - Module '${proj.name}'" }
currentScriptRootOf = { it.buildscript.sourceFile.parentFile }
}
allprojects {
group = 'com.tngtech.archunit'
version = '0.16.0-SNAPSHOT'
repositories {
mavenCentral {
metadataSources {
mavenPom()
artifact()
ignoreGradleMetadataRedirection()
}
}
}
}
description = 'A Java architecture test library, to specify and assert architecture rules in plain Java'
task showJdkVersion {
println "Configured JDK: ${JavaVersion.current()}"
}
task clean {
doLast {
project.buildDir.deleteDir()
}
}
configure(subprojects.findAll { it.name != 'docs' }) {
apply plugin: 'java-library'
description createModuleDescription(rootProject.description, project)
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
javadoc {
options.addBooleanOption('html5', true)
}
}
apply from: 'build-steps/build-steps.gradle'