-
Notifications
You must be signed in to change notification settings - Fork 73
/
build.gradle
117 lines (98 loc) · 3.35 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
apply plugin: 'java-library'
apply plugin: 'com.vanniktech.maven.publish'
apply plugin: 'signing'
apply plugin: 'io.spring.dependency-management'
// 编译脚本
buildscript {
ext {
springBootVersion = "3.0.0"
jjwtVersion = "0.12.6"
}
// 仓库配置
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/spring' }
maven { url 'https://maven.aliyun.com/repository/google' }
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.29.0")
}
}
group = APP_GROUP
version = APP_VERSION
description = "kisso is a lightweight Java SSO Framework and reusable components."
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/spring' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://repo.spring.io/release' }
maven { url 'https://repo.spring.io/milestone' }
}
// 依赖管理
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
}
}
dependencies {
compileOnly("org.springframework.boot:spring-boot-starter-web")
compileOnly("org.springframework.boot:spring-boot-autoconfigure")
compileOnly("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
api("io.jsonwebtoken:jjwt-api:${jjwtVersion}")
api("io.jsonwebtoken:jjwt-impl:${jjwtVersion}")
api("io.jsonwebtoken:jjwt-jackson:${jjwtVersion}")
compileOnly("io.projectreactor:reactor-core")
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testAnnotationProcessor("org.projectlombok:lombok")
testCompileOnly("org.projectlombok:lombok")
testCompileOnly("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-starter-web")
testImplementation("org.slf4j:slf4j-log4j12:2.0.5")
testImplementation("org.junit.jupiter:junit-jupiter-engine")
testCompileOnly("org.junit.jupiter:junit-jupiter-engine")
}
tasks.named('test') {
useJUnitPlatform()
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:-serial"
options.encoding = 'UTF-8'
options.warnings = false
options.deprecation = true
options.compilerArgs += ["-parameters"]
}
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}
tasks.register('sourcesJar', Jar) {
dependsOn classes
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
options {
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
failOnError false
links "https://docs.oracle.com/javase/8/docs/api"
}
}
tasks.withType(MavenPublication).configureEach {
doFirst {
options.skipCertificateChecks = true
}
}
tasks.register('javadocJar', Jar) {
archiveClassifier = 'javadoc'
from javadoc
}