From b43764a2088912162ed5e8df2f6da7d2598fb1a3 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 29 Jan 2018 21:00:48 +0100 Subject: Hello world example --- examples/helloworld/build.gradle | 2 +- .../helloworld/gradle/wrapper/gradle-wrapper.jar | Bin 53194 -> 54712 bytes .../gradle/wrapper/gradle-wrapper.properties | 4 ++-- examples/helloworld/gradlew | 26 ++++++++++++++------- examples/helloworld/gradlew.bat | 6 ----- examples/helloworld/src/main/web/index.html | 2 +- 6 files changed, 21 insertions(+), 19 deletions(-) (limited to 'examples') diff --git a/examples/helloworld/build.gradle b/examples/helloworld/build.gradle index afc39547..7890fb72 100644 --- a/examples/helloworld/build.gradle +++ b/examples/helloworld/build.gradle @@ -12,7 +12,7 @@ buildscript { dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-frontend-plugin:0.0.26" - classpath "gradle.plugin.io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0.RC5-5" + classpath "gradle.plugin.io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0.RC6-2" } } diff --git a/examples/helloworld/gradle/wrapper/gradle-wrapper.jar b/examples/helloworld/gradle/wrapper/gradle-wrapper.jar index 8eef7fe1..09f1fecb 100644 Binary files a/examples/helloworld/gradle/wrapper/gradle-wrapper.jar and b/examples/helloworld/gradle/wrapper/gradle-wrapper.jar differ diff --git a/examples/helloworld/gradle/wrapper/gradle-wrapper.properties b/examples/helloworld/gradle/wrapper/gradle-wrapper.properties index fa2f9dad..9f53b3e5 100644 --- a/examples/helloworld/gradle/wrapper/gradle-wrapper.properties +++ b/examples/helloworld/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Aug 16 00:13:26 CEST 2017 +#Mon Jan 22 09:38:31 CET 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip diff --git a/examples/helloworld/gradlew b/examples/helloworld/gradlew index 27309d92..cccdd3d5 100755 --- a/examples/helloworld/gradlew +++ b/examples/helloworld/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# 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" "$@" diff --git a/examples/helloworld/gradlew.bat b/examples/helloworld/gradlew.bat index 832fdb60..f9553162 100644 --- a/examples/helloworld/gradlew.bat +++ b/examples/helloworld/gradlew.bat @@ -49,7 +49,6 @@ goto fail @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/examples/helloworld/src/main/web/index.html b/examples/helloworld/src/main/web/index.html index 8d540e95..a29727fe 100644 --- a/examples/helloworld/src/main/web/index.html +++ b/examples/helloworld/src/main/web/index.html @@ -4,7 +4,7 @@ - KVision Showcase + KVision Helloworld -- cgit