This repository has been archived by the owner on May 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
141 lines (119 loc) · 4.32 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
132
133
134
135
136
137
138
139
140
141
apply plugin: "java"
apply plugin: "maven"
apply plugin: "signing"
group = "org.embulk"
archivesBaseName = "${project.name}"
version = "0.3.3-SNAPSHOT"
description "Guice-bootstrap adds JSR 250 Life Cycle annotations to Google Guice"
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
javadoc {
options {
locale = 'en_US'
encoding = 'UTF-8'
}
}
dependencies {
compile 'com.google.inject:guice:4.2.0'
testCompile 'org.testng:testng:6.9.9'
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
test {
useTestNG()
}
jar {
from rootProject.file("LICENSE")
from rootProject.file("NOTICE")
}
// add tests/javadoc/source jar tasks as artifacts to be released
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
from rootProject.file("LICENSE")
from rootProject.file("NOTICE")
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
from rootProject.file("LICENSE")
from rootProject.file("NOTICE")
}
artifacts {
archives sourcesJar, javadocJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}
if (project.hasProperty("mavenCentral")) {
if (!(project.hasProperty("sonatype.userName") && project.hasProperty("sonatype.password"))) {
throw new GradleException("Set sonatype.userName and sonatype.password to upload to Maven Central.")
}
// Do not assign SNAPSHOTs a unique version comprised of the timestamp and build number.
uniqueVersion = project.findProperty("mavenUniqueVersion") ?: false
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: project.getProperty("sonatype.userName"),
password: project.getProperty("sonatype.password"))
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: project.getProperty("sonatype.userName"),
password: project.getProperty("sonatype.password"))
}
} else {
repository(url: "file:${project.buildDir}/mavenLocal")
snapshotRepository(url: "file:${project.buildDir}/mavenLocalSnapshot")
}
pom.project {
artifactId "${project.name}"
groupId "${project.group}"
packaging "jar"
name "${project.name}"
description "${project.description}"
url "http://guice.embulk.org/"
scm {
url "https://github.com/embulk/guice-bootstrap"
connection "scm:git:git://github.com/embulk/guice-bootstrap.git"
developerConnection "scm:git:git@github.com:embulk/guice-bootstrap.git"
}
issueManagement {
url 'https://github.com/embulk/guice-bootstrap/issues'
}
licenses {
license {
// http://central.sonatype.org/pages/requirements.html#license-information
name "The Apache License, Version 2.0"
url "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id "frsyuki"
name "Sadayuki Furuhashi"
email "frsyuki@gmail.com"
}
}
contributors {
contributor {
name "Dai MIKURUBE"
email "dmikurube@treasure-data.com"
roles {
role "maintainer"
}
}
}
}
}
}
}