diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e5bf06e2..5c2d1cf0 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 04c36051..0ebb3108 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Nov 08 17:30:34 AEDT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip diff --git a/gradlew b/gradlew index 4453ccea..83f2acfd 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,16 +44,16 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -109,8 +125,8 @@ if $darwin; then 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 -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` @@ -155,7 +171,7 @@ if $cygwin ; then fi # Escape application args -save ( ) { +save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } diff --git a/gradlew.bat b/gradlew.bat index f9553162..9618d8d9 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/nodel-framework/build.gradle b/nodel-framework/build.gradle index 34c6909e..58ace3db 100644 --- a/nodel-framework/build.gradle +++ b/nodel-framework/build.gradle @@ -22,43 +22,19 @@ def hostname = InetAddress.getLocalHost().getHostName().toUpperCase(); def now = DateTime.now().toString(); -task gitBranch(type:Exec) { - commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} - -task gitId(type:Exec) { - commandLine 'git', 'rev-parse', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} - -task gitRev(type:Exec) { - commandLine 'git', 'rev-list', '--count', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} - -gitBranch.execute() -gitRev.execute() -gitId.execute() +def gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim() +def gitId = 'git rev-parse HEAD'.execute().text.trim() +def gitRev = 'git rev-list --count HEAD'.execute().text.trim() -def branch = gitBranch.output() +def branch = gitBranch if (branch.equals("master")) branch = "dev" -def rev = gitRev.output() +def rev = gitRev // strip out non-alphanumeric (e.g. the '+' in '1234+') rev = rev.replaceAll(/[^a-zA-Z0-9]/, '') -def buildSummary = gitId.output(); +def buildSummary = gitId if (!branch.equals("stable")) version version + "-" + branch + "_r" + rev @@ -70,7 +46,7 @@ sourceSets { } jar { - from "$buildDir/output" + from "$buildDir/output" baseName = 'nodel-framework' manifest { attributes 'Implementation-Title': 'Nodel framework for Java', diff --git a/nodel-jyhost/build.gradle b/nodel-jyhost/build.gradle index 2beef106..9cb02055 100644 --- a/nodel-jyhost/build.gradle +++ b/nodel-jyhost/build.gradle @@ -7,48 +7,24 @@ repositories { mavenCentral() } -task gitBranch(type:Exec) { - commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} - -task gitId(type:Exec) { - commandLine 'git', 'rev-parse', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} +def gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim() +def gitId = 'git rev-parse HEAD'.execute().text.trim() +def gitRev = 'git rev-list --count HEAD'.execute().text.trim() -task gitRev(type:Exec) { - commandLine 'git', 'rev-list', '--count', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} - -gitBranch.execute() -gitRev.execute() -gitId.execute() - -def branch = gitBranch.output() +def branch = gitBranch if (branch.equals("master")) branch = "dev" -def rev = gitRev.output() +def rev = gitRev // strip out non-alphanumeric (e.g. the '+' in '1234+') rev = rev.replaceAll(/[^a-zA-Z0-9]/, '') -def buildSummary = gitId.output(); +def buildSummary = gitId mainClassName = "org.nodel.jyhost.Launch" jar { - from "$buildDir/output" + from "$buildDir/output" baseName = 'nodel-jyhost' manifest { attributes 'Implementation-Title': 'Nodel JyHost', @@ -57,10 +33,10 @@ jar { } task fatJar(type: Jar) { - manifest { + manifest { attributes 'Implementation-Title': 'Nodel JyHost', - 'Implementation-Version': version, - 'Main-Class': mainClassName + 'Implementation-Version': version, + 'Main-Class': mainClassName } appendix = branch baseName = 'nodelhost' @@ -79,9 +55,7 @@ task unversioned(dependsOn:'fatJar', type: Copy) { into new File(buildDir, 'distributions/standalone') } -build.doLast { - tasks.fatJar.execute() -} +build.finalizedBy(fatJar) dependencies { compile project(':nodel-webui-js') @@ -91,7 +65,7 @@ dependencies { compile 'org.python:jython-standalone:2.5.4-rc1' // for the Nodel HTTP client: - compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.5' + compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.5' // convenience dependency: required *only* for 'recipe sync' node compile 'org.eclipse.jgit:org.eclipse.jgit:3.7.1.+' diff --git a/nodel-webui-js/build.gradle b/nodel-webui-js/build.gradle index 09d020cc..c3292127 100644 --- a/nodel-webui-js/build.gradle +++ b/nodel-webui-js/build.gradle @@ -19,61 +19,39 @@ def hostname = InetAddress.getLocalHost().getHostName().toUpperCase(); def now = DateTime.now().toString(); -task gitBranch(type:Exec) { - commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} - -task gitId(type:Exec) { - commandLine 'git', 'rev-parse', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} - -task gitRev(type:Exec) { - commandLine 'git', 'rev-list', '--count', 'HEAD' - standardOutput = new ByteArrayOutputStream() - ext.output = { - return standardOutput.toString().trim() - } -} +def gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim() +def gitId = 'git rev-parse HEAD'.execute().text.trim() +def gitRev = 'git rev-list --count HEAD'.execute().text.trim() -gitBranch.execute() -gitRev.execute() -gitId.execute() - -def branch = gitBranch.output() +def branch = gitBranch if (branch.equals("master")) branch = "dev" -def rev = gitRev.output() +def rev = gitRev // strip out non-alphanumeric (e.g. the '+' in '1234+') rev = rev.replaceAll(/[^a-zA-Z0-9]/, '') -def buildSummary = gitId.output(); +def buildSummary = gitId if (!branch.equals("stable")) version project.version + "-" + branch + "_r" + rev // -task copyContent(type: Copy) { +task copyContent(type: Copy, dependsOn: [grunt]) { from new File(project.buildDir, 'grunt') into new File(project.buildDir, 'www-content_stage') exclude 'build.json' @@ -123,22 +101,9 @@ sourceSets { } } -task preBuild << { - tasks.cleanFilterContentTemplates.execute() - tasks.cleanZipContentInterface.execute() - tasks.cleanCopyContent.execute() - - tasks.npmInstall.execute() - tasks.grunt.execute() - - tasks.copyContent.execute() - tasks.filterContentTemplates.execute() - tasks.zipContentInterface.execute() - - tasks.copyBuildInfo.execute() -} +compileJava.dependsOn(zipContentInterface) +compileJava.dependsOn(copyBuildInfo) -compileJava.dependsOn(preBuild) dependencies { compile 'joda-time:joda-time:2.6' diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 48e341a0..00000000 --- a/package-lock.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "lockfileVersion": 1 -}