-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
100 lines (85 loc) · 2.6 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'tech.yanand.maven-central-publish' version '1.1.0'
}
group = 'tech.yanand'
version = '1.0.0'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework:spring-context:6.1.8'
implementation 'org.springframework:spring-web:6.1.8'
implementation 'org.slf4j:slf4j-api:2.0.13'
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.2.6'
testImplementation 'jakarta.servlet:jakarta.servlet-api:6.1.0-M2'
}
java {
sourceCompatibility = '17'
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Flying Cache'
description = 'Spring cache extension for request and thread scoped'
url = 'https://github.com/yananhub/flying-cache'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'yananhub'
name = 'Richard Zhang'
email = 'yanandwy@163.com'
}
}
scm {
connection = 'scm:git:https://github.com/yananhub/flying-cache.git'
developerConnection = 'scm:git:https://github.com/yananhub/flying-cache.git'
url = 'https://github.com/yananhub/flying-cache'
}
}
}
}
repositories {
maven {
name = "Local"
url = layout.buildDirectory.dir('repos/bundles')
}
}
}
signing {
if (System.getenv('SIGNING_KEY')) {
def signingKey = System.getenv('SIGNING_KEY').replace('\\n', '\n')
def signingPassword = System.getenv('SIGNING_PASSWORD')
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
}
javadoc {
options.addBooleanOption('html5', true)
}
mavenCentral {
repoDir = layout.buildDirectory.dir('repos/bundles')
authToken = System.getenv('MAVEN_UPLOAD_TOKEN')
}