diff --git a/build.gradle b/build.gradle index c879484ce..ade0359b9 100644 --- a/build.gradle +++ b/build.gradle @@ -4,53 +4,37 @@ apply plugin: 'signing' apply plugin: 'eclipse' apply plugin: 'idea' -/*************************************** - * Set Maven coordinates and build vars - ***************************************/ -group = 'org.jfxtras' -archivesBaseName = "jfxtras-labs" -version = '0.1-SNAPSHOT' - -isRelease = !version.endsWith('SNAPSHOT') -requiredJavaFxVersion = '2.1.0' - -//sourceCompatibility = 7 - -/*************************************** - * Check environment - ***************************************/ -javafxHome = System.env['JAVAFX_HOME'] -if(!javafxHome) { - println """Please set environment variable JAVAFX_HOME -to the directory that contains /rt/lib/jfxrt.jar -for JavaFX version $requiredJavaFxVersion""" - System.exit 1 -} - buildscript { - dependencies { - classpath files("${System.env['JAVAFX_HOME']}/rt/lib/jfxrt.jar") + 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 } } -/* -actualJavaFXVersion = com.sun.javafx.runtime.VersionInfo.runtimeVersion -if (!actualJavaFXVersion.startsWith(requiredJavaFxVersion)) { - println "Required JavaFX version is '$requiredJavaFxVersion' but actual version is '$actualJavaFXVersion'" - System.exit(1) -} -*/ -// environment is ok -/*************************************** - * The build script proper - ***************************************/ repositories { mavenCentral() } dependencies { - compile files("${javafxHome}/rt/lib/jfxrt.jar") - testCompile 'junit:junit:4.10' + compile files(ext.javafxJar) + testCompile "junit:junit:${jfxtras_junitVersion}" testCompile files("lib/jemmy.jar", "lib/JemmyAWT.jar", "lib/JemmyAWTInput.jar", "lib/JemmyBrowser.jar", "lib/JemmyCore.jar", "lib/JemmyFX.jar") } @@ -68,15 +52,15 @@ task buildTimestamped(type: Copy, dependsOn: 'build') { } task wrapper(type: Wrapper) { - gradleVersion = '1.0-milestone-8' + gradleVersion = '1.0-rc-3' } signArchives.onlyIf { - hasProperty('signing.keyId') + project.hasProperty('signing.keyId') } uploadArchives.onlyIf { - hasProperty('sonatypeUsername') && hasProperty('sonatypePassword') + project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword') } task copyToLib(type: Copy) { diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 000000000..426b08cfa --- /dev/null +++ b/gradle.properties @@ -0,0 +1,5 @@ +group = org.jfxtras +archivesBaseName = jfxtras-labs +version = 0.1-SNAPSHOT +jfxtras_requiredJavaFxVersion = 2.1 +jfxtras_junitVersion = 4.10 diff --git a/gradle/mavenCentralDeploy.gradle b/gradle/mavenCentralDeploy.gradle index 092ca7edb..5d8904110 100644 --- a/gradle/mavenCentralDeploy.gradle +++ b/gradle/mavenCentralDeploy.gradle @@ -1,3 +1,4 @@ + // ------------- Maven Central deployment --------------- task docJar(type: Jar, dependsOn: javadoc) { @@ -21,10 +22,12 @@ signing { } uploadArchives { - if (!hasProperty('sonatypeUsername') || !hasProperty('sonatypePassword')) + if (!project.hasProperty('sonatypeUsername') || !project.hasProperty('sonatypePassword')) return repositories.mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') { authentication(userName: sonatypeUsername, password: sonatypePassword) } @@ -33,7 +36,6 @@ uploadArchives { authentication(userName: sonatypeUsername, password: sonatypePassword) } - //repository(url: "file:///Users/dean/temp/m2") pom.project { name 'JFXtras Labs' url 'http://jfxtras.org' diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index cf8ca39e9..86d03e620 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fb74472d8..e457cca77 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Feb 14 15:59:36 MST 2012 +#Sun Jun 03 10:11:31 MDT 2012 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-milestone-8-bin.zip +distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-rc-3-bin.zip diff --git a/gradlew b/gradlew index ae91ed902..cf1265090 100755 --- a/gradlew +++ b/gradlew @@ -107,7 +107,7 @@ fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then - JAVA_OPTS="$JAVA_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin, switch paths to Windows format before running java diff --git a/src/main/java/jfxtras/labs/scene/control/BigDecimalField.java b/src/main/java/jfxtras/labs/scene/control/BigDecimalField.java index 7099af323..45e972e51 100644 --- a/src/main/java/jfxtras/labs/scene/control/BigDecimalField.java +++ b/src/main/java/jfxtras/labs/scene/control/BigDecimalField.java @@ -62,7 +62,7 @@ public BigDecimalField(BigDecimal initialValue, BigDecimal stepwidth, NumberForm } /** - * @return text representation of number + * @return The text representation of number */ public String getText() { return getFormat().format(number.getValue()); @@ -70,7 +70,7 @@ public String getText() { /** * - * @param text representation of number + * @param formattedNumber representation of number */ public void setText(String formattedNumber) { try { @@ -98,24 +98,21 @@ public void decrement() { final private ObjectProperty number; /** - * The BigDecimal number - * @return + * @return The BigDecimal number */ public BigDecimal getNumber() { return number.getValue(); } /** - * The BigDecimal number - * @return + * Set the BigDecimal number */ - public void setNumber(BigDecimal value) { + public void setNumber(BigDecimal value) { number.set(value); } /** - * The BigDecimal number - * @return + * @return The property containing the BigDecimal number */ public ObjectProperty numberProperty() { return number; diff --git a/src/main/java/jfxtras/labs/scene/control/Spinner.java b/src/main/java/jfxtras/labs/scene/control/Spinner.java index 16712f8fc..48e6b7df7 100644 --- a/src/main/java/jfxtras/labs/scene/control/Spinner.java +++ b/src/main/java/jfxtras/labs/scene/control/Spinner.java @@ -76,8 +76,7 @@ public Spinner() // model /** - * @param model - * @param startValue + * @param items The item list used to populate the spinner. */ public Spinner(ObservableList items) { @@ -87,8 +86,8 @@ public Spinner(ObservableList items) } /** - * @param model - * @param startValue + * @param items The item list used to populate the spinner. + * @param startValue The initial value of the spinner (one of the items). */ public Spinner(ObservableList items, T startValue) { @@ -101,7 +100,6 @@ public Spinner(ObservableList items, T startValue) // convenience /** - * * @param list */ public Spinner(java.util.List list) @@ -110,7 +108,6 @@ public Spinner(java.util.List list) } /** - * * @param list */ public Spinner(T... list) @@ -119,8 +116,8 @@ public Spinner(T... list) } /** - * - * @param list + * @param from + * @param to */ public Spinner(int from, int to) { @@ -128,8 +125,9 @@ public Spinner(int from, int to) } /** - * - * @param list + * @param from + * @param to + * @param step */ public Spinner(int from, int to, int step) { @@ -531,7 +529,7 @@ public void last() * Does a o1.equals(o2) but also checks if o1 or o2 are null. * @param o1 * @param o2 - * @return + * @return True if the two values are equal, false otherwise. */ static public boolean equals(Object o1, Object o2) { diff --git a/src/main/java/jfxtras/labs/util/NodeUtil.java b/src/main/java/jfxtras/labs/util/NodeUtil.java index 0e2baefb7..0a68f203d 100644 --- a/src/main/java/jfxtras/labs/util/NodeUtil.java +++ b/src/main/java/jfxtras/labs/util/NodeUtil.java @@ -7,7 +7,7 @@ public class NodeUtil /** * * @param node - * @return + * @return The X screen coordinate of the node. */ static public double screenX(Node node) { @@ -17,7 +17,7 @@ static public double screenX(Node node) /** * * @param node - * @return + * @return The Y screen coordinate of the node. */ static public double screenY(Node node) { diff --git a/src/main/java/jfxtras/labs/util/StringConverterFactory.java b/src/main/java/jfxtras/labs/util/StringConverterFactory.java index f75d7c6c7..45d1a2464 100644 --- a/src/main/java/jfxtras/labs/util/StringConverterFactory.java +++ b/src/main/java/jfxtras/labs/util/StringConverterFactory.java @@ -38,7 +38,7 @@ public class StringConverterFactory { /** * - * @return + * @return A default string converter that does no extra processing on the strings it is given. */ static public StringConverter forString() {