forked from tomaszstaniewicz/jira-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
68 lines (57 loc) · 1.79 KB
/
build.gradle.kts
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
plugins {
id("java")
id("maven-publish")
}
group = "com.symentis"
version = if (project.hasProperty("github_release_version")) {
// releases are triggered manually by creating a GitHub release
// the release triggers `release.yaml` GH action which sets the `github_release_version` property
project.property("github_release_version") as String
} else {
"0.7.5-SNAPSHOT"
}
println("Version: $version")
// This is a sanity check, don't remove
if (!project.hasProperty("github_release_version") && !version.toString().endsWith("-SNAPSHOT")) {
error("github_release_version is not set and version does not end with -SNAPSHOT")
}
description = "A simple JIRA REST client"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.apache.httpcomponents:httpclient:4.5.10")
implementation("org.apache.httpcomponents:httpmime:4.5.10")
implementation("org.apache.commons:commons-lang3:3.8")
implementation("net.sf.json-lib:json-lib:2.4:jdk15")
implementation("joda-time:joda-time:2.3")
implementation("org.scribe:scribe:1.3.7")
testImplementation("junit:junit:4.12")
testImplementation("org.powermock:powermock-module-junit4:1.6.3")
testImplementation("org.powermock:powermock-api-mockito:1.6.3")
testImplementation("org.codehaus.groovy:groovy-all:2.4.6")
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories {
maven {
name = "GithubPackages"
url = uri("https://maven.pkg.github.com/symentis/jira-client")
credentials(PasswordCredentials::class) {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}