-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
89 lines (77 loc) · 2.6 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
version = "1.3.2"
group = "com.path-variable"
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
implementation 'ch.qos.logback:logback-classic:1.2.11'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.6.1'
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = "sources"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
archiveClassifier = 'javadoc'
}
publishing {
publications {
maven(MavenPublication) {
groupId = group
artifactId = project.name
version = version
from components.java
artifact sourceJar
artifact javadocJar
pom {
name = "Commons Library"
description = "A libary including some functionality shared across Path Variable projects"
url = "https://github.com/isaric/commons-lib"
licenses {
license {
name = 'MIT License'
url = 'https://github.com/isaric/commons-lib/blob/main/LICENSE.txt'
}
}
developers {
developer {
id = 'isaric'
name = 'Ivan Saric'
email = 'ivan@path-variable.com'
organization = 'Path Variable'
organizationUrl = 'https://www.path-variable.com'
}
}
scm {
connection = 'scm:git:git://github.com/isaric/commons-lib.git'
developerConnection = 'scm:git:ssh://github.com/isaric/commons-lib.git'
url = 'https://github.com/isaric/commons-lib'
}
}
}
}
repositories {
maven {
name = "MavenCentral"
url = project.version.contains("-SNAPSHOT") ?
"https://s01.oss.sonatype.org/content/repositories/snapshots/" :
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = property("mc.user")
password = property("mc.pass")
}
}
}
signing {
useGpgCmd()
sign publishing.publications.maven
}
}