-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
83 lines (74 loc) · 1.82 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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
group = 'hu.ssh'
version = '0.1.0'
compileJava.options.encoding = 'UTF-8'
repositories {
mavenCentral()
}
dependencies {
compile group: 'com.google.guava', name: 'guava', version: '19.0'
testCompile group: 'org.testng', name: 'testng', version: '6.9.10'
}
test {
useTestNG() {
suites 'testng.xml'
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
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 = System.getenv("NEXUS_USER")
password = System.getenv("NEXUS_PASSWORD")
}
}
}
publications {
maven(MavenPublication) {
from components.java
pom {
name = "$groupId:$artifactId"
description = 'A simple console progressbar for Java'
url = 'https://github.com/raszi/java-progressbar'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
distribution = 'repo'
}
}
developers {
developer {
id = 'raszi'
name = 'Istvan Karaszi'
email = 'github@spam.raszi.hu'
url = 'https://github.com/raszi'
}
}
scm {
connection = 'scm:git:git://github.com/raszi/java-progressbar.git'
developerConnection = 'scm:git:ssh://github.com/raszi/java-progressbar.git'
url = 'https://github.com/raszi/java-progressbar'
}
}
}
}
}
signing {
sign publishing.publications.maven
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}