Skip to content

Commit

Permalink
build: update to Gradle 5.6.4 (prev. 3.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
justparking committed May 23, 2020
1 parent 92e5614 commit cef0f46
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 129 deletions.
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
28 changes: 22 additions & 6 deletions gradlew
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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 " "
}
Expand Down
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
38 changes: 7 additions & 31 deletions nodel-framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -70,7 +46,7 @@ sourceSets {
}

jar {
from "$buildDir/output"
from "$buildDir/output"
baseName = 'nodel-framework'
manifest {
attributes 'Implementation-Title': 'Nodel framework for Java',
Expand Down
50 changes: 12 additions & 38 deletions nodel-jyhost/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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'
Expand All @@ -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')
Expand All @@ -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.+'
Expand Down
61 changes: 13 additions & 48 deletions nodel-webui-js/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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

// <!-- grunt is embedded (via npm via node.js)

task npmInstall(type:Exec) {
task npmInstall(type:Exec) {
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows'))
commandLine 'npm.cmd', 'install'
else
commandLine 'npm', 'install'
workingDir "${projectDir}"
}

task grunt(type:Exec) {
task grunt(type:Exec, dependsOn: [npmInstall]) {
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows'))
commandLine 'grunt.cmd'
else
commandLine 'grunt'
workingDir "${projectDir}"
}

clean.doFirst {
Expand All @@ -83,7 +61,7 @@ clean.doFirst {

// grunt --!>

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'
Expand Down Expand Up @@ -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'
Expand Down
3 changes: 0 additions & 3 deletions package-lock.json

This file was deleted.

0 comments on commit cef0f46

Please sign in to comment.