-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (96 loc) · 2.64 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
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '2.4.5'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'maven-publish'
id 'war'
id 'checkstyle'
id 'pmd'
}
group = 'com.github.JhonnyBravo'
version = 'master-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
maven{ url 'https://jitpack.io'}
}
dependencyManagement {
dependencies {
dependency 'mysql:mysql-connector-java:8.0.22'
dependency 'junit:junit:4.13.2'
}
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-validation')
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
runtimeOnly 'mysql:mysql-connector-java'
testImplementation('org.springframework.boot:spring-boot-starter-test')
testImplementation ('junit:junit')
}
task sourcesJar(type: Jar,dependsOn: classes){
classifier='sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar,dependsOn: javadoc){
classifier='javadoc'
from javadoc.destinationDir
}
artifacts{
archives sourcesJar
archives javadocJar
}
java{
withJavadocJar()
withSourcesJar()
}
publishing{
publications{
bootJava(MavenPublication){
artifact bootJar
artifactId='zip-code-db-web-ui'
from components.java
versionMapping{
usage('java-api'){
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime'){
fromResolutionResult()
}
}
pom{
name='zip-code-db-web-ui'
description='Java 版 郵便番号検索 DB'
url='https://github.com/JhonnyBravo/zip-code-db-web-ui'
}
}
}
repositories{
maven{
def releasesRepoUrl=layout.buildDirectory.dir('repos/releases')
def snapshotsRepoUrl=layout.buildDirectory.dir('repos/snapshots')
url=version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
javadoc{
options.charSet='UTF-8'
options.encoding='UTF-8'
}
checkstyle {
toolVersion='8.41.1'
}
pmd {
toolVersion='6.33.0'
ignoreFailures=true
ruleSetFiles=files("config/pmd/custom-java.xml")
ruleSets=[]
}
tasks.withType(JavaCompile){
options.encoding='UTF-8'
}