diff --git a/build.gradle b/build.gradle index cc280af1..c15a1c72 100644 --- a/build.gradle +++ b/build.gradle @@ -3,11 +3,11 @@ defaultTasks 'clean', 'build', 'templateProjectZip' allprojects { apply plugin: 'groovy' apply plugin: 'idea' - + repositories { mavenCentral() } - + version = '2.3.0-SNAPSHOT' group = 'org.gaelyk' @@ -30,7 +30,7 @@ task templateProjectZip(type: Zip) { from(templateProjectDir) { include 'build.gradle' } - + from('.') { include 'gradlew', 'gradlew.bat' fileMode = 0755 @@ -39,6 +39,6 @@ task templateProjectZip(type: Zip) { baseName 'gaelyk-template-project' } -task wrapper(type: Wrapper) { - gradleVersion = '2.14.1' +task generateWrapper(type: Wrapper) { + gradleVersion = '4.10.3' } diff --git a/core/gradle/wrapper/gradle-wrapper.properties b/core/gradle/wrapper/gradle-wrapper.properties index 29fd679e..e91443f3 100644 --- a/core/gradle/wrapper/gradle-wrapper.properties +++ b/core/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jul 28 15:57:46 PDT 2016 +#Mon Feb 04 16:27:44 UTC 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip diff --git a/core/src/main/groovyx/gaelyk/GaelykBindingsTransformation.groovy b/core/src/main/groovyx/gaelyk/GaelykBindingsTransformation.groovy index f2a549b0..51237fa2 100644 --- a/core/src/main/groovyx/gaelyk/GaelykBindingsTransformation.groovy +++ b/core/src/main/groovyx/gaelyk/GaelykBindingsTransformation.groovy @@ -97,6 +97,7 @@ class GaelykBindingsTransformation implements ASTTransformation { addGetterIfNotExists(parent, Class, "getNamespace", GaelykBindingEnhancer, "getNamespaceManager") addGetterIfNotExists(parent, LogService, "getLogService", LogServiceFactory, "getLogService") addGetterIfNotExists(parent, SearchService, "getSearchService", SearchServiceFactory, "getSearchService") + addGetterIfNotExists(parent, CapabilitiesService, "getCapabilities", CapabilitiesServiceFactory, "getCapabilitiesService") } private void addGetterIfNotExists(ClassNode parent, Class serviceClass, String getterName, Class factoryClass, String factoryMethodName) { @@ -113,11 +114,11 @@ class GaelykBindingsTransformation implements ASTTransformation { block.addStatement(new ReturnStatement(new MethodCallExpression( new ClassExpression(factoryType), factoryMethodName, new TupleExpression() ))) - + new MethodNode( - accessorName, - Modifier.PRIVATE | Modifier.STATIC, - returnType, + accessorName, + Modifier.PRIVATE | Modifier.STATIC, + returnType, Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, block diff --git a/core/src/test/groovyx/gaelyk/BindingEnhancerTest.groovy b/core/src/test/groovyx/gaelyk/BindingEnhancerTest.groovy index 67b2bcf8..1c521351 100644 --- a/core/src/test/groovyx/gaelyk/BindingEnhancerTest.groovy +++ b/core/src/test/groovyx/gaelyk/BindingEnhancerTest.groovy @@ -25,6 +25,7 @@ import com.google.appengine.tools.development.testing.LocalLogServiceTestConfig import com.google.appengine.api.log.LogService import com.google.appengine.tools.development.testing.LocalSearchServiceTestConfig import com.google.appengine.api.search.SearchService +import com.google.appengine.api.capabilities.CapabilitiesService /** * Test the binding enhancer binds the GAE services in the binding. @@ -125,8 +126,9 @@ class BindingEnhancerTest extends GroovyTestCase { assert binding.prospectiveSearch instanceof ProspectiveSearchService assert binding.logService instanceof LogService assert binding.search instanceof SearchService + assert binding.capabilities instanceof CapabilitiesService } - + /** * Lazy session is the default session. */ diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 3baa851b..94336fca 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 29fd679e..290541c7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Thu Jul 28 15:57:46 PDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip diff --git a/gradlew b/gradlew index 27309d92..cccdd3d5 100755 --- a/gradlew +++ b/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/gradlew.bat b/gradlew.bat index f6d5974e..e95643d6 100644 --- a/gradlew.bat +++ b/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