-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
136 lines (122 loc) · 3.86 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
plugins {
id 'java-library'
id 'signing'
id 'idea'
id 'maven-publish'
id 'io.freefair.lombok' version '8.6'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
repositories {
mavenCentral()
}
group = 'org.chronos-eaas'
archivesBaseName = 'chronos-agent'
version = '2.5.1-SNAPSHOT'
description = 'Chronos Agent'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
dependencies {
implementation group: 'com.konghq', name: 'unirest-java-core', version: '4.4.4' // MIT
implementation group: 'com.konghq', name: 'unirest-object-mappers-gson', version: '4.2.9' // MIT
implementation group: 'commons-validator', name: 'commons-validator', version: '1.9.0' // Apache 2.0
implementation group: 'commons-net', name: 'commons-net', version: '3.11.1' // Apache 2.0
implementation group: 'commons-io', name: 'commons-io', version: '2.16.1' // Apache 2.0
implementation group: 'net.lingala.zip4j', name: 'zip4j', version: '2.11.5' // Apache 2.0
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.13' // MIT
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
jar {
manifest {
attributes(
'Manifest-Version': '1.0',
'Copyright': 'The Chronos Project',
'Group': project.group,
'Name': project.name,
'Version': project.version
)
}
dependsOn shadowJar
}
shadowJar {
archiveClassifier.set('shadow')
manifest {
attributes(
'Manifest-Version': '1.0',
'Copyright': 'The Chronos Project',
'Group': project.group,
'Name': project.name,
'Version': project.version
)
}
}
javadoc {
failOnError = false
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name.set('Chronos Agent')
description.set('Reference implementation of a Chronos Agent.')
url.set('https://chronos-eaas.org/')
licenses {
license {
name.set('MIT License')
url.set('https://opensource.org/licenses/MIT')
}
}
scm {
url.set('https://github.com/Chronos-EaaS/Chronos-Agent/')
}
developers {
developer {
id.set('chronos')
name.set('Chronos')
email.set('[email protected]')
}
}
}
}
}
repositories {
maven {
name = "OSSRH"
url = uri(version.endsWith('SNAPSHOT') ?
"https://s01.oss.sonatype.org/content/repositories/snapshots/" :
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/chronos-eaas/chronos-agent")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
signing {
required { gradle.taskGraph.hasTask("publish") }
useInMemoryPgpKeys(findProperty("signingKey"), findProperty("signingPassword"))
sign(publishing.publications["mavenJava"])
}
idea {
module {
downloadJavadoc = true
downloadSources = true
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main")
testOutputDir = file("$buildDir/classes/test")
}
}