-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
78 lines (66 loc) · 1.71 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
plugins {
id "java-library"
id "maven-publish"
id "com.timgroup.jarmangit" version "1.1.86"
}
ext {
buildNumber = System.getenv("BUILD_NUMBER")
}
group = "com.youdevise"
if (buildNumber) version = "1.0.$buildNumber"
dependencies {
implementation "org.hamcrest:hamcrest-integration:1.2"
testImplementation "org.jmock:jmock:2.5.1"
testImplementation "org.jmock:jmock-junit4:2.5.1"
testImplementation "junit:junit:4.12"
}
tasks.withType(Jar).all {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'TIM Group Ltd'
)
}
}
tasks.withType(JavaCompile).all {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.encoding = "UTF-8"
options.deprecation = true
options.compilerArgs << "-parameters"
options.compilerArgs << "-Xlint:unchecked"
}
repositories {
maven {
url = "$repoUrl/groups/public"
}
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
assemble.dependsOn(sourcesJar)
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
assemble.dependsOn(javadocJar)
publishing {
repositories {
maven {
url = "$repoUrl/repositories/yd-release-candidates"
credentials {
username = project.repoUsername
password = project.repoPassword
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
artifact(sourcesJar)
artifact(javadocJar)
}
}
}