-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (63 loc) · 2.28 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
plugins {
id 'org.springframework.boot' version '2.2.5.RELEASE' apply false
id 'net.ltgt.apt' version '0.21'
}
repositories {
mavenCentral()
}
subprojects {
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'net.ltgt.apt'
apply plugin: 'io.spring.dependency-management'
dependencyManagement {
imports {
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
}
}
repositories {
mavenLocal()
maven { url "http://192.168.180.191:8081/nexus/content/repositories/public" }
maven { url "http://192.168.180.191:8081/nexus/content/repositories/snapshots/" }
maven { url 'https://maven.aliyun.com/repository/public' }
mavenCentral()
}
group = 'com.winbaoxian.module'
version = '1.2.0-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
implementation 'org.apache.commons:commons-lang3'
implementation 'commons-beanutils:commons-beanutils:1.9.3'
implementation 'com.alibaba:fastjson:1.2.58'
compileOnly 'javax.servlet:javax.servlet-api'
compileOnly 'org.mapstruct:mapstruct-jdk8:1.3.1.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.3.1.Final'
testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.3.1.Final'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
}
def isWindows() {
return org.gradle.internal.os.OperatingSystem.current().isWindows()
}
String apidocCmd = isWindows() ? 'apidoc.cmd' : 'apidoc'
task apidocs(type: Exec, description: '执行生成apidoc文档操作') {
workingDir './'
def docCommand = [apidocCmd, '-o', './build/apidocs', '-f', 'java', '--debug', 'true']
commandLine docCommand
}
String servicedocCmd = isWindows() ? 'servicedoc.cmd' : 'servicedoc'
task servicedocs(type: Exec, description: '执行生成servicedoc文档操作') {
workingDir './'
def serviceCommand = [servicedocCmd, '-o', './build/servicedocs', '-f', 'java', '--debug', 'true']
commandLine serviceCommand
}