This repository has been archived by the owner on Sep 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
91 lines (74 loc) · 2.33 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
apply plugin: 'java'
apply plugin: 'maven'
group = 'com.trunk.rx.jdbc'
def baseVersion = '1.5.6'
description = 'Functional access to JDBC using RxJava'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
configure(subprojects) {
repositories {
mavenCentral()
jcenter()
maven { url 'https://oss.jfrog.org/libs-snapshot' }
maven {
credentials{
username bintrayUser
password bintrayApiKey
}
url 'http://dl.bintray.com/trunkplatform/trunk-java-oss'
}
}
apply plugin: 'java'
apply plugin: 'maven-publish'
group 'com.trunk.rx.jdbc'
version = baseVersion
sourceCompatibility = 1.8
dependencies {
compile 'io.reactivex:rxjava:1.1.0'
compile 'org.slf4j:slf4j-api:1.7.19'
testCompile 'org.testng:testng:6.8'
testCompile 'org.mockito:mockito-core:2.0.40-beta'
testCompile 'org.liquibase:liquibase-core:3.4.2'
testCompile 'com.h2database:h2:1.4.191'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'io.reactivex:rxjava-debug:1.0.3'
}
test {
beforeTest { descriptor ->
logger.lifecycle("Running: " + descriptor)
}
}
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"
}
}
}
}
}