-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbuild.gradle
79 lines (71 loc) · 3.06 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
buildscript {
ext {
shadowJarVersion = '8.1.1'
}
repositories {
mavenCentral()
}
dependencies {
classpath "com.github.johnrengelman:shadow:${shadowJarVersion}"
}
}
plugins {
id "com.github.ben-manes.versions" version '0.51.0'
id 'com.adarshr.test-logger' version '4.0.0'
id 'com.diffplug.spotless' version '6.25.0'
id "com.github.spotbugs" version "6.0.25"
}
apply from: "$rootDir/gradle-scripts/extensions.gradle"
apply from: "$rootDir/gradle-scripts/plugins.gradle"
apply from: "$rootDir/gradle-scripts/project-info.gradle"
apply from: "$rootDir/gradle-scripts/java-compile.gradle"
apply from: "$rootDir/gradle-scripts/repositories.gradle"
apply from: "$rootDir/gradle-scripts/test.gradle"
apply from: "$rootDir/gradle-scripts/integration-tests.gradle"
apply from: "$rootDir/gradle-scripts/test-logger.gradle"
apply from: "$rootDir/gradle-scripts/set-library-version.gradle"
ext {
mockitoVersion = '5.14.2'
slf4jTestVersion = '1.2.0'
assertjVersion = '3.26.3'
pmdVersion = '7.7.0'
jacocoVersion = '0.8.12'
commercetoolsSyncJava = '10.0.5'
httpClientVersion = '17.16.0'
apacheCliVersion = '1.9.0'
jupiterApiVersion = '5.11.3'
logbackVersion = '1.5.12'
logstashLogbackEncoderVersion= '7.4'
}
apply from: "$rootDir/gradle-scripts/spotless.gradle"
apply from: "$rootDir/gradle-scripts/pmd.gradle"
apply from: "$rootDir/gradle-scripts/jacoco.gradle"
apply from: "$rootDir/gradle-scripts/spotbugs.gradle"
apply from: "$rootDir/gradle-scripts/shadow.gradle"
apply from: "$rootDir/gradle-scripts/execution-order.gradle"
/**
* 1. This cannot be in the "gradle-scripts/execution-order.gradle" script due to
* "Script plugins do not have access to the main buildscript classpath.":
* https://discuss.gradle.org/t/cant-access-classes-from-plugin-directly-in-included-script/14721/2
*
* 2. Cannot use normal dependsOn syntax due to https://github.com/diffplug/spotless/issues/198#issuecomment-363542192
*/
import com.diffplug.gradle.spotless.SpotlessTask
tasks.withType(SpotlessTask) {
it.mustRunAfter compileIntegrationTestJava
pmdMain.mustRunAfter it
}
dependencies {
implementation "com.commercetools:commercetools-sync-java:${commercetoolsSyncJava}"
implementation "com.commercetools.sdk:commercetools-okhttp-client4:${httpClientVersion}"
implementation "commons-cli:commons-cli:${apacheCliVersion}"
implementation "ch.qos.logback:logback-classic:${logbackVersion}"
implementation "ch.qos.logback:logback-core:${logbackVersion}"
implementation "net.logstash.logback:logstash-logback-encoder:${logstashLogbackEncoderVersion}"
testImplementation "uk.org.lidalia:slf4j-test:${slf4jTestVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${jupiterApiVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${jupiterApiVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${jupiterApiVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
}