-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (95 loc) · 3.01 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
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: "jacoco"
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
version = "2.0.0"
compileJava {
options.deprecation = true
}
configurations {
deployerJars
}
repositories {
mavenCentral()
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}
/**
* Set the credentials from ENV variables.
*/
def repoUserName = System.getenv("SONATYPE_USER")
def repoPassword = System.getenv("SONATYPE_PASSWORD")
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
archives javadocJar
}
signing {
sign configurations.archives
}
dependencies {
compile 'org.assertj:assertj-core:2.2.0'
compile 'org.slf4j:slf4j-api:1.7.5'
compile 'io.reactivex.rxjava2:rxjava:2.0.0'
testCompile "org.codehaus.groovy:groovy-all:2.4.4"
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile "org.mockito:mockito-core:1.10.19"
testCompile 'junit:junit:4.11'
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: "${repoUserName}", password: "${repoPassword}")
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: "${repoUserName}", password: "${repoPassword}")
}
configuration = configurations.deployerJars
pom.project {
name 'RxTestkit'
packaging 'jar'
description 'AssertJ for RxJava'
url 'http://hyleung.github.io/rx-testkit/'
scm {
url "https://github.com/hyleung/rx-testkit.git";
connection "scm:git:git://github.com/hyleung/rx-testkit.git";
developerConnection "scm:git:git@github.com:hyleung/rx-testkit.git";
}
developers {
developer {
id "hyleung";
name "Ho Yan Leung";
email "hy.leung@gmail.com";
}
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
pom.groupId = 'com.github.hyleung'
pom.artifactId = 'rx-testkit-java'
}
}
}