-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
122 lines (103 loc) · 3.43 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
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:1.0.9.RELEASE"
classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:2.0.0"
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.27.1"
classpath "de.aaschmid:gradle-cpd-plugin:3.1"
}
}
// basic plugins
plugins {
id 'java'
id 'maven'
id 'maven-publish'
id "com.jfrog.bintray" version "1.8.4"
id 'de.thetaphi.forbiddenapis' version '2.7'
}
apply plugin: "io.spring.dependency-management"
// basic configuration
group = "jp.xet.spring.aws"
ext.artifactId = "aws-client-spring-boot-configuration"
// custom plugins
apply plugin: "checkstyle"
apply plugin: "com.github.spotbugs"
apply plugin: "pmd"
apply plugin: "jacoco"
apply plugin: "com.diffplug.gradle.spotless"
// custom configuration
apply from: "${rootProject.projectDir}/gradle/quality/checkstyle.gradle"
apply from: "${rootProject.projectDir}/gradle/quality/spotbugs.gradle"
apply from: "${rootProject.projectDir}/gradle/quality/pmd.gradle"
apply from: "${rootProject.projectDir}/gradle/quality/jacoco.gradle"
apply from: "${rootProject.projectDir}/gradle/quality/forbiddenapis.gradle"
apply from: "${rootProject.projectDir}/gradle/quality/spotless.gradle"
apply from: "${rootProject.projectDir}/gradle/version.gradle"
apply from: "${rootProject.projectDir}/gradle/sourceArtifact.gradle"
apply from: "${rootProject.projectDir}/gradle/bintray.gradle"
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
pluginClasspath = project.configurations.spotbugsPlugins
}
// compiler
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(AbstractCompile) each {
it.options.encoding = "UTF-8"
}
compileJava {
options.compilerArgs << "-Werror"
options.compilerArgs << "-Xlint:all" << "-Xlint:-processing" << "-Xlint:-deprecation"
}
// ======== libraries ========
repositories {
jcenter()
mavenCentral()
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
}
}
configurations {
testImplementation.extendsFrom compileOnly
}
dependencies {
// spring
implementation "org.springframework.boot:spring-boot"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
// aws
compileOnly 'com.amazonaws:aws-java-sdk-core:1.11.721'
compileOnly 'software.amazon.awssdk:aws-core:2.10.63'
compileOnly 'software.amazon.awssdk:apache-client:2.10.63'
compileOnly 'software.amazon.awssdk:netty-nio-client:2.10.63'
// lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-starter-logging'
testImplementation 'org.assertj:assertj-core'
// test AWS client v1
testImplementation('com.amazonaws:aws-java-sdk:1.11.720') {
exclude group: 'com.amazonaws', module: 'aws-java-sdk-simpledb'
}
// test AWS client v2
testImplementation 'software.amazon.awssdk:aws-sdk-java:2.10.63'
// testImplementation 'software.amazon.awssdk:simpledb:2.0.0-preview-11'
// build
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.10.1'
}
// ======== wrapper ========
wrapper {
gradleVersion = "5.4.1"
}