-
Notifications
You must be signed in to change notification settings - Fork 163
/
build.gradle
126 lines (108 loc) · 4.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
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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
// 'eclipse' plugin is used to generate native project files for Eclipse
// from this Gradle script - for those who don't have Gradle plugin installed in Eclipse
apply plugin: 'eclipse'
group = 'com.taskadapter'
version = '4.0.0.rc5-SNAPSHOT'
sourceCompatibility = 11
targetCompatibility = 11
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// turn off strict Javadoc checks in Java8 that break the build.
// http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
// you could say that it is better to fix all Javadoc issues instead, but
// they don't seem important enough to justify this.
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile ('org.apache.httpcomponents:httpclient:4.5.6',
'org.json:json:20190722',
'org.slf4j:slf4j-api:1.7.25')
testCompile(
'junit:junit:4.12',
'org.assertj:assertj-core:3.2.0',
'org.slf4j:slf4j-jdk14:1.7.25'
)
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
// A PGP key is required to sign the artifacts before uploading to OSS Sonatype Maven repository.
// Put the PGP key info in your <home>/.gradle/gradle.properties file:
// signing.keyId=...
// signing.password=...
// signing.secretKeyRingFile=c:/Users/ask/.gnupg/secring.gpg
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
// password can be set in gradle.properties or environment variable (check "build environment" on Jenkins)
// typically you set "ossUser" and "ossPassword" properties in your <home>/.gradle/gradle.properties file,
// standard properties file format: "ossUser=myOssUser", etc.
def ossUserVar = hasProperty("ossUser") ? ossUser : ""
def ossPasswordVar = hasProperty("ossPassword") ? ossPassword : ""
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') {
authentication(userName: ossUserVar, password: ossPasswordVar)
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots') {
authentication(userName: ossUserVar, password: ossPasswordVar)
}
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
pom.project {
name 'Redmine Java API'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
url 'http://github.com/taskadapter/redmine-java-api'
description 'Free open-source Java API for Redmine and Chiliproject bug/task management systems.' +
'This project was originally a part of Task Adapter application (http://www.taskadapter.com)'
developers {
developer {
name 'Alexey Skorokhodov'
email '[email protected]'
}
}
scm {
connection 'scm:git:git://github.com/taskadapter/redmine-java-api.git'
// "developerConnection" is required for Maven Release plugin.
developerConnection 'scm:git:[email protected]:taskadapter/redmine-java-api.git'
tag 'HEAD'
// A publicly browsable repository. For example, via ViewCVS
url 'http://github.com/taskadapter/redmine-java-api/tree/master/'
}
issueManagement {
system 'github'
url 'http://github.com/taskadapter/redmine-java-api/issues'
}
}
}
}
}
task packageSources(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
classifier = 'javadoc'
}
artifacts {
archives packageSources, packageJavadoc
}