Skip to content

Commit

Permalink
Update to gradle 6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
watsonmw committed Jun 3, 2020
1 parent 47d29e4 commit e67170a
Show file tree
Hide file tree
Showing 15 changed files with 142 additions and 90 deletions.
98 changes: 56 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ subprojects {
ext {
jacksonVersion = '2.4.3'
rhinoVersion = '1.7.7'
tinylogVersion = '1.0'
iocommonsVersion = '2.4'
rsyntaxVersion = '2.5.8'
orgJsonVersion = '20140107'
}

compileJava {
Expand All @@ -20,7 +24,7 @@ subprojects {

jar {
manifest {
attributes 'Implementation-Title': 'PizzaScript', 'Implementation-Version': version
attributes 'Implementation-Title': 'PizzaScript', 'Implementation-Version': archiveVersion
}
}

Expand All @@ -37,23 +41,24 @@ subprojects {
}

dependencies {
testCompile 'junit:junit:4.+'
testCompile 'org.jmockit:jmockit:1.20'
testImplementation 'junit:junit:4.+'
testImplementation 'org.jmockit:jmockit:1.20'
}
}

project(':script-api') {
dependencies {
compile project(':util')
compile "org.mozilla:rhino:$rhinoVersion"
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
implementation project(':util')
implementation "org.mozilla:rhino:$rhinoVersion"
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
implementation "org.tinylog:tinylog:$tinylogVersion"
}
}

project(':util') {
dependencies {
compile 'commons-io:commons-io:2.4'
compile 'org.tinylog:tinylog:1.0'
implementation "commons-io:commons-io:$iocommonsVersion"
implementation "org.tinylog:tinylog:$tinylogVersion"
}
}

Expand All @@ -65,16 +70,17 @@ project(':websocket') {

project(':script-engine') {
dependencies {
compile project(':script-api')
compile project(':util')
compile project(':websocket')
compile project(':mov-writer')
compile "org.mozilla:rhino:$rhinoVersion"
compile 'commons-io:commons-io:2.4'
compile 'javax.servlet:javax.servlet-api:3.1.0'
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
compile 'org.json:json:20140107'
compile 'com.google.collections:google-collections:1.0'
implementation project(':script-api')
implementation project(':util')
implementation project(':websocket')
implementation project(':mov-writer')
implementation "org.mozilla:rhino:$rhinoVersion"
implementation "commons-io:commons-io:$iocommonsVersion"
implementation 'javax.servlet:javax.servlet-api:3.1.0'
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
implementation "org.json:json:$orgJsonVersion"
implementation 'com.google.collections:google-collections:1.0'
implementation "org.tinylog:tinylog:$tinylogVersion"
}

if (project.hasProperty("release")) {
Expand Down Expand Up @@ -104,14 +110,17 @@ project(':script-editor') {

// Compress tar file
dependencies {
compile project(':script-api')
compile project(':script-engine')
compile project(':util')
compile project(':view-metrics')
compile 'jline:jline:2.10'
compile 'com.fifesoft:rsyntaxtextarea:2.5.8'
compile 'com.fifesoft:autocomplete:2.5.8'
compile 'com.fifesoft:languagesupport:2.5.8'
implementation project(':script-api')
implementation project(':script-engine')
implementation project(':util')
implementation project(':view-metrics')
implementation 'jline:jline:2.10'
implementation "com.fifesoft:rsyntaxtextarea:$rsyntaxVersion"
implementation "com.fifesoft:autocomplete:$rsyntaxVersion"
implementation "com.fifesoft:languagesupport:$rsyntaxVersion"
implementation "org.tinylog:tinylog:$tinylogVersion"
implementation "org.json:json:$orgJsonVersion"
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
}
distTar {
compression = Compression.GZIP
Expand All @@ -125,12 +134,16 @@ project(':script-runner') {

// Compress tar file
dependencies {
compile project(':script-api')
compile project(':script-engine')
compile project(':util')
compile project(':view-metrics')
compile 'jline:jline:2.10'
compile 'org.fusesource.jansi:jansi-project:1.13'
implementation project(':script-api')
implementation project(':script-engine')
implementation project(':util')
implementation project(':view-metrics')
implementation 'jline:jline:2.10'
implementation 'org.fusesource.jansi:jansi-project:1.13'
implementation "org.tinylog:tinylog:$tinylogVersion"
implementation "org.json:json:$orgJsonVersion"
implementation "commons-io:commons-io:$iocommonsVersion"
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
}
distTar {
compression = Compression.GZIP
Expand All @@ -151,11 +164,11 @@ project(':view-metrics') {

project(':script-tester') {
dependencies {
compile project(':script-api')
compile project(':script-engine')
compile project(':util')
compile project(':view-metrics')
compile 'junit:junit:4.+'
implementation project(':script-api')
implementation project(':script-engine')
implementation project(':util')
implementation project(':view-metrics')
implementation 'junit:junit:4.+'
}
configurations {
integrationCompile.extendsFrom testCompile
Expand All @@ -172,7 +185,7 @@ project(':script-tester') {
showStandardStreams = true
exceptionFormat = 'full'
}
testClassesDir = sourceSets.integration.output.classesDir
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
}
}
Expand All @@ -183,7 +196,7 @@ project(':dist') {
def projects = [ project(':script-runner'), project(':script-editor') ]
distributions {
main {
baseName = "pizzascript"
distributionBaseName = "pizzascript"
contents {
exclude "dist-${version}.jar"
exclude ".gitkeep"
Expand All @@ -201,7 +214,8 @@ project(':dist') {
def libs = []

projects.each { p->
libs.addAll(p.configurations.compile.resolvedConfiguration.resolvedArtifacts.file)
p.configurations.getByName("implementation").setCanBeResolved(true)
libs.addAll(p.configurations.implementation.resolvedConfiguration.resolvedArtifacts.file)
libs << p.jar
}

Expand All @@ -226,7 +240,7 @@ task baseDocs(type:Exec) {
commandLine 'node_modules/.bin/jsdoc', '-c', 'script-api/jsdoc.conf', '-t', 'node_modules/jsdoc-baseline', 'script-api/pizzascript.js', 'script-api/pizzascript.md', '-d', 'docs/api'
}

task docs(dependsOn:baseDocs) << {
task docs(dependsOn:baseDocs) doLast {
FileTree tree = fileTree (dir: "docs/api");
tree.include "*.html"
tree.each { File file ->
Expand All @@ -241,7 +255,7 @@ task docs(dependsOn:baseDocs) << {
}
}

task 'incVersion' << {
task 'incVersion' doLast {
Properties props = new Properties()
File propsFile = new File('gradle.properties')
props.load(propsFile.newDataInputStream())
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Mon Jul 17 22:00:01 PDT 2017
#Tue Jun 02 18:23:08 PDT 2020
majorVersion=0.2
buildNumber=10
buildNumber=11
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
53 changes: 33 additions & 20 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,7 +44,7 @@ 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"
Expand Down Expand Up @@ -66,6 +82,7 @@ esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand Down Expand Up @@ -109,10 +126,11 @@ 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"`

# We build the pattern for arguments to be converted via cygpath
Expand All @@ -138,19 +156,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -159,14 +177,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
22 changes: 21 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 @@ -13,8 +29,11 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@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 Expand Up @@ -65,6 +84,7 @@ set CMD_LINE_ARGS=%*

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

Expand Down
4 changes: 2 additions & 2 deletions mov-writer/src/main/java/com/bric/qt/io/Atom.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ abstract class Atom implements TreeNode {
*/
protected static boolean ABBREVIATE = true;

protected static Enumeration<Object> EMPTY_ENUMERATION = new Enumeration<Object>() {
protected static Enumeration<TreeNode> EMPTY_ENUMERATION = new Enumeration<TreeNode>() {
public boolean hasMoreElements() {
return false;
}

public Object nextElement() {
public TreeNode nextElement() {
return null;
}
};
Expand Down
2 changes: 1 addition & 1 deletion mov-writer/src/main/java/com/bric/qt/io/EmptyAtom.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected long getSize() {
@Override
protected void writeContents(GuardedOutputStream out) {}

public Enumeration<Object> children() {
public Enumeration<? extends TreeNode> children() {
return EMPTY_ENUMERATION;
}

Expand Down
2 changes: 1 addition & 1 deletion mov-writer/src/main/java/com/bric/qt/io/LeafAtom.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected LeafAtom(Atom parent) {
super(parent);
}

public Enumeration<?> children() {
public Enumeration<? extends TreeNode> children() {
return EMPTY_ENUMERATION;
}

Expand Down
5 changes: 0 additions & 5 deletions mov-writer/src/main/java/com/bric/qt/io/MovWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,6 @@ public MovWriter(File file) throws IOException {
Atom.write32Int(out, 0);
}

@Override
protected void finalize() throws Throwable {
close();
}

/** This finishes writing the movie file.
*
* @throws IOException
Expand Down
Loading

0 comments on commit e67170a

Please sign in to comment.