diff --git a/VWorkflows-Demo/src/main/java/eu/mihosoft/vrl/workflow/demo/MainWindowFXMLController.java b/VWorkflows-Demo/src/main/java/eu/mihosoft/vrl/workflow/demo/MainWindowFXMLController.java index 69954084..49822b14 100644 --- a/VWorkflows-Demo/src/main/java/eu/mihosoft/vrl/workflow/demo/MainWindowFXMLController.java +++ b/VWorkflows-Demo/src/main/java/eu/mihosoft/vrl/workflow/demo/MainWindowFXMLController.java @@ -53,14 +53,13 @@ import javafx.scene.control.MenuItem; import javafx.scene.input.MouseEvent; import javafx.scene.layout.Pane; -import jfxtras.labs.scene.control.window.Window; - import java.io.IOException; import java.net.URL; import java.nio.file.Paths; import java.util.ResourceBundle; import java.util.logging.Level; import java.util.logging.Logger; +import jfxtras.scene.control.window.Window; /** * FXML Controller class diff --git a/VWorkflows-Demo/vworkflows-demo.gradle b/VWorkflows-Demo/vworkflows-demo.gradle index a349deb3..8ba4f7c9 100644 --- a/VWorkflows-Demo/vworkflows-demo.gradle +++ b/VWorkflows-Demo/vworkflows-demo.gradle @@ -1,12 +1,12 @@ -apply plugin: 'application' -apply from: rootProject.file('gradle/javafx-plugin.gradle') - -mainClassName= 'eu.mihosoft.vrl.workflow.demo.Main' - -javafx { - mainClass = mainClassName -} - -dependencies { - compile project(':vworkflows-fx') +apply plugin: 'application' +apply from: rootProject.file('gradle/javafx-plugin.gradle') + +mainClassName= 'eu.mihosoft.vrl.workflow.demo.Main' + +javafx { + mainClass = mainClassName +} + +dependencies { + compile project(':vworkflows-fx') } \ No newline at end of file diff --git a/VWorkflows-FX/vworkflows-fx.gradle b/VWorkflows-FX/vworkflows-fx.gradle index d9219992..edc474b9 100644 --- a/VWorkflows-FX/vworkflows-fx.gradle +++ b/VWorkflows-FX/vworkflows-fx.gradle @@ -1,15 +1,5 @@ -repositories { - maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } -} - -dependencies { - compile project(':vworkflows-core') - - if (project.jdk == 7) { - compile "org.jfxtras:jfxtras-labs:2.2-r6-SNAPSHOT" - } else if (project.jdk == 8) { - compile "org.jfxtras:jfxtras-labs:8.0-r1" - } - - compile 'org.apache.commons:commons-math3:3.3' +dependencies { + compile project(':vworkflows-core') + + compile 'org.apache.commons:commons-math3:3.3' } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 243a034f..a53d500d 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ buildscript { classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.5' classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0' classpath 'net.nemerosa:versioning:1.7+' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' } } @@ -30,6 +30,7 @@ ext { jacocoMergeExecFile = "${buildDir}/jacoco/root.exec" jacocoRootReportPath = "${buildDir}/reports/jacoco/root/" projectsWithCoverage = [] + projectsToPublish = [] } apply plugin: 'jacoco' @@ -107,6 +108,7 @@ subprojects { subproj -> subproj.apply plugin: 'org.kordamp.gradle.stats' if (subproj.publishJars.toBoolean()) { + task sourceJar(type: Jar) { group 'Build' description 'An archive of the source code' @@ -118,6 +120,7 @@ subprojects { subproj -> subproj.apply from: rootProject.file('gradle/publishing.gradle') subproj.apply from: rootProject.file('gradle/javafx.gradle') + projectsToPublish << subproj projectsWithCoverage << subproj dependencies { @@ -188,9 +191,9 @@ coveralls { } tasks.coveralls { - group = 'Coverage reports' - description = 'Uploads the aggregated coverage report to Coveralls' + group = 'Coverage reports' + description = 'Uploads the aggregated coverage report to Coveralls' - dependsOn jacocoRootReport - onlyIf { System.env.'CI' } + dependsOn jacocoRootReport + onlyIf { System.env.'CI' } } \ No newline at end of file diff --git a/gradle/javafx-plugin.gradle b/gradle/javafx-plugin.gradle index 97669fc4..65f6f9aa 100644 --- a/gradle/javafx-plugin.gradle +++ b/gradle/javafx-plugin.gradle @@ -1,36 +1,36 @@ -/* - * Bootstrap script for the Gradle JavaFX Plugin. - * (based on http://plugins.jasoft.fi/vaadin.plugin) - * - * The script will add the latest version of the plugin to the build script - * dependencies and apply the plugin to the project. If you do not want - * this behavior you can copy and paste the below configuration into your - * own build script and define your own repository and version for the plugin. - */ - -buildscript { - File javaHome = new File(System.properties['java.home']) - javaHome = javaHome.name == 'jre' ? javaHome.parentFile : javaHome - String jfxrtLocation = new File("${javaHome}/jre/lib/jfxrt.jar").absolutePath - // JavaFX locations for JDK7, JDK7, JDK8 - for (location in ['lib/jfxrt.jar', 'jre/lib/jfxrt.jar', 'jre/lib/ext/jfxrt.jar']) { - File file = new File(javaHome, location) - if (file.exists()) { - jfxrtLocation = file.absolutePath - break - } - } - - repositories { - jcenter() - } - dependencies { - classpath 'org.bitbucket.shemnon.javafxplugin:gradle-javafx-plugin:8.1.1' - classpath project.files("${javaHome}/lib/ant-javafx.jar") - classpath project.files(jfxrtLocation) - } -} - -if (!project.plugins.findPlugin(org.bitbucket.shemnon.javafxplugin.JavaFXPlugin)) { - project.apply(plugin: org.bitbucket.shemnon.javafxplugin.JavaFXPlugin) -} +/* + * Bootstrap script for the Gradle JavaFX Plugin. + * (based on http://plugins.jasoft.fi/vaadin.plugin) + * + * The script will add the latest version of the plugin to the build script + * dependencies and apply the plugin to the project. If you do not want + * this behavior you can copy and paste the below configuration into your + * own build script and define your own repository and version for the plugin. + */ + +buildscript { + File javaHome = new File(System.properties['java.home']) + javaHome = javaHome.name == 'jre' ? javaHome.parentFile : javaHome + String jfxrtLocation = new File("${javaHome}/jre/lib/jfxrt.jar").absolutePath + // JavaFX locations for JDK7, JDK7, JDK8 + for (location in ['lib/jfxrt.jar', 'jre/lib/jfxrt.jar', 'jre/lib/ext/jfxrt.jar']) { + File file = new File(javaHome, location) + if (file.exists()) { + jfxrtLocation = file.absolutePath + break + } + } + + repositories { + jcenter() + } + dependencies { + classpath 'org.bitbucket.shemnon.javafxplugin:gradle-javafx-plugin:8.1.1' + classpath project.files("${javaHome}/lib/ant-javafx.jar") + classpath project.files(jfxrtLocation) + } +} + +if (!project.plugins.findPlugin(org.bitbucket.shemnon.javafxplugin.JavaFXPlugin)) { + project.apply(plugin: org.bitbucket.shemnon.javafxplugin.JavaFXPlugin) +} diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index c708cdd3..0acceeb0 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -4,6 +4,23 @@ apply plugin: 'maven-publish' apply plugin: 'com.jfrog.bintray' apply plugin: 'net.nemerosa.versioning' +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +// create one jar for the source files +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives jar + archives javadocJar + archives sourcesJar +} + def pomConfig = { name project.name description 'VWorkflows' @@ -38,7 +55,8 @@ publishing { publications { mavenCustom(MavenPublication) { from components.java - artifact sourceJar + artifact sourcesJar + artifact javadocJar pom.withXml { // all dependencies should use the default scope (compile) but @@ -82,12 +100,12 @@ bintray { key = project.bintrayApiKey publications = ['mavenCustom'] pkg { - repo = 'maven' - userOrg = 'mihosoft' + repo = 'VWorkflows' + userOrg = 'miho' name = project.name desc = project.name licenses = ['BSD 2-Clause'] - labels = ['javafx', 'workoflows'] + labels = ['javafx', 'workflows','vrl','vrl-studio', 'graphs','flows', 'visual programming'] websiteUrl = 'https://github.com/miho/VWorkflows' issueTrackerUrl = 'https://github.com/miho/VWorkflows/issues' vcsUrl = 'https://github.com/miho/VWorkflows.git' diff --git a/gradle/version-info.gradle b/gradle/version-info.gradle index 49062fd0..06f323a8 100644 --- a/gradle/version-info.gradle +++ b/gradle/version-info.gradle @@ -1,8 +1,3 @@ -// maven deployment properties -if (project.jdk == 8) { - group = 'eu.mihosoft.vrl.workflow-8.0' -} else { - group = 'eu.mihosoft.vrl.workflow' -} - -version = '0.1-r2-SNAPSHOT' +// maven deployment properties +group = 'eu.mihosoft.vrl.workflow' +version = '0.2' diff --git a/settings.gradle b/settings.gradle index 42aeeb09..875d7bcf 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,11 +1,11 @@ -include 'VWorkflows-Core' -include 'VWorkflows-FX' -include 'VWorkflows-Demo' - -rootProject.name = 'VWorkflows' -rootProject.children.each { project -> - String projectDirName = project.name - project.name = project.name.toLowerCase() - project.buildFileName = "${project.name}.gradle" - assert project.buildFile.isFile() +include 'VWorkflows-Core' +include 'VWorkflows-FX' +include 'VWorkflows-Demo' + +rootProject.name = 'vworkflows' +rootProject.children.each { project -> + String projectDirName = project.name + project.name = project.name.toLowerCase() + project.buildFileName = "${project.name}.gradle" + assert project.buildFile.isFile() } \ No newline at end of file