-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathbuild.gradle
152 lines (128 loc) · 4.17 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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'java-library'
id 'eclipse'
id 'biz.aQute.bnd.builder' version '5.3.0' // OSGi
// OSGi bundle is configured through the bnd.bnd file
id 'maven-publish'
id 'signing'
}
version = '0.7.4-SNAPSHOT'
repositories {
mavenCentral()
}
sourceCompatibility = '1.9'
targetCompatibility = '1.9'
group = 'org.fxmisc.flowless'
project.archivesBaseName = 'flowless'
dependencies {
implementation 'org.reactfx:reactfx:2.0-M5'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation "org.testfx:testfx-core:4.0.11-alpha"
testImplementation ("org.testfx:testfx-junit:4.0.11-alpha") {
exclude(group: "junit", module: "junit")
}
testImplementation "org.testfx:openjfx-monocle:8u76-b04"
}
jar {
manifest {
attributes(
'Automatic-Module-Name': 'org.fxmisc.flowless'
)
}
}
javadoc {
// ignore missing Javadoc comments or tags
options.addStringOption('Xdoclint:all,-missing', '-quiet')
// support for JavaFX properties
options.addBooleanOption('javafx', true)
options.links = [
// resolve links to Java and JavaFX Javadocs
'http://docs.oracle.com/javase/9/docs/api/',
'http://docs.oracle.com/javase/9/javafx/api/',
// resolve links to ReactFX
'https://www.javadoc.io/doc/org.reactfx/reactfx/2.0-M5/'
]
}
task fatJar(type: Jar, dependsOn: classes) {
archiveAppendix = 'fat'
manifest.attributes( 'Automatic-Module-Name': 'org.fxmisc.flowless' )
from sourceSets.main.output
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
def doUploadArchives = project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')
publish.onlyIf { doUploadArchives }
if(doUploadArchives) {
publishing {
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = "${sonatypeUsername}"
password = "${sonatypePassword}"
}
}
}
publications {
flowless(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'flowless'
packaging = 'jar'
description = 'Efficient VirtualFlow for JavaFX.'
url = 'https://github.com/FXMisc/Flowless/#flowless'
scm {
url = 'scm:[email protected]:FXMisc/flowless.git'
connection = 'scm:[email protected]:FXMisc/Flowless.git'
developerConnection = 'scm:[email protected]:FXMisc/Flowless.git'
}
licenses {
license {
name = 'The BSD 2-Clause License'
url = 'http://opensource.org/licenses/BSD-2-Clause'
distribution = 'repo'
}
}
developers {
developer {
name = 'Tomas Mikula'
}
developer {
name = 'Jordan Martinez'
}
}
}
}
}
}
signing {
sign publishing.publications.flowless
}
}
assemble.dependsOn fatJar
task getVersion {
doLast {
println version
}
}