-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.gradle
110 lines (96 loc) · 3.31 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
buildscript {
repositories {
mavenCentral()
}
ext.scalatestVersion = '3.2.17'
}
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id 'scala'
id "com.github.maiflai.scalatest" version "0.32"
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.fasterxml.jackson.core:jackson-core:2.18.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.0'
implementation 'com.opencsv:opencsv:5.9'
implementation 'commons-cli:commons-cli:1.9.0'
testImplementation "org.scala-lang:scala3-compiler_3:3.5.2"
testImplementation "org.scalatest:scalatest_3:$scalatestVersion"
testImplementation "org.scalatest:scalatest-wordspec_3:$scalatestVersion"
testImplementation "org.scalatest:scalatest-shouldmatchers_3:$scalatestVersion"
// Needed for scalatest as mentioned in https://github.com/scalatest/scalatest/issues/1736
testRuntimeOnly("com.vladsch.flexmark:flexmark-all:0.62.2")
}
group = 'com.sumologic.api.client'
version = '2.13-SNAPSHOT'
description = 'Sumo Logic Java Client Library'
java.sourceCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
ext.gitCommitIdAbbrev = System.getenv('GIT_COMMIT_ID_ABBREV') ?: 'git rev-parse --verify --short=12 HEAD'.execute().text.trim()
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from(sourceSets.main.allJava) {
expand(project: [version: project.version], git: [commit: [id: [abbrev: gitCommitIdAbbrev]]])
}
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier.set('javadoc')
}
publishing {
publications {
maven(MavenPublication) {
groupId(project.group)
artifactId(project.name)
version(project.version)
pom {
name = project.name
description = project.description
url = 'https://github.com/SumoLogic/sumo-java-client'
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'jacek'
name = 'Jacek Migdal'
organization = 'Sumo Logic'
}
}
scm {
connection = 'scm:git:[email protected]:SumoLogic/sumo-java-client.git'
developerConnection = 'scm:git:[email protected]:SumoLogic/sumo-java-client.git'
url = 'https://github.com/SumoLogic/sumo-java-client'
tag = 'HEAD'
}
}
from(components.java)
artifact(sourcesJar)
artifact(javadocJar)
}
}
repositories {
maven {
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username project.findProperty("nexus_username") ?: ""
password project.findProperty("nexus_password") ?: ""
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.maven
}