parent
							
								
									7d23104820
								
							
						
					
					
						commit
						f1491efa0e
					
				@ -1 +1 @@
 | 
				
			||||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
 | 
				
			||||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
 | 
				
			||||
 | 
				
			||||
@ -1,112 +0,0 @@
 | 
				
			||||
<project name="SpockExample" basedir="." default="test" xmlns:artifact="urn:maven-artifact-ant">
 | 
				
			||||
  <property name="src.dir" location="src/test/groovy" />
 | 
				
			||||
  <property name="resource.dir" location="src/test/resources" />
 | 
				
			||||
  <property name="build.dir" location="ant/build" />
 | 
				
			||||
  <property name="lib.dir" location="ant/lib" />
 | 
				
			||||
 | 
				
			||||
  <property name="maven.ant.tasks.url" value="https://central.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar" />
 | 
				
			||||
  <property name="maven.ant.tasks.jar" value="${lib.dir}${file.separator}maven-ant-tasks-2.1.3.jar" />
 | 
				
			||||
  <available property="maven.ant.tasks.jar.exists" file="${maven.ant.tasks.jar}" />
 | 
				
			||||
 | 
				
			||||
  <target name="bootstrap.maven.tasks" unless="maven.ant.tasks.jar.exists">
 | 
				
			||||
    <mkdir dir="${lib.dir}" />
 | 
				
			||||
    <get
 | 
				
			||||
      src="${maven.ant.tasks.url}"
 | 
				
			||||
      dest="${maven.ant.tasks.jar}" />
 | 
				
			||||
  </target>
 | 
				
			||||
 | 
				
			||||
  <target name="init.maven.tasks" depends="bootstrap.maven.tasks">
 | 
				
			||||
    <typedef
 | 
				
			||||
      resource="org/apache/maven/artifact/ant/antlib.xml"
 | 
				
			||||
      uri="urn:maven-artifact-ant"
 | 
				
			||||
      classpath="${maven.ant.tasks.jar}" />
 | 
				
			||||
  </target>
 | 
				
			||||
 | 
				
			||||
  <target name="resolve.dependencies" depends="init.maven.tasks">
 | 
				
			||||
    <artifact:dependencies pathId="classpath.spock">
 | 
				
			||||
<!-- Mandatory dependencies for using Spock -->
 | 
				
			||||
      <dependency
 | 
				
			||||
        groupId="org.spockframework"
 | 
				
			||||
        artifactId="spock-core"
 | 
				
			||||
        version="1.1-groovy-2.4" />
 | 
				
			||||
<!-- Optional dependencies for using Spock -->
 | 
				
			||||
      <!-- enables mocking of classes (in addition to interfaces) -->
 | 
				
			||||
      <dependency
 | 
				
			||||
        groupId="net.bytebuddy"
 | 
				
			||||
        artifactId="byte-buddy"
 | 
				
			||||
        version="1.6.5" />
 | 
				
			||||
      <!-- enables mocking of classes without parameterless constructor (together with CGLIB) -->
 | 
				
			||||
      <dependency
 | 
				
			||||
        groupId="org.objenesis"
 | 
				
			||||
        artifactId="objenesis"
 | 
				
			||||
        version="2.5.1" />
 | 
				
			||||
      <!-- only required if Spock's Ant selector is used, which finds spec classes regardless of their name -->
 | 
				
			||||
      <dependency
 | 
				
			||||
        groupId="org.ow2.asm"
 | 
				
			||||
        artifactId="asm"
 | 
				
			||||
        version="5.0.3" />
 | 
				
			||||
      <!-- only required if Hamcrest matchers are used -->
 | 
				
			||||
      <dependency
 | 
				
			||||
          groupId="org.hamcrest"
 | 
				
			||||
          artifactId="hamcrest-core"
 | 
				
			||||
          version="1.3" />
 | 
				
			||||
<!-- Dependencies used by examples in this project (not required for using Spock) -->
 | 
				
			||||
      <dependency
 | 
				
			||||
        groupId="com.h2database"
 | 
				
			||||
        artifactId="h2"
 | 
				
			||||
        version="1.4.182" />
 | 
				
			||||
      <remoteRepository
 | 
				
			||||
        id="maven-central"
 | 
				
			||||
        url="https://repo1.maven.org/maven2/" />
 | 
				
			||||
<!-- Only required if a snapshot version of Spock is used -->
 | 
				
			||||
      <remoteRepository
 | 
				
			||||
        id="spock-snapshots"
 | 
				
			||||
        url="https://oss.sonatype.org/content/repositories/snapshots/" />
 | 
				
			||||
    </artifact:dependencies>
 | 
				
			||||
  </target>
 | 
				
			||||
 | 
				
			||||
  <target name="init.groovy.tasks" depends="resolve.dependencies">
 | 
				
			||||
    <!-- Using the Groovy compiler from classpath.spock is a simple and safe setup -->
 | 
				
			||||
    <taskdef
 | 
				
			||||
      name="groovyc"
 | 
				
			||||
      classname="org.codehaus.groovy.ant.Groovyc"
 | 
				
			||||
      classpathref="classpath.spock" />
 | 
				
			||||
  </target>
 | 
				
			||||
 | 
				
			||||
  <target name="init" depends="init.groovy.tasks">
 | 
				
			||||
    <tstamp />
 | 
				
			||||
    <mkdir dir="${build.dir}" />
 | 
				
			||||
  </target>
 | 
				
			||||
 | 
				
			||||
  <target name="copy.resources" depends="init">
 | 
				
			||||
    <copy todir="${build.dir}">
 | 
				
			||||
      <fileset dir="${resource.dir}" />
 | 
				
			||||
    </copy>
 | 
				
			||||
  </target>
 | 
				
			||||
 | 
				
			||||
  <target name="compile" depends="copy.resources">
 | 
				
			||||
    <groovyc
 | 
				
			||||
      srcdir="${src.dir}"
 | 
				
			||||
      destdir="${build.dir}"
 | 
				
			||||
      classpathref="classpath.spock" />
 | 
				
			||||
  </target>
 | 
				
			||||
 | 
				
			||||
  <target name="test" depends="compile">
 | 
				
			||||
    <junit fork="true" forkmode="once">
 | 
				
			||||
      <classpath path="${build.dir}" />
 | 
				
			||||
      <classpath refid="classpath.spock" />
 | 
				
			||||
      <batchtest>
 | 
				
			||||
        <fileset dir="${build.dir}">
 | 
				
			||||
          <custom
 | 
				
			||||
            classname="org.spockframework.buildsupport.ant.SpecClassFileSelector"
 | 
				
			||||
            classpathref="classpath.spock" />
 | 
				
			||||
        </fileset>
 | 
				
			||||
      </batchtest>
 | 
				
			||||
      <formatter type="brief" usefile="false" />
 | 
				
			||||
    </junit>
 | 
				
			||||
  </target>
 | 
				
			||||
 | 
				
			||||
  <target name="clean">
 | 
				
			||||
    <delete dir="${build.dir}" />
 | 
				
			||||
  </target>
 | 
				
			||||
</project>
 | 
				
			||||
@ -1,5 +1,6 @@
 | 
				
			||||
distributionBase=GRADLE_USER_HOME
 | 
				
			||||
distributionPath=wrapper/dists
 | 
				
			||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
 | 
				
			||||
distributionSha256Sum=d364b7098b9f2e58579a3603dc0a12a1991353ac58ed339316e6762b21efba44
 | 
				
			||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
 | 
				
			||||
zipStoreBase=GRADLE_USER_HOME
 | 
				
			||||
zipStorePath=wrapper/dists
 | 
				
			||||
 | 
				
			||||
@ -1,100 +1,100 @@
 | 
				
			||||
@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      http://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
 | 
				
			||||
@rem  Gradle startup script for Windows
 | 
				
			||||
@rem
 | 
				
			||||
@rem ##########################################################################
 | 
				
			||||
 | 
				
			||||
@rem Set local scope for the variables with windows NT shell
 | 
				
			||||
if "%OS%"=="Windows_NT" setlocal
 | 
				
			||||
 | 
				
			||||
set DIRNAME=%~dp0
 | 
				
			||||
if "%DIRNAME%" == "" set DIRNAME=.
 | 
				
			||||
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="-Xmx64m" "-Xms64m"
 | 
				
			||||
 | 
				
			||||
@rem Find java.exe
 | 
				
			||||
if defined JAVA_HOME goto findJavaFromJavaHome
 | 
				
			||||
 | 
				
			||||
set JAVA_EXE=java.exe
 | 
				
			||||
%JAVA_EXE% -version >NUL 2>&1
 | 
				
			||||
if "%ERRORLEVEL%" == "0" goto init
 | 
				
			||||
 | 
				
			||||
echo.
 | 
				
			||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
				
			||||
echo.
 | 
				
			||||
echo Please set the JAVA_HOME variable in your environment to match the
 | 
				
			||||
echo location of your Java installation.
 | 
				
			||||
 | 
				
			||||
goto fail
 | 
				
			||||
 | 
				
			||||
:findJavaFromJavaHome
 | 
				
			||||
set JAVA_HOME=%JAVA_HOME:"=%
 | 
				
			||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 | 
				
			||||
 | 
				
			||||
if exist "%JAVA_EXE%" goto init
 | 
				
			||||
 | 
				
			||||
echo.
 | 
				
			||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
 | 
				
			||||
echo.
 | 
				
			||||
echo Please set the JAVA_HOME variable in your environment to match the
 | 
				
			||||
echo location of your Java installation.
 | 
				
			||||
 | 
				
			||||
goto fail
 | 
				
			||||
 | 
				
			||||
:init
 | 
				
			||||
@rem Get command-line arguments, handling Windows variants
 | 
				
			||||
 | 
				
			||||
if not "%OS%" == "Windows_NT" goto win9xME_args
 | 
				
			||||
 | 
				
			||||
:win9xME_args
 | 
				
			||||
@rem Slurp the command line arguments.
 | 
				
			||||
set CMD_LINE_ARGS=
 | 
				
			||||
set _SKIP=2
 | 
				
			||||
 | 
				
			||||
:win9xME_args_slurp
 | 
				
			||||
if "x%~1" == "x" goto execute
 | 
				
			||||
 | 
				
			||||
set CMD_LINE_ARGS=%*
 | 
				
			||||
 | 
				
			||||
:execute
 | 
				
			||||
@rem Setup the command line
 | 
				
			||||
 | 
				
			||||
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%
 | 
				
			||||
 | 
				
			||||
:end
 | 
				
			||||
@rem End local scope for the variables with windows NT shell
 | 
				
			||||
if "%ERRORLEVEL%"=="0" goto mainEnd
 | 
				
			||||
 | 
				
			||||
:fail
 | 
				
			||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 | 
				
			||||
rem the _cmd.exe /c_ return code!
 | 
				
			||||
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
 | 
				
			||||
exit /b 1
 | 
				
			||||
 | 
				
			||||
:mainEnd
 | 
				
			||||
if "%OS%"=="Windows_NT" endlocal
 | 
				
			||||
 | 
				
			||||
:omega
 | 
				
			||||
@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
 | 
				
			||||
@rem  Gradle startup script for Windows
 | 
				
			||||
@rem
 | 
				
			||||
@rem ##########################################################################
 | 
				
			||||
 | 
				
			||||
@rem Set local scope for the variables with windows NT shell
 | 
				
			||||
if "%OS%"=="Windows_NT" setlocal
 | 
				
			||||
 | 
				
			||||
set DIRNAME=%~dp0
 | 
				
			||||
if "%DIRNAME%" == "" set DIRNAME=.
 | 
				
			||||
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="-Xmx64m" "-Xms64m"
 | 
				
			||||
 | 
				
			||||
@rem Find java.exe
 | 
				
			||||
if defined JAVA_HOME goto findJavaFromJavaHome
 | 
				
			||||
 | 
				
			||||
set JAVA_EXE=java.exe
 | 
				
			||||
%JAVA_EXE% -version >NUL 2>&1
 | 
				
			||||
if "%ERRORLEVEL%" == "0" goto init
 | 
				
			||||
 | 
				
			||||
echo.
 | 
				
			||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
				
			||||
echo.
 | 
				
			||||
echo Please set the JAVA_HOME variable in your environment to match the
 | 
				
			||||
echo location of your Java installation.
 | 
				
			||||
 | 
				
			||||
goto fail
 | 
				
			||||
 | 
				
			||||
:findJavaFromJavaHome
 | 
				
			||||
set JAVA_HOME=%JAVA_HOME:"=%
 | 
				
			||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 | 
				
			||||
 | 
				
			||||
if exist "%JAVA_EXE%" goto init
 | 
				
			||||
 | 
				
			||||
echo.
 | 
				
			||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
 | 
				
			||||
echo.
 | 
				
			||||
echo Please set the JAVA_HOME variable in your environment to match the
 | 
				
			||||
echo location of your Java installation.
 | 
				
			||||
 | 
				
			||||
goto fail
 | 
				
			||||
 | 
				
			||||
:init
 | 
				
			||||
@rem Get command-line arguments, handling Windows variants
 | 
				
			||||
 | 
				
			||||
if not "%OS%" == "Windows_NT" goto win9xME_args
 | 
				
			||||
 | 
				
			||||
:win9xME_args
 | 
				
			||||
@rem Slurp the command line arguments.
 | 
				
			||||
set CMD_LINE_ARGS=
 | 
				
			||||
set _SKIP=2
 | 
				
			||||
 | 
				
			||||
:win9xME_args_slurp
 | 
				
			||||
if "x%~1" == "x" goto execute
 | 
				
			||||
 | 
				
			||||
set CMD_LINE_ARGS=%*
 | 
				
			||||
 | 
				
			||||
:execute
 | 
				
			||||
@rem Setup the command line
 | 
				
			||||
 | 
				
			||||
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%
 | 
				
			||||
 | 
				
			||||
:end
 | 
				
			||||
@rem End local scope for the variables with windows NT shell
 | 
				
			||||
if "%ERRORLEVEL%"=="0" goto mainEnd
 | 
				
			||||
 | 
				
			||||
:fail
 | 
				
			||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 | 
				
			||||
rem the _cmd.exe /c_ return code!
 | 
				
			||||
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
 | 
				
			||||
exit /b 1
 | 
				
			||||
 | 
				
			||||
:mainEnd
 | 
				
			||||
if "%OS%"=="Windows_NT" endlocal
 | 
				
			||||
 | 
				
			||||
:omega
 | 
				
			||||
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue