Permalink
Browse files

Merge pull request #23 from puneetbehl/master

Migrated to Grails 3
  • Loading branch information...
2 parents 9fe3530 + 0e2ee6f commit 281ef68ce2d008ee35af9c8a31134e329998331d @graemerocher graemerocher committed Aug 13, 2015
Showing with 1,420 additions and 31,602 deletions.
  1. +24 −6 .gitignore
  2. +22 −22 .travis.yml
  3. +2 −0 README.md
  4. +0 −4 application.properties
  5. +83 −0 build.gradle
  6. +0 −2 build.sh
  7. +2 −0 gradle.properties
  8. BIN gradle/wrapper/gradle-wrapper.jar
  9. +6 −0 gradle/wrapper/gradle-wrapper.properties
  10. +164 −0 gradlew
  11. +90 −0 gradlew.bat
  12. +0 −39 grails-app/conf/BuildConfig.groovy
  13. +0 −43 grails-app/conf/DataSource.groovy
  14. +1 −4 grails-app/conf/{Config.groovy → application.groovy}
  15. +108 −0 grails-app/conf/application.yml
  16. +28 −0 grails-app/conf/logback.groovy
  17. 0 grails-app/{conf → controllers}/UrlMappings.groovy
  18. +10 −0 grails-app/init/grails/plugins/rabbitmq/Application.groovy
  19. +123 −0 grails-app/views/index.gsp
  20. +19 −0 grails-app/views/layouts/main.gsp
  21. +14 −0 grails-app/views/notFound.gsp
  22. +0 −33 scripts/_Install.groovy
  23. +0 −5 scripts/_Uninstall.groovy
  24. +0 −10 scripts/_Upgrade.groovy
  25. +3 −3 ...g/grails/rabbitmq → main/groovy/grails.plugins.rabbitmq}/AutoQueueMessageListenerContainer.groovy
  26. +1 −1 ...roovy/org/grails/rabbitmq → main/groovy/grails.plugins.rabbitmq}/RabbitConfigurationHolder.groovy
  27. +2 −2 src/{groovy/org/grails/rabbitmq → main/groovy/grails.plugins.rabbitmq}/RabbitDynamicMethods.groovy
  28. +1 −1 src/{groovy/org/grails/rabbitmq → main/groovy/grails.plugins.rabbitmq}/RabbitErrorHandler.groovy
  29. +9 −9 src/{groovy/org/grails/rabbitmq → main/groovy/grails.plugins.rabbitmq}/RabbitQueueBuilder.groovy
  30. +4 −6 ...{groovy/org/grails/rabbitmq → main/groovy/grails.plugins.rabbitmq}/RabbitServiceConfigurer.groovy
  31. +31 −25 { → src/main/groovy/grails.plugins.rabbitmq}/RabbitmqGrailsPlugin.groovy
  32. +58 −39 ...sts.groovy → src/test/groovy/grails/plugins/rabbitmq/AutoQueueMessageListenerContainerSpec.groovy
  33. +81 −0 src/test/groovy/grails/plugins/rabbitmq/RabbitConfigurationHolderSpec.groovy
  34. +35 −0 src/test/groovy/grails/plugins/rabbitmq/RabbitDynamicMethodsSpec.groovy
  35. +66 −50 ...tGrailsPluginTests.groovy → src/test/groovy/grails/plugins/rabbitmq/RabbitGrailsPluginSpec.groovy
  36. +412 −0 src/test/groovy/grails/plugins/rabbitmq/RabbitQueueBuilderSpec.groovy
  37. +0 −14 test/projects/default/.classpath
  38. +0 −19 test/projects/default/.project
  39. +0 −8 test/projects/default/application.properties
  40. +0 −7 test/projects/default/grails-app/conf/BootStrap.groovy
  41. +0 −34 test/projects/default/grails-app/conf/BuildConfig.groovy
  42. +0 −113 test/projects/default/grails-app/conf/Config.groovy
  43. +0 −32 test/projects/default/grails-app/conf/DataSource.groovy
  44. +0 −13 test/projects/default/grails-app/conf/UrlMappings.groovy
  45. +0 −3 test/projects/default/grails-app/conf/spring/resources.groovy
  46. +0 −18 test/projects/default/grails-app/controllers/org/grails/rabbitmq/test/MessageController.groovy
  47. +0 −11 test/projects/default/grails-app/domain/org/example/Person.groovy
  48. +0 −10 test/projects/default/grails-app/domain/org/example/Status.groovy
  49. +0 −55 test/projects/default/grails-app/i18n/messages.properties
  50. +0 −56 test/projects/default/grails-app/i18n/messages_da.properties
  51. +0 −55 test/projects/default/grails-app/i18n/messages_de.properties
  52. +0 −30 test/projects/default/grails-app/i18n/messages_es.properties
  53. +0 −19 test/projects/default/grails-app/i18n/messages_fr.properties
  54. +0 −19 test/projects/default/grails-app/i18n/messages_it.properties
  55. +0 −19 test/projects/default/grails-app/i18n/messages_ja.properties
  56. +0 −55 test/projects/default/grails-app/i18n/messages_nl.properties
  57. +0 −34 test/projects/default/grails-app/i18n/messages_pt_BR.properties
  58. +0 −34 test/projects/default/grails-app/i18n/messages_pt_PT.properties
  59. +0 −31 test/projects/default/grails-app/i18n/messages_ru.properties
  60. +0 −35 test/projects/default/grails-app/i18n/messages_th.properties
  61. +0 −18 test/projects/default/grails-app/i18n/messages_zh_CN.properties
  62. +0 −13 test/projects/default/grails-app/services/org/example/ConsumerService.groovy
  63. +0 −26 test/projects/default/grails-app/services/org/example/NonTxnService.groovy
  64. +0 −17 test/projects/default/grails-app/services/org/example/ProducerService.groovy
  65. +0 −22 test/projects/default/grails-app/services/org/example/TxnService.groovy
  66. +0 −16 test/projects/default/grails-app/services/org/grails/rabbitmq/test/DemoService.groovy
  67. +0 −54 test/projects/default/grails-app/views/error.gsp
  68. +0 −100 test/projects/default/grails-app/views/index.gsp
  69. +0 −17 test/projects/default/grails-app/views/layouts/main.gsp
  70. +0 −29 test/projects/default/grails-app/views/message/index.gsp
  71. +0 −17 test/projects/default/src/java/org/example/messages/PersonMessage.java
  72. +0 −12 test/projects/default/test/integration/org/example/AbstractTestCase.groovy
  73. +0 −89 test/projects/default/test/integration/org/example/MainTests.groovy
  74. +0 −27 test/projects/default/test/integration/org/example/MessageSerializationTests.groovy
  75. +0 −12 ...projects/default/test/integration/org/grails/rabbitmq/ConnectionFactoryInitializationTests.groovy
  76. +0 −44 test/projects/default/test/integration/org/grails/rabbitmq/MessageControllerTests.groovy
  77. +0 −33 test/projects/default/web-app/WEB-INF/applicationContext.xml
  78. +0 −14 test/projects/default/web-app/WEB-INF/sitemesh.xml
  79. +0 −572 test/projects/default/web-app/WEB-INF/tld/c.tld
  80. +0 −671 test/projects/default/web-app/WEB-INF/tld/fmt.tld
  81. +0 −550 test/projects/default/web-app/WEB-INF/tld/grails.tld
  82. +0 −311 test/projects/default/web-app/WEB-INF/tld/spring.tld
  83. +0 −109 test/projects/default/web-app/css/errors.css
  84. +0 −273 test/projects/default/web-app/css/main.css
  85. +0 −82 test/projects/default/web-app/css/mobile.css
  86. BIN test/projects/default/web-app/images/apple-touch-icon-retina.png
  87. BIN test/projects/default/web-app/images/apple-touch-icon.png
  88. BIN test/projects/default/web-app/images/favicon.ico
  89. BIN test/projects/default/web-app/images/grails_logo.jpg
  90. BIN test/projects/default/web-app/images/grails_logo.png
  91. BIN test/projects/default/web-app/images/leftnav_btm.png
  92. BIN test/projects/default/web-app/images/leftnav_midstretch.png
  93. BIN test/projects/default/web-app/images/leftnav_top.png
  94. BIN test/projects/default/web-app/images/skin/database_add.png
  95. BIN test/projects/default/web-app/images/skin/database_delete.png
  96. BIN test/projects/default/web-app/images/skin/database_edit.png
  97. BIN test/projects/default/web-app/images/skin/database_save.png
  98. BIN test/projects/default/web-app/images/skin/database_table.png
  99. BIN test/projects/default/web-app/images/skin/exclamation.png
  100. BIN test/projects/default/web-app/images/skin/house.png
  101. BIN test/projects/default/web-app/images/skin/information.png
  102. BIN test/projects/default/web-app/images/skin/shadow.jpg
  103. BIN test/projects/default/web-app/images/skin/sorted_asc.gif
  104. BIN test/projects/default/web-app/images/skin/sorted_desc.gif
  105. BIN test/projects/default/web-app/images/spinner.gif
  106. BIN test/projects/default/web-app/images/springsource.png
  107. +0 −13 test/projects/default/web-app/js/application.js
  108. +0 −7 test/projects/default/web-app/js/prototype/animation.js
  109. +0 −136 test/projects/default/web-app/js/prototype/builder.js
  110. +0 −965 test/projects/default/web-app/js/prototype/controls.js
  111. +0 −974 test/projects/default/web-app/js/prototype/dragdrop.js
  112. +0 −1,123 test/projects/default/web-app/js/prototype/effects.js
  113. +0 −4,874 test/projects/default/web-app/js/prototype/prototype.js
  114. +0 −2,691 test/projects/default/web-app/js/prototype/rico.js
  115. +0 −68 test/projects/default/web-app/js/prototype/scriptaculous.js
  116. +0 −275 test/projects/default/web-app/js/prototype/slider.js
  117. +0 −59 test/projects/default/web-app/js/prototype/sound.js
  118. +0 −568 test/projects/default/web-app/js/prototype/unittest.js
  119. +0 −14 test/projects/virtual-host/.classpath
  120. +0 −19 test/projects/virtual-host/.project
  121. +0 −7 test/projects/virtual-host/README
  122. +0 −8 test/projects/virtual-host/application.properties
  123. +0 −7 test/projects/virtual-host/grails-app/conf/BootStrap.groovy
  124. +0 −34 test/projects/virtual-host/grails-app/conf/BuildConfig.groovy
  125. +0 −103 test/projects/virtual-host/grails-app/conf/Config.groovy
  126. +0 −32 test/projects/virtual-host/grails-app/conf/DataSource.groovy
  127. +0 −13 test/projects/virtual-host/grails-app/conf/UrlMappings.groovy
  128. +0 −3 test/projects/virtual-host/grails-app/conf/spring/resources.groovy
  129. +0 −18 test/projects/virtual-host/grails-app/controllers/org/grails/rabbitmq/test/MessageController.groovy
  130. +0 −11 test/projects/virtual-host/grails-app/domain/org/example/Person.groovy
  131. +0 −55 test/projects/virtual-host/grails-app/i18n/messages.properties
  132. +0 −56 test/projects/virtual-host/grails-app/i18n/messages_da.properties
  133. +0 −55 test/projects/virtual-host/grails-app/i18n/messages_de.properties
  134. +0 −30 test/projects/virtual-host/grails-app/i18n/messages_es.properties
  135. +0 −19 test/projects/virtual-host/grails-app/i18n/messages_fr.properties
  136. +0 −19 test/projects/virtual-host/grails-app/i18n/messages_it.properties
  137. +0 −19 test/projects/virtual-host/grails-app/i18n/messages_ja.properties
  138. +0 −55 test/projects/virtual-host/grails-app/i18n/messages_nl.properties
  139. +0 −34 test/projects/virtual-host/grails-app/i18n/messages_pt_BR.properties
  140. +0 −34 test/projects/virtual-host/grails-app/i18n/messages_pt_PT.properties
  141. +0 −31 test/projects/virtual-host/grails-app/i18n/messages_ru.properties
  142. +0 −35 test/projects/virtual-host/grails-app/i18n/messages_th.properties
  143. +0 −18 test/projects/virtual-host/grails-app/i18n/messages_zh_CN.properties
  144. +0 −11 test/projects/virtual-host/grails-app/services/org/example/ConsumerService.groovy
  145. +0 −9 test/projects/virtual-host/grails-app/services/org/example/ProducerService.groovy
  146. +0 −16 test/projects/virtual-host/grails-app/services/org/grails/rabbitmq/test/DemoService.groovy
  147. +0 −54 test/projects/virtual-host/grails-app/views/error.gsp
  148. +0 −100 test/projects/virtual-host/grails-app/views/index.gsp
  149. +0 −17 test/projects/virtual-host/grails-app/views/layouts/main.gsp
  150. +0 −17 test/projects/virtual-host/src/java/org/example/messages/PersonMessage.java
  151. +0 −36 test/projects/virtual-host/test/integration/org/example/MessageSerializationTests.groovy
  152. +0 −12 ...cts/virtual-host/test/integration/org/grails/rabbitmq/ConnectionFactoryInitializationTests.groovy
  153. +0 −44 test/projects/virtual-host/test/integration/org/grails/rabbitmq/MessageControllerTests.groovy
  154. +0 −42 test/projects/virtual-host/web-app/WEB-INF/applicationContext.xml
  155. +0 −14 test/projects/virtual-host/web-app/WEB-INF/sitemesh.xml
  156. +0 −563 test/projects/virtual-host/web-app/WEB-INF/tld/c.tld
  157. +0 −671 test/projects/virtual-host/web-app/WEB-INF/tld/fmt.tld
  158. +0 −550 test/projects/virtual-host/web-app/WEB-INF/tld/grails.tld
  159. +0 −311 test/projects/virtual-host/web-app/WEB-INF/tld/spring.tld
  160. +0 −273 test/projects/virtual-host/web-app/css/main.css
  161. BIN test/projects/virtual-host/web-app/images/favicon.ico
  162. BIN test/projects/virtual-host/web-app/images/grails_logo.jpg
  163. BIN test/projects/virtual-host/web-app/images/grails_logo.png
  164. BIN test/projects/virtual-host/web-app/images/leftnav_btm.png
  165. BIN test/projects/virtual-host/web-app/images/leftnav_midstretch.png
  166. BIN test/projects/virtual-host/web-app/images/leftnav_top.png
  167. BIN test/projects/virtual-host/web-app/images/skin/database_add.png
  168. BIN test/projects/virtual-host/web-app/images/skin/database_delete.png
  169. BIN test/projects/virtual-host/web-app/images/skin/database_edit.png
  170. BIN test/projects/virtual-host/web-app/images/skin/database_save.png
  171. BIN test/projects/virtual-host/web-app/images/skin/database_table.png
  172. BIN test/projects/virtual-host/web-app/images/skin/exclamation.png
  173. BIN test/projects/virtual-host/web-app/images/skin/house.png
  174. BIN test/projects/virtual-host/web-app/images/skin/information.png
  175. BIN test/projects/virtual-host/web-app/images/skin/shadow.jpg
  176. BIN test/projects/virtual-host/web-app/images/skin/sorted_asc.gif
  177. BIN test/projects/virtual-host/web-app/images/skin/sorted_desc.gif
  178. BIN test/projects/virtual-host/web-app/images/spinner.gif
  179. BIN test/projects/virtual-host/web-app/images/springsource.png
  180. +0 −13 test/projects/virtual-host/web-app/js/application.js
  181. +0 −7 test/projects/virtual-host/web-app/js/prototype/animation.js
  182. +0 −136 test/projects/virtual-host/web-app/js/prototype/builder.js
  183. +0 −965 test/projects/virtual-host/web-app/js/prototype/controls.js
  184. +0 −974 test/projects/virtual-host/web-app/js/prototype/dragdrop.js
  185. +0 −1,123 test/projects/virtual-host/web-app/js/prototype/effects.js
  186. +0 −4,874 test/projects/virtual-host/web-app/js/prototype/prototype.js
  187. +0 −2,691 test/projects/virtual-host/web-app/js/prototype/rico.js
  188. +0 −68 test/projects/virtual-host/web-app/js/prototype/scriptaculous.js
  189. +0 −275 test/projects/virtual-host/web-app/js/prototype/slider.js
  190. +0 −59 test/projects/virtual-host/web-app/js/prototype/sound.js
  191. +0 −568 test/projects/virtual-host/web-app/js/prototype/unittest.js
  192. +0 −76 test/unit/org/grails/rabbitmq/RabbitConfigurationHolderTest.groovy
  193. +0 −47 test/unit/org/grails/rabbitmq/RabbitDynamicMethodsTests.groovy
  194. +0 −348 test/unit/org/grails/rabbitmq/RabbitQueueBuilderTests.groovy
  195. +21 −0 travis-build.sh
View
@@ -1,9 +1,27 @@
-*.swp
+# JetBrains IntelliJ IDEA files
+.idea/
+*.iml
+*.iws
+.gradle
+build/
+
+# Log files
+*.log
+
+# Libraries and others
+*.zip
+
+# Target
+target/
target-eclipse/
-.settings/
-stacktrace.log
+
+.DS_Store
+
+docs/
plugin.xml
-grails-rabbitmq-*.zip*
-target
-web-app/WEB-INF/classes/
+.settings
+# Unused grails files
+.classpath
+.project
+test/reports
View
@@ -1,27 +1,27 @@
-language: java
+language: groovy
jdk:
-- oraclejdk7
-
-env:
-# Grails 2.4.3 Not working yet (https://travis-ci.org/yellowsnow/grails-rabbitmq/jobs/34139712)
-#- GRAILS_VERSION=2.4.3 UPGRADE="set-grails-version $GRAILS_VERSION"
-- GRAILS_VERSION=2.3.11 UPGRADE=upgrade
-- GRAILS_VERSION=2.1.5 UPGRADE=upgrade
-- GRAILS_VERSION=2.0.4 UPGRADE=upgrade
-
+ - oraclejdk7
+
before_install:
-- rm -rf ~/.gvm
-- curl -s get.gvmtool.net > ~/install_gvm.sh
-- chmod 775 ~/install_gvm.sh
-- ~/install_gvm.sh
-- echo "gvm_auto_answer=true" > ~/.gvm/etc/config
-- source ~/.gvm/bin/gvm-init.sh
-- gvm install grails $GRAILS_VERSION || true
-- chmod 775 ./build.sh
+ - rm -rf ~/.gvm
+ - curl -s get.gvmtool.net > ~/install_gvm.sh
+ - chmod 775 ~/install_gvm.sh
+ - ~/install_gvm.sh
+ - echo "gvm_auto_answer=true" > ~/.gvm/etc/config
+ - source ~/.gvm/bin/gvm-init.sh
+ - gvm install grails $GRAILS_VERSION || true
+ - chmod 775 ./travis-build.sh
branches:
-only:
-- master
-
-script: ./build.sh
+ only:
+ - master
+
+before_script:
+ - rm -rf target
+
+script: ./travis-build.sh
+
+env:
+ matrix:
+ - GRAILS_VERSION=3.0.2
View
@@ -6,3 +6,5 @@ grails-rabbitmq
===============
Grails RabbitMQ Plugin
+
+[Sample Applicatoin](https://github.com/puneetbehl/rabbitmqDemo.git)
View
@@ -1,4 +0,0 @@
-#Grails Metadata file
-#Sun Mar 04 13:14:00 GMT 2012
-app.grails.version=2.0.4
-app.name=rabbitmq
View
@@ -0,0 +1,83 @@
+buildscript {
+ ext {
+ grailsVersion = project.grailsVersion
+ }
+ repositories {
+ mavenLocal()
+ maven { url "https://repo.grails.org/grails/core" }
+ }
+ dependencies {
+ classpath "org.grails:grails-gradle-plugin:$grailsVersion"
+ }
+}
+
+plugins {
+ id "io.spring.dependency-management" version "0.5.1.RELEASE"
+ id "com.jfrog.bintray" version "1.1"
+}
+
+version "2.0.0-SNAPSHOT"
+group "org.grails.plugins"
+
+apply plugin: 'maven-publish'
+apply plugin: 'eclipse'
+apply plugin: 'idea'
+apply plugin: "spring-boot"
+apply plugin: "org.grails.grails-plugin"
+apply plugin: "org.grails.grails-gsp"
+// Used for publishing to central repository, remove if not needed
+apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/grailsCentralPublishing.gradle'
+apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle'
+
+ext {
+ grailsVersion = project.grailsVersion
+ gradleWrapperVersion = project.gradleWrapperVersion
+}
+
+sourceCompatibility = 1.7
+targetCompatibility = 1.7
+
+
+repositories {
+ mavenLocal()
+ mavenCentral()
+ maven { url "https://repo.grails.org/grails/core" }
+}
+
+dependencyManagement {
+ imports {
+ mavenBom "org.grails:grails-bom:$grailsVersion"
+ }
+ applyMavenExclusions false
+}
+
+dependencies {
+ provided 'org.springframework.boot:spring-boot-starter-logging'
+ provided "org.springframework.boot:spring-boot-starter-actuator"
+ provided "org.springframework.boot:spring-boot-autoconfigure"
+ provided "org.springframework.boot:spring-boot-starter-tomcat"
+
+ provided "org.grails:grails-web-boot"
+ provided "org.grails:grails-dependencies"
+ provided 'javax.servlet:javax.servlet-api:3.1.0'
+
+ testCompile "org.grails:grails-plugin-testing"
+
+ compile("org.springframework.amqp:spring-rabbit:1.4.5.RELEASE") {
+ exclude module: 'junit'
+ exclude module: 'sprint-aop'
+ exclude module: 'spring-core'
+ exclude module: 'spring-oxm'
+ exclude module: 'spring-test'
+ exclude module: 'spring-tx'
+ exclude module: 'slf4j-log4j12'
+ exclude module: 'log4j'
+ }
+ runtime 'org.springframework.retry:spring-retry:1.1.2.RELEASE'
+
+ console "org.grails:grails-console"
+}
+
+task wrapper(type: Wrapper) {
+ gradleVersion = gradleWrapperVersion
+}
View
@@ -1,2 +0,0 @@
-#!/bin/bash
-grails $UPGRADE --non-interactive && grails test-app unit: --non-interactive --stacktrace
View
@@ -0,0 +1,2 @@
+grailsVersion=3.0.2
+gradleWrapperVersion=2.3
Binary file not shown.
@@ -0,0 +1,6 @@
+#Wed Feb 04 17:05:29 CST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
View
164 gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+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
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+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
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((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" ;;
+ 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=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
Oops, something went wrong.

0 comments on commit 281ef68

Please sign in to comment.