-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
113 lines (104 loc) · 3.93 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
import java.text.SimpleDateFormat
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding('UTF-8')
withJavadocJar()
withSourcesJar()
}
group = 'io.github.amayaframework'
archivesBaseName = 'http-server'
version = System.getenv('RELEASE_VERSION') ?: '1.0.0'
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.35'
api group: 'io.github.amayaframework', name: 'http-utils', version: '1.1.1'
}
jar {
manifest {
var date = new Date()
var javaVersion = System.getProperty("java.version")
var vmVendor = System.getProperty("java.vm.vendor")
var vmVersion = System.getProperty("java.vm.version")
attributes(
'Created-By': String.format("%s (%s %s)", javaVersion, vmVendor, vmVersion),
'Gradle-Version': "Gradle $gradle.gradleVersion",
'Build-Date': new SimpleDateFormat("yyyy-MM-dd").format(date),
'Build-Time': new SimpleDateFormat("HH:mm:ss.SSSZ").format(date),
'Built-By': 'Roman Bakaldin',
'Bundle-Name': 'Sun Http Server',
'Bundle-Version': archiveVersion,
'Bundle-SymbolicName': archivesBaseName,
'Implementation-Title': archivesBaseName,
'Implementation-Vendor': 'github.com/amayaframework',
'Implementation-Version': archiveVersion,
'Specification-Title': archivesBaseName,
'Specification-Vendor': 'github.com/amayaframework',
'Specification-Version': archiveVersion
)
}
}
signing {
sign publishing.publications
}
publishing {
publications {
mavenJava(MavenPublication) {
// Specify artifacts
groupId = group
artifactId = archivesBaseName
version = version
from components.java
// Configure pom
pom {
name.set(archivesBaseName)
description.set('A repackaged and refactored sun http server, ' +
'created in the original form by Oracle and formerly embedded in the jdk. ' +
'Distributed under the GNU v2 license.')
url.set('https://github.com/AmayaFramework/sun-http-server')
organization {
name.set('io.github.amayaframework')
url.set('https://github.com/AmayaFramework')
}
issueManagement {
system.set('GitHub')
url.set('https://github.com/AmayaFramework/sun-http-server/issues')
}
licenses {
license {
name.set('GNU General Public License v2.0')
url.set('https://github.com/AmayaFramework/sun-http-server/blob/main/LICENSE')
}
}
scm {
url.set('https://github.com/AmayaFramework/sun-http-server')
connection.set('scm:https://github.com/AmayaFramework/sun-http-server.git')
developerConnection.set('scm:https://github.com/AmayaFramework/sun-http-server.git')
}
developers {
developer {
id.set('RomanQed')
name.set('Roman Bakaldin')
email.set('gbakaldin@gmail.com')
}
}
}
}
}
repositories {
maven {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username System.getenv('SONATYPE_USERNAME')
password System.getenv('SONATYPE_PASSWORD')
}
}
}
}