-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
106 lines (89 loc) · 2.75 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
ext {
javaVersion = JavaVersion.VERSION_17
pac4jVersion = "6.0.3"
springBootVersion = "3.1.12"
shiroVersion = "1.9.0"
togglzVersion = "4.4.0"
}
allprojects {
group = "com.baomidou"
version = "2.0.0-SNAPSHOT"
repositories {
mavenLocal()
maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }
// mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
description = "基于 pac4j-jwt 的 WEB 安全组件"
subprojects {
apply plugin: 'java-library'
apply plugin: 'io.freefair.lombok'
apply plugin: 'com.github.hierynomus.license'
java {
sourceCompatibility = "${javaVersion}"
targetCompatibility = "${javaVersion}"
}
lombok {
version = "1.18.32"
}
dependencies {
implementation(platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}"))
annotationProcessor(platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}"))
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("ch.qos.logback:logback-classic")
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.warnings = false
options.deprecation = true
options.compilerArgs += ["-parameters"]
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
license {
encoding = "UTF-8"
header = rootProject.file("license.txt")
include "**/*.java"
exclude "**/test/**/*.java"
exclude "**/*Test.java"
mapping "java", "SLASHSTAR_STYLE"
ext.year = Calendar.getInstance().get(Calendar.YEAR)
}
//noinspection GroovyAssignabilityCheck
task sourcesJar(type: Jar) {
archiveClassifier = "sources"
from sourceSets.main.allJava
}
tasks.clean {
delete "${projectDir}/build"
delete "${projectDir}/out"
}
javadoc {
afterEvaluate {
configure(options) {
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
failOnError false
links "http://docs.oracle.com/javase/8/docs/api"
}
}
}
task javadocJar(type: Jar) {
archiveClassifier = "javadoc"
from javadoc
}
test {
useJUnitPlatform()
}
tasks.whenTaskAdded { task ->
if (task.name.contains('signMavenJavaPublication')) {
task.enabled = new File(project.property('signing.secretKeyRingFile') as String).isFile()
}
}
}