-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
114 lines (97 loc) · 3.46 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
plugins {
id 'groovy'
id 'signing'
id 'maven-publish'
}
group 'io.github.segment11'
version '1.2-SNAPSHOT'
def String artifactId = 'segmentweb'
repositories {
// maven {
// url 'http://maven.aliyun.com/nexus/content/groups/public/'
// }
mavenCentral()
}
sourceSets {
main {
groovy {
srcDirs = ['src']
}
}
test {
groovy {
srcDirs = ['test']
}
}
}
sourceCompatibility = 17
targetCompatibility = 17
compileGroovy {
groovyOptions.configurationScript = file("config.groovy")
}
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation group: 'org.apache.groovy', name: 'groovy', version: '4.0.12'
implementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.49.v20220914'
implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.49.v20220914'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.14.1'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.14.1'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.1'
implementation group: 'io.prometheus', name: 'simpleclient', version: '0.15.0'
implementation group: 'io.prometheus', name: 'simpleclient_hotspot', version: '0.15.0'
testImplementation group: 'org.spockframework', name: 'spock-core', version: '2.3-groovy-4.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.20.0'
testImplementation group: 'com.github.kevinsawicki', name: 'http-request', version: '6.0'
}
test {
useJUnitPlatform()
}
def ossReleaseUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2'
def ossSnapshotUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots'
//ossSnapshotUrl = ossReleaseUrl
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = name
groupId = group
version = version
pom {
name = 'segmentweb'
description = 'A macro groovy web framework inspired by sparkjava.'
url = 'https://github.com/segment11/segmentweb'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'segment11'
name = 'Yong Ding'
email = 'dingyong87@163.com'
}
}
}
}
}
repositories {
maven {
name = 'ossrh'
url = version.toString().endsWith('SNAPSHOT') ? ossSnapshotUrl : ossReleaseUrl
credentials {
username = System.getProperty('ossrh.username')
password = System.getProperty('ossrh.password')
}
}
}
}
signing {
sign publishing.publications.mavenJava
}