-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
129 lines (108 loc) · 3.81 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
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
import com.jfrog.bintray.gradle.BintrayExtension
plugins {
`java-library`
/*
* The Maven Publish Plugin provides the ability to publish build artifacts to an Apache Maven repository
* Docs: https://docs.gradle.org/current/userguide/publishing_maven.html
*/
id("maven-publish")
/*
* The Signing Plugin adds the ability to digitally sign built files and artifacts
* Docs: https://docs.gradle.org/current/userguide/signing_plugin.html
*/
id("signing")
id("io.freefair.lombok") version "3.2.0"
id("com.jfrog.bintray") version "1.8.4"
}
group = "com.trustedchoice"
version = "3.0.4"
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
lombok {
config.put("lombok.addLombokGeneratedAnnotation", "true")
}
tasks.register<Jar>("sourcesJar") {
dependsOn(JavaPlugin.CLASSES_TASK_NAME)
from(sourceSets.main.get().allJava)
archiveClassifier.set("sources")
}
tasks.register<Jar>("javadocJar") {
dependsOn(JavaPlugin.JAVADOC_TASK_NAME)
from(tasks["javadoc"])
archiveClassifier.set("javadoc")
}
// add licensing information to all artifacts
tasks.withType<Jar> {
from(project.rootProject.projectDir) {
include("LICENSE")
into("META-INF")
}
}
publishing {
repositories {
mavenLocal()
maven {
name = "SonaTypeOSSRH"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
credentials {
username = project.findProperty("ossrhUsername") as String
password = project.findProperty("ossrhPassword") as String
}
}
}
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(tasks["sourcesJar"])
artifact(tasks["javadocJar"])
if (project.hasProperty("signing.keyId")) {
signing {
sign(publishing.publications["mavenJava"])
}
}
//Complying with pom requirements for maven central
pom {
name.set("ask-kodiak-sdk")
description.set("The Ask Kodiak Java SDK is a straightforward Java implementation of the Ask Kodiak API for JVM environments.")
url.set("https://github.com/trustedchoice/ask-kodiak-sdk")
licenses {
license {
name.set("MIT License")
url.set("http://www.opensource.org/licenses/mit-license.php")
distribution.set("repo")
}
developers {
developer {
id.set("aweigold")
name.set("Adam J. Weigold")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/trustedchoice/ask-kodiak-sdk")
}
}
}
}
}
}
val jacksonVersion = "2.9.8"
val feignVersion = "11.1"
val slf4jVersion = "1.7.26"
dependencies {
api("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
api("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
api("io.github.openfeign:feign-core:$feignVersion")
api("io.github.openfeign:feign-jackson:$feignVersion")
api("io.github.openfeign:feign-slf4j:$feignVersion")
api("org.slf4j:slf4j-api:$slf4jVersion")
compileOnly("org.projectlombok:lombok:1.18.6")
annotationProcessor("org.projectlombok:lombok:1.18.6")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.4.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.4.0")
testImplementation("ch.qos.logback:logback-classic:1.2.3")
}