-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
131 lines (108 loc) · 3.47 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
buildscript {
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
dependencies {
classpath "nu.studer:gradle-credentials-plugin:1.0.1"
}
}
group = "io.tronalddump"
ext {
hamcrestVersion = "1.3"
jsonVersion = "20160810"
junitVersion = "4.12"
}
apply plugin: "java"
apply plugin: "idea"
apply plugin: "maven"
apply plugin: "signing"
apply plugin: "nu.studer.credentials"
ext."signing.keyId" = credentials.signingKeyId
ext."signing.password" = credentials.signingPassword
ext."signing.secretKeyRingFile" = credentials.signingSecretKeyRingFile
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
dependencies {
compile "org.json:json:${jsonVersion}"
testCompile "junit:junit:${junitVersion}"
testCompile "org.hamcrest:hamcrest-library:${hamcrestVersion}"
}
jar {
manifest.attributes["Created-By"] = "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
manifest.attributes["Implementation-Title"] = project.name
manifest.attributes["Implementation-Version"] = project.version
}
javadoc {
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
options.addStringOption("Xdoclint:none", "-quiet")
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: credentials.ossrhUsername, password: credentials.ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: credentials.ossrhUsername, password: credentials.ossrhPassword)
}
pom.project {
name "tronalddump.io client-java"
packaging "jar"
description "tronalddump.io api client library for java"
url "https://github.com/tronalddump-io/client-java"
scm {
connection "scm:git@github.com/tronalddump-io/client-java.git"
developerConnection "scm:git@github.com:tronalddump-io/client-java.git"
url "https://github.com/tronalddump-io/client-java"
}
licenses {
license {
name "The Apache License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id "marceloverdijk"
name "Marcel Overdijk"
email "marcel@overdijk.me"
}
}
}
}
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
task wrapper(type: Wrapper) {
description = "Generates gradlew[.bat] scripts."
gradleVersion = "3.2.1"
}