-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
109 lines (97 loc) · 3.2 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group 'io.timeandspace'
version '0.2-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.jetbrains:annotations:18.0.0'
compileOnly 'com.google.errorprone:error_prone_annotations:2.3.4'
compileOnly 'net.jcip:jcip-annotations:1.0'
testImplementation 'com.google.guava:guava:28.2-jre'
testImplementation 'org.junit.vintage:junit-vintage-engine:5.5.2'
testImplementation 'org.assertj:assertj-core:3.14.0'
testImplementation 'org.awaitility:awaitility:4.0.2'
}
test {
useJUnitPlatform()
}
javadoc {
options {
links 'https://docs.oracle.com/javase/8/docs/api/'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
classifier 'javadoc'
from javadoc
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'cron-scheduler'
artifact sourcesJar
artifact javadocJar
pom {
name = 'CronScheduler'
inceptionYear = '2020'
description = 'Alternative to ScheduledThreadPoolExecutor proof against ' +
'the clock drift problem'
url = 'https://github.com/TimeAndSpaceIO/CronScheduler'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
scm {
url = 'https://github.com/TimeAndSpaceIO/CronScheduler'
connection = 'scm:git:git://github.com/TimeAndSpaceIO/CronScheduler.git'
developerConnection = 'scm:git:ssh://github.com/TimeAndSpaceIO/CronScheduler.git'
}
developers {
developer {
id = 'leventov'
name = 'Roman Leventov'
email = 'leventov.ru@gmail.com'
url = 'https://timeandspace.io'
}
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/TimeAndSpaceIO/CronScheduler/issues'
}
}
}
}
ext {
if (!project.hasProperty('sonatypeUrl'))
sonatypeUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
if (!project.hasProperty('sonatypeUsername')) sonatypeUsername = ''
if (!project.hasProperty('sonatypePassword')) sonatypePassword = ''
}
repositories {
maven {
url = sonatypeUrl
credentials {
username = sonatypeUsername
password = sonatypePassword
}
}
}
ext.isReleaseVersion = !version.endsWith('SNAPSHOT')
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask('publish') }
sign publishing.publications.mavenJava
}
}