forked from ReactiveX/RxJavaFX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
167 lines (140 loc) · 4.31 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.5.2"
}
}
apply plugin: "java"
apply plugin: "maven"
apply plugin: "maven-publish"
apply plugin: "com.jfrog.bintray"
apply plugin: "com.jfrog.artifactory"
group = GROUP
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
boolean isReleaseBuild = gradle.startParameter.taskNames.contains('bintrayUpload')
version = isReleaseBuild ? VERSION_NAME : "$VERSION_NAME-SNAPSHOT"
logger.info("RxJavaFX using version=$project.version")
def currentOS = org.gradle.internal.os.OperatingSystem.current()
def platform
if (currentOS.isWindows()) {
platform = 'win'
} else if (currentOS.isLinux()) {
platform = 'linux'
} else if (currentOS.isMacOsX()) {
platform = 'mac'
}
repositories {
mavenCentral()
}
dependencies {
compile 'io.reactivex.rxjava2:rxjava:2.2.4'
compile "org.openjfx:javafx-base:11:${platform}"
compile "org.openjfx:javafx-graphics:11:${platform}"
compile "org.openjfx:javafx-controls:11:${platform}"
testCompile 'junit:junit-dep:4.11'
testCompile 'org.mockito:mockito-core:1.8.5'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.10.2' //version required
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath
options
{
setMemberLevel JavadocMemberLevel.PUBLIC
setAuthor true
links "https://docs.oracle.com/javase/8/docs/api/"
}
}
task packageJavadoc(type: Jar) {
from javadoc
classifier = 'javadoc'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact packageJavadoc
groupId GROUP
version VERSION_NAME
artifactId ARTIFACT_ID
pom {
name = POM_NAME
description = POM_DESCRIPTION
url = POM_URL
licenses {
license {
name = POM_LICENCE_NAME
url = POM_SCM_URL
distribution = POM_LICENCE_DIST
}
}
developers {
developer {
id = "thomasnield"
name = "Thomas Nield"
email = "[email protected]"
organization = "ReactiveX"
organizationUrl = "http://reactivex.io/"
}
}
scm {
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEV_CONNECTION
url = "scm:git:[email protected]:ReactiveX/RxJavaFX.git"
}
issueManagement {
system = "github"
url = "https://github.com/ReactiveX/RxJavaFX/issues"
}
}
}
}
}
bintray {
configurations = ['archives']
publish = true
pkg {
repo = 'RxJava'
name = 'RxJavaFX'
userOrg = 'reactivex'
licenses = ['Apache-2.0']
labels = ['rxjava', 'reactivex']
websiteUrl = 'https://github.com/ReactiveX/RxJavaFX/'
issueTrackerUrl = 'https://github.com/ReactiveX/RxJavaFX/issues'
vcsUrl = "https://github.com/ReactiveX/RxJavaFX.git"
version {
name = VERSION_NAME
vcsTag = VERSION_NAME
gpg {
sign = true
}
mavenCentralSync {
sync = true
user = rootProject.sonatypeUsername
password = rootProject.sonatypePassword
name = POM_NAME
description = POM_DESCRIPTION
close = "1"
}
}
}
}
if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
bintray.user = project.bintrayUser
bintray.key = project.bintrayKey
}