This repository was archived by the owner on Sep 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
84 lines (68 loc) · 2.05 KB
/
build.gradle
File metadata and controls
84 lines (68 loc) · 2.05 KB
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
apply plugin: 'java'
apply plugin: 'maven'
group = 'com.trunk.rx.json'
def baseVersion = '0.9.0'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
configure(subprojects) {
repositories {
mavenCentral()
jcenter()
maven { url 'https://oss.jfrog.org/libs-snapshot' }
}
apply plugin: 'java'
apply plugin: 'maven-publish'
group 'com.trunk.rx.json'
version = baseVersion
sourceCompatibility = 1.8
dependencies {
compile 'io.reactivex:rxjava:1.2.6'
compile 'org.slf4j:slf4j-api:1.7.19'
testCompile 'org.testng:testng:6.8'
testCompile 'org.slf4j:slf4j-simple:1.7.19'
}
test {
beforeTest { descriptor ->
logger.lifecycle("Running: " + descriptor)
}
}
test {
useTestNG()
systemProperty("io.netty.leakDetectionLevel", "paranoid")
systemProperty("io.LEVEL", "DEBUG")
systemProperty("rx.LEVEL", "DEBUG")
}
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
}
publishing {
publications {
mavenJava(MavenPublication) {
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
}
}