-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.gradle
111 lines (93 loc) · 3.19 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
static def isSnapshot(version) {
return version.contains("SNAPSHOT")
}
static def getRepositoryUrl(version) {
if (isSnapshot(version)) {
return 'https://oss.sonatype.org/content/repositories/snapshots'
}
return 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
ext {
gsonVersion = '2.10.1'
okhttpVersion = '4.11.0'
ursaVersion = '1.3.1'
}
sourceCompatibility = '1.17'
targetCompatibility = '1.17'
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
implementation 'com.google.guava:guava:31.1-jre'
implementation 'org.slf4j:slf4j-api:1.7.36'
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.7.3'
}
group = 'io.contek.invoker'
version = '3.6.19'
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
}
task javadocJar(type: Jar) {
from javadoc
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
archiveClassifier.set('javadoc')
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "invoker-${project.name}"
from components.java
artifact sourcesJar
artifact javadocJar
pom {
afterEvaluate {
name = project.description
description = project.description
}
url = 'https://github.com/contek-io/io.contek.invoker'
scm {
connection = 'scm:git:git://github.com/contek-io/io.contek.invoker.git'
developerConnection = 'scm:git:ssh://github.com/contek-io/io.contek.invoker.git'
url = 'http://github.com/contek-io/io.contek.invoker/tree/master'
}
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'contek'
name = 'Dev Contek'
email = '[email protected]'
organization = 'Contek'
organizationUrl = 'https://contek.io'
}
}
}
}
}
repositories {
maven {
url = getRepositoryUrl(version)
credentials {
username = project.hasProperty('sonatypeUsername') ? sonatypeUsername : ''
password = project.hasProperty('sonatypePassword') ? sonatypePassword : ''
}
}
}
}
signing {
required { !isSnapshot(version) }
sign publishing.publications.mavenJava
}
}