-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathbuild.gradle
85 lines (75 loc) · 2.37 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group 'net.sargue'
archivesBaseName = 'mailgun'
version '2.0.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.glassfish.jersey.core:jersey-client:3.0.9'
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.0.9'
implementation 'org.glassfish.jersey.media:jersey-media-multipart:3.0.9'
testImplementation 'com.github.tomakehurst:wiremock:1.57'
testImplementation 'org.awaitility:awaitility:2.0.0'
testImplementation 'org.slf4j:slf4j-simple:1.7.21'
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'mailgun'
from components.java
pom {
name = 'Mailgun java library'
description = 'Library to send email messages from Java using the Mailgun service'
url = 'https://github.com/sargue/mailgun'
scm {
connection = 'scm:git:[email protected]:sargue/mailgun.git'
developerConnection = 'scm:git:[email protected]:sargue/mailgun.git'
url = 'https://github.com/sargue/mailgun'
}
licenses {
license {
name = 'The MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'sargue'
name = 'Sergi Baila'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}