forked from JFXtras/jfxtras-labs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
70 lines (60 loc) · 1.79 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'eclipse'
apply plugin: 'idea'
buildscript {
final javafxHome = System.env['JAVAFX_HOME']
if (javafxHome) {
ext.javafxJar = "${javafxHome}/rt/lib/jfxrt.jar"
} else {
final javaHome = System.env['JAVA_HOME']
if (javaHome)
ext.javafxJar = "${javaHome}/jre/lib/jfxrt.jar"
}
try {
println "JavaFX runtime jar: ${ext.javafxJar}"
dependencies {
classpath files(ext.javafxJar)
}
} catch (MissingPropertyException mpe) {
println """
| Please set the environment variable JAVAFX_HOME
| to the directory that contains rt/lib/jfxrt.jar
| of JavaFX version ${jfxtras_requiredJavaFxVersion}.\n""".stripMargin()
System.exit 1
}
}
repositories {
mavenRepo urls: "https://oss.sonatype.org/content/repositories/snapshots/"
mavenCentral()
}
dependencies {
compile files(ext.javafxJar, "lib/jsr-310-ri-0.6.3.jar", "lib/jsr-310-TZDB-all-0.6.3.jar")
testCompile "junit:junit:${jfxtras_junitVersion}"
testCompile "net.java.jemmy:JemmyFX:0.9.3-SNAPSHOT"
}
apply {
from 'gradle/mavenCentralDeploy.gradle'
}
task buildTimestamped(type: Copy, dependsOn: 'build') {
from 'build/libs'
into 'build/libs/timestamped'
include '*.jar'
rename { String fileName ->
fileName.replace('SNAPSHOT', "SNAPSHOT-${new Date().format('HH-mm-dd-MM-yyyy')}")
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.0-rc-3'
}
signArchives.onlyIf {
project.hasProperty('signing.keyId')
}
uploadArchives.onlyIf {
project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')
}
task copyToLib(type: Copy) {
into "_lib"
from configurations.testCompile
}