diff --git a/.gitignore b/.gitignore index 171d63b..1abbaa8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ # Gradle .gradle +gradle/ +gradlew +gradlew.bat build/ # Ignore Gradle GUI config diff --git a/jqwik-spring-boot-gradle/build.gradle b/jqwik-spring-boot-gradle/build.gradle deleted file mode 100644 index 4facba3..0000000 --- a/jqwik-spring-boot-gradle/build.gradle +++ /dev/null @@ -1,62 +0,0 @@ -plugins { -// id 'org.springframework.boot' version '2.2.0.RELEASE' -// id 'org.springframework.boot' version '2.2.5.RELEASE' -// id 'org.springframework.boot' version '2.2.6.RELEASE' - id 'org.springframework.boot' version '2.3.0.RELEASE' - id 'io.spring.dependency-management' version '1.0.9.RELEASE' - id 'java' -} - -ext { - junitJupiterVersion = '5.6.2' - jqwikSpringVersion = '0.7.0' - assertJVersion = '3.15.0' - mockitoVersion = '3.3.3' -} - -ext['mockito.version'] = "${mockitoVersion}" -ext['assertj.version'] = "${assertJVersion}" -ext['junit-jupiter.version'] = "${junitJupiterVersion}" - -group = 'my.example' -version = '0.0.1-SNAPSHOT' - -repositories { - mavenCentral() - maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -compileTestJava { - options.compilerArgs += '-parameters' - options.encoding = 'UTF-8' -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - - testImplementation('org.springframework.boot:spring-boot-starter-test') { - exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' - } - - testImplementation("net.jqwik:jqwik-spring:${jqwikSpringVersion}") -} - -test { - useJUnitPlatform() - - include '**/*Properties.class' - include '**/*Test.class' - include '**/*Tests.class' - - // testLogging.showStandardStreams = true -} - -wrapper { - description = 'Generates gradlew[.bat] scripts' - gradleVersion = '6.4.1' -} diff --git a/jqwik-spring-boot-gradle/build.gradle.kts b/jqwik-spring-boot-gradle/build.gradle.kts new file mode 100644 index 0000000..d80b33d --- /dev/null +++ b/jqwik-spring-boot-gradle/build.gradle.kts @@ -0,0 +1,65 @@ +plugins { +// id ("org.springframework.boot") version "2.2.0.RELEASE" +// id ("org.springframework.boot") version "2.2.5.RELEASE" +// id ("org.springframework.boot") version "2.2.6.RELEASE" + id ("org.springframework.boot") version "2.3.0.RELEASE" + id ("io.spring.dependency-management") version "1.0.9.RELEASE" + id("java") +} + +val jqwikSpringVersion: String by project +val assertJVersion: String by project +val junitJupiterVersion: String by project +val mockitoVersion: String by project + +ext { + set("mockito.version", mockitoVersion) + set("assertj.version", assertJVersion) + set("junit-jupiter.version", junitJupiterVersion) +} + + +group = "my.example" +version = "0.0.1-SNAPSHOT" + +repositories { + mavenCentral() + maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +tasks { + compileTestJava { + options.compilerArgs.add("-parameters") + options.encoding = "UTF-8" + } + + test { + useJUnitPlatform() + + // To allow other naming conventions + include ("**/*Properties.class") + include ("**/*Examples.class") + include ("**/*Test.class") + include ("**/*Tests.class") + } + + wrapper { + description = "Generates gradlew[.bat] scripts" + gradleVersion = "6.6.1" + } +} + +dependencies { + implementation ("org.springframework.boot:spring-boot-starter-web") + + testImplementation("org.springframework.boot:spring-boot-starter-test") { + exclude (group="org.junit.vintage", module="junit-vintage-engine") + } + + testImplementation("net.jqwik:jqwik-spring:${jqwikSpringVersion}") +} diff --git a/jqwik-spring-boot-gradle/gradle.properties b/jqwik-spring-boot-gradle/gradle.properties new file mode 100644 index 0000000..0b731e9 --- /dev/null +++ b/jqwik-spring-boot-gradle/gradle.properties @@ -0,0 +1,6 @@ +# suppress inspection "UnusedProperty" for whole file + +junitJupiterVersion=5.6.2 +assertJVersion=3.16.1 +jqwikSpringVersion=0.7.0 +mockitoVersion=3.3.3 \ No newline at end of file diff --git a/jqwik-starter-gradle/build.gradle b/jqwik-starter-gradle/build.gradle deleted file mode 100644 index e654471..0000000 --- a/jqwik-starter-gradle/build.gradle +++ /dev/null @@ -1,50 +0,0 @@ -plugins { - id 'java' -} - -repositories { - mavenCentral() -} - -ext { - junitPlatformVersion = '1.6.2' - junitJupiterVersion = '5.6.2' - assertJVersion = '3.16.1' - jqwikVersion = '1.3.1' -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -compileTestJava { - options.compilerArgs += '-parameters' - options.encoding = 'UTF-8' -} - -test { - useJUnitPlatform() - - // To allow other naming conventions - include '**/*Properties.class' - include '**/*Examples.class' - include '**/*Test.class' - include '**/*Tests.class' -} - -dependencies { - testImplementation("net.jqwik:jqwik:${jqwikVersion}") - - // Fluent assertions library. You can use any other assertions instead. - testImplementation("org.assertj:assertj-core:${assertJVersion}") - - // To work around IntelliJ bug to not provide run test decorator - // https://youtrack.jetbrains.com/issue/IDEA-231482 - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}") -} - -wrapper { - description = 'Generates gradlew[.bat] scripts' - gradleVersion = '6.5' -} diff --git a/jqwik-starter-gradle/build.gradle.kts b/jqwik-starter-gradle/build.gradle.kts new file mode 100644 index 0000000..22e2939 --- /dev/null +++ b/jqwik-starter-gradle/build.gradle.kts @@ -0,0 +1,51 @@ +plugins { + id("java") +} + +val jqwikVersion: String by project +val assertJVersion: String by project +val junitJupiterVersion: String by project +val junitPlatformVersion: String by project + +repositories { + mavenCentral() +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +tasks { + compileTestJava { + options.compilerArgs.add("-parameters") + options.encoding = "UTF-8" + } + + test { + useJUnitPlatform() + + // To allow other naming conventions + include ("**/*Properties.class") + include ("**/*Examples.class") + include ("**/*Test.class") + include ("**/*Tests.class") + } + + wrapper { + description = "Generates gradlew[.bat] scripts" + gradleVersion = "6.6.1" + } +} + +dependencies { + testImplementation("net.jqwik:jqwik:${jqwikVersion}") + + // Fluent assertions library. You can use any other assertions instead. + testImplementation("org.assertj:assertj-core:${assertJVersion}") + + // To work around IntelliJ bug to not provide run test decorator + // https://youtrack.jetbrains.com/issue/IDEA-231482 + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}") +} + diff --git a/jqwik-starter-gradle/gradle.properties b/jqwik-starter-gradle/gradle.properties new file mode 100644 index 0000000..e2c25c6 --- /dev/null +++ b/jqwik-starter-gradle/gradle.properties @@ -0,0 +1,6 @@ +# suppress inspection "UnusedProperty" for whole file + +junitPlatformVersion=1.6.2 +junitJupiterVersion=5.6.2 +assertJVersion=3.16.1 +jqwikVersion=1.3.4 \ No newline at end of file diff --git a/jqwik-starter-gradle/gradle/wrapper/gradle-wrapper.jar b/jqwik-starter-gradle/gradle/wrapper/gradle-wrapper.jar index 62d4c05..e708b1c 100644 Binary files a/jqwik-starter-gradle/gradle/wrapper/gradle-wrapper.jar and b/jqwik-starter-gradle/gradle/wrapper/gradle-wrapper.jar differ diff --git a/jqwik-starter-gradle/gradle/wrapper/gradle-wrapper.properties b/jqwik-starter-gradle/gradle/wrapper/gradle-wrapper.properties index 989c757..5a80c93 100644 --- a/jqwik-starter-gradle/gradle/wrapper/gradle-wrapper.properties +++ b/jqwik-starter-gradle/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Mon Jun 22 09:46:04 CEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +# suppress inspection "UnusedProperty" for whole file + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/jqwik-starter-gradle/gradlew b/jqwik-starter-gradle/gradlew index fbd7c51..4f906e0 100755 --- a/jqwik-starter-gradle/gradlew +++ b/jqwik-starter-gradle/gradlew @@ -130,7 +130,7 @@ fi 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 diff --git a/jqwik-starter-gradle/gradlew.bat b/jqwik-starter-gradle/gradlew.bat index 5093609..107acd3 100644 --- a/jqwik-starter-gradle/gradlew.bat +++ b/jqwik-starter-gradle/gradlew.bat @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -54,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -64,21 +64,6 @@ 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 @@ -86,7 +71,7 @@ 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% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell