diff --git a/build.gradle b/build.gradle index 8f6066963..35666a53c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,3 @@ -import org.jetbrains.kotlin.gradle.dsl.KotlinVersion -import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask - /* * * Copyright 2020 Netflix, Inc. @@ -21,7 +18,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask plugins { id 'org.jetbrains.kotlin.jvm' version "2.0.21" apply false - id 'com.netflix.nebula.netflixoss' version '11.6.0' + id 'com.netflix.nebula.netflixoss' version '12.0.0' id "org.jmailen.kotlinter" version "5.0.1" } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 000000000..1ba293f84 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +# The Kotlin Multiplatform POM rewriter in Kotlin 2.0.21 uses a Gradle API removed in Gradle 9; this JVM-only build does not need that rewrite. +kotlin.mpp.keepMppDependenciesIntactInPoms=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 1b33c55ba..d997cfc60 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 78cb6e16a..8e61ef125 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 23d15a936..739907dfd 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" diff --git a/gradlew.bat b/gradlew.bat index 5eed7ee84..e509b2dd8 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/graphql-dgs-codegen-gradle/build.gradle b/graphql-dgs-codegen-gradle/build.gradle index a1feb87fb..8ba39efa4 100644 --- a/graphql-dgs-codegen-gradle/build.gradle +++ b/graphql-dgs-codegen-gradle/build.gradle @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask + /* * * Copyright 2020 Netflix, Inc. @@ -22,6 +24,13 @@ plugins { apply plugin: 'java-gradle-plugin' +// Gradle 9.4.1 exposes newer Kotlin metadata; tolerate it here to keep consumers on Kotlin 2.0.21 and detangle from the Kotlin upgrade. +tasks.withType(KotlinCompilationTask).configureEach { + compilerOptions { + freeCompilerArgs.add('-Xskip-metadata-version-check') + } +} + dependencies { api project(':graphql-dgs-codegen-core') compileOnly 'com.netflix.nebula:gradle-dependency-lock-plugin:15.2.0' diff --git a/graphql-dgs-codegen-gradle/src/main/kotlin/com/netflix/graphql/dgs/codegen/gradle/GenerateJavaTask.kt b/graphql-dgs-codegen-gradle/src/main/kotlin/com/netflix/graphql/dgs/codegen/gradle/GenerateJavaTask.kt index e8f520275..e10ac4f61 100644 --- a/graphql-dgs-codegen-gradle/src/main/kotlin/com/netflix/graphql/dgs/codegen/gradle/GenerateJavaTask.kt +++ b/graphql-dgs-codegen-gradle/src/main/kotlin/com/netflix/graphql/dgs/codegen/gradle/GenerateJavaTask.kt @@ -31,12 +31,14 @@ import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Provider import org.gradle.api.provider.ProviderFactory import org.gradle.api.tasks.* +import org.gradle.work.DisableCachingByDefault import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper import java.io.File import java.nio.file.Paths import java.util.* import javax.inject.Inject +@DisableCachingByDefault(because = "Generated sources may contain timestamps and are not always reproducible") open class GenerateJavaTask @Inject constructor( @@ -50,6 +52,7 @@ open class GenerateJavaTask .asFile.absolutePath @get:InputFiles + @get:PathSensitive(PathSensitivity.RELATIVE) var schemaPaths: MutableList = mutableListOf("${project.projectDir}/src/main/resources/schema") fun setSchemaPaths(paths: FileCollection) { diff --git a/graphql-dgs-codegen-gradle/src/test/kotlin/com/netflix/graphql/dgs/CodegenGradlePluginTest.kt b/graphql-dgs-codegen-gradle/src/test/kotlin/com/netflix/graphql/dgs/CodegenGradlePluginTest.kt index 654e3a289..acfcc7a74 100644 --- a/graphql-dgs-codegen-gradle/src/test/kotlin/com/netflix/graphql/dgs/CodegenGradlePluginTest.kt +++ b/graphql-dgs-codegen-gradle/src/test/kotlin/com/netflix/graphql/dgs/CodegenGradlePluginTest.kt @@ -37,8 +37,6 @@ class CodegenGradlePluginTest { .withProjectDir(File("src/test/resources/test-project/")) .withPluginClasspath() .withArguments( - "-c", - "smoke_test_settings.gradle", "tasks", "--all", ).forwardOutput() @@ -56,8 +54,6 @@ class CodegenGradlePluginTest { .withProjectDir(File("src/test/resources/test-project/")) .withPluginClasspath() .withArguments( - "-c", - "smoke_test_settings.gradle", "clean", "copyMainSources", ).forwardOutput() @@ -78,8 +74,6 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings.gradle", "clean", "build", ).forwardOutput() @@ -102,10 +96,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_with_default_dir.gradle", - "-b", - "build_with_default_dir.gradle", + "-PtestBuildFile=build_with_default_dir.gradle", "clean", "build", ).forwardOutput() @@ -128,10 +119,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_with_default_dir.gradle", - "-b", - "build_with_default_dir.gradle", + "-PtestBuildFile=build_with_default_dir.gradle", "clean", "build", ).forwardOutput() @@ -155,10 +143,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_with_default_dir.gradle", - "-b", - "build_with_default_dir.gradle", + "-PtestBuildFile=build_with_default_dir.gradle", "clean", "build", ).forwardOutput() @@ -184,10 +169,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_jackson_override.gradle", - "-b", - "build_with_jackson_override.gradle", + "-PtestBuildFile=build_with_jackson_override.gradle", "clean", "generateJava", ).forwardOutput() @@ -206,10 +188,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_invalid_jackson.gradle", - "-b", - "build_with_invalid_jackson_version.gradle", + "-PtestBuildFile=build_with_invalid_jackson_version.gradle", "clean", "generateJava", ).forwardOutput() @@ -231,10 +210,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_jackson3.gradle", - "-b", - "build_with_jackson3.gradle", + "-PtestBuildFile=build_with_jackson3.gradle", "clean", "generateJava", ).forwardOutput() @@ -257,7 +233,6 @@ class CodegenGradlePluginTest { // generateKotlinNullableClasses is enabled so Jackson version detection (the lazy // rootComponent classpath walk) actually runs under the configuration cache. assertConfigurationCacheRoundTrip( - settingsFile = "smoke_test_settings_nullable.gradle", buildFile = "build_with_nullable_classes.gradle", ) } @@ -272,8 +247,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_schema_paths_provider.gradle", + "-PtestBuildFile=build_with_schema_paths_provider.gradle", "clean", "generateJava", ).forwardOutput() @@ -293,8 +267,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_schema_paths_filecollection.gradle", + "-PtestBuildFile=build_with_schema_paths_filecollection.gradle", "clean", "generateJava", ).forwardOutput() @@ -311,7 +284,7 @@ class CodegenGradlePluginTest { .create() .withProjectDir(File("src/test/resources/test-project/")) .withPluginClasspath() - .withArguments("-c", "smoke_test_settings_nested_schema_paths.gradle", "clean", "generateJava") + .withArguments("-PtestBuildFile=build_with_nested_schema_paths.gradle", "clean", "generateJava") .build() assertThat(result.task(":generateJava")?.outcome).isEqualTo(SUCCESS) @@ -330,8 +303,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "smoke_test_settings_schema_paths_addall.gradle", + "-PtestBuildFile=build_with_schema_paths_addall.gradle", "clean", "generateJava", ).forwardOutput() @@ -344,18 +316,15 @@ class CodegenGradlePluginTest { @Test fun schemaPathsFileCollectionIsConfigurationCacheCompatible() { - assertConfigurationCacheRoundTrip("smoke_test_settings_schema_paths_filecollection.gradle") + assertConfigurationCacheRoundTrip("build_with_schema_paths_filecollection.gradle") } @Test fun schemaPathsProviderIsConfigurationCacheCompatible() { - assertConfigurationCacheRoundTrip("smoke_test_settings_schema_paths_provider.gradle") + assertConfigurationCacheRoundTrip("build_with_schema_paths_provider.gradle") } - private fun assertConfigurationCacheRoundTrip( - settingsFile: String, - buildFile: String? = null, - ) { + private fun assertConfigurationCacheRoundTrip(buildFile: String) { val projectDir = File("src/test/resources/test-project/") fun run() = @@ -364,19 +333,12 @@ class CodegenGradlePluginTest { .withProjectDir(projectDir) .withPluginClasspath() .withArguments( - buildList { - add("--stacktrace") - add("--configuration-cache") - add("--configuration-cache-problems=fail") - add("-c") - add(settingsFile) - if (buildFile != null) { - add("-b") - add(buildFile) - } - add("clean") - add("generateJava") - }, + "--stacktrace", + "--configuration-cache", + "--configuration-cache-problems=fail", + "-PtestBuildFile=$buildFile", + "clean", + "generateJava", ).forwardOutput() .build() @@ -401,7 +363,7 @@ class CodegenGradlePluginTest { // @InputFiles after changing how schemaPaths accepts and resolves inputs. val sourceDir = File("src/test/resources/test-project") File(sourceDir, "build.gradle").copyTo(File(tempDir, "build.gradle")) - File(sourceDir, "smoke_test_settings.gradle").copyTo(File(tempDir, "smoke_test_settings.gradle")) + File(sourceDir, "settings.gradle").copyTo(File(tempDir, "settings.gradle")) File(sourceDir, "src").copyRecursively(File(tempDir, "src")) fun run(vararg tasks: String) = @@ -409,7 +371,7 @@ class CodegenGradlePluginTest { .create() .withProjectDir(tempDir) .withPluginClasspath() - .withArguments("--stacktrace", "-c", "smoke_test_settings.gradle", *tasks) + .withArguments("--stacktrace", *tasks) .forwardOutput() .build() @@ -456,8 +418,7 @@ class CodegenGradlePluginTest { .withPluginClasspath() .withArguments( "--stacktrace", - "-c", - "settings_relative_file.gradle", + "-PtestServerBuildFile=build_with_relative_file.gradle", "clean", ":server:generateJava", ).forwardOutput() diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project-multimodule/settings.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project-multimodule/settings.gradle index f76f3fd2c..a6a849839 100644 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project-multimodule/settings.gradle +++ b/graphql-dgs-codegen-gradle/src/test/resources/test-project-multimodule/settings.gradle @@ -18,3 +18,7 @@ rootProject.name = 'multimodule-root' include 'server' + +if (gradle.startParameter.projectProperties.containsKey('testServerBuildFile')) { + project(':server').buildFileName = gradle.startParameter.projectProperties['testServerBuildFile'] +} diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project-multimodule/settings_relative_file.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project-multimodule/settings_relative_file.gradle deleted file mode 100644 index 13a9c3b6d..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project-multimodule/settings_relative_file.gradle +++ /dev/null @@ -1,21 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -rootProject.name = 'multimodule-root' -include 'server' -project(':server').buildFileName = 'build_with_relative_file.gradle' diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_jackson_override.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/settings.gradle similarity index 75% rename from graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_jackson_override.gradle rename to graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/settings.gradle index 226651f08..79ca6d670 100644 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_jackson_override.gradle +++ b/graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/settings.gradle @@ -16,5 +16,8 @@ * */ -include 'smoke_test_settings.gradle' -rootProject.buildFileName = 'build_with_jackson_override.gradle' +rootProject.name = 'test-project' + +if (gradle.startParameter.projectProperties.containsKey('testBuildFile')) { + rootProject.buildFileName = gradle.startParameter.projectProperties['testBuildFile'] +} diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/smoke_test_settings.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/smoke_test_settings.gradle deleted file mode 100644 index 0a42240e3..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/smoke_test_settings.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -rootProject.name = 'test-project' \ No newline at end of file diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/smoke_test_settings_with_default_dir.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/smoke_test_settings_with_default_dir.gradle deleted file mode 100644 index 515ac39b6..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project-no-schema-files/smoke_test_settings_with_default_dir.gradle +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -include 'smoke_test_settings.gradle' -rootProject.buildFileName = 'build_with_default_dir.gradle' \ No newline at end of file diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_nullable.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/settings.gradle similarity index 75% rename from graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_nullable.gradle rename to graphql-dgs-codegen-gradle/src/test/resources/test-project/settings.gradle index eedc9f87d..79ca6d670 100644 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_nullable.gradle +++ b/graphql-dgs-codegen-gradle/src/test/resources/test-project/settings.gradle @@ -16,5 +16,8 @@ * */ -include 'smoke_test_settings.gradle' -rootProject.buildFileName = 'build_with_nullable_classes.gradle' +rootProject.name = 'test-project' + +if (gradle.startParameter.projectProperties.containsKey('testBuildFile')) { + rootProject.buildFileName = gradle.startParameter.projectProperties['testBuildFile'] +} diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings.gradle deleted file mode 100644 index 0a42240e3..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -rootProject.name = 'test-project' \ No newline at end of file diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_invalid_jackson.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_invalid_jackson.gradle deleted file mode 100644 index aeffa386c..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_invalid_jackson.gradle +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -include 'smoke_test_settings.gradle' -rootProject.buildFileName = 'build_with_invalid_jackson_version.gradle' diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_jackson3.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_jackson3.gradle deleted file mode 100644 index 5ccd5a2a3..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_jackson3.gradle +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -include 'smoke_test_settings.gradle' -rootProject.buildFileName = 'build_with_jackson3.gradle' diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_nested_schema_paths.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_nested_schema_paths.gradle deleted file mode 100644 index adf2ca54c..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_nested_schema_paths.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.buildFileName = 'build_with_nested_schema_paths.gradle' diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_addall.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_addall.gradle deleted file mode 100644 index b19225ca7..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_addall.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -rootProject.buildFileName = 'build_with_schema_paths_addall.gradle' diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_filecollection.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_filecollection.gradle deleted file mode 100644 index 0b69ac2e3..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_filecollection.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -rootProject.buildFileName = 'build_with_schema_paths_filecollection.gradle' diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_provider.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_provider.gradle deleted file mode 100644 index ba03671f6..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_schema_paths_provider.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -rootProject.buildFileName = 'build_with_schema_paths_provider.gradle' diff --git a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_with_default_dir.gradle b/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_with_default_dir.gradle deleted file mode 100644 index 515ac39b6..000000000 --- a/graphql-dgs-codegen-gradle/src/test/resources/test-project/smoke_test_settings_with_default_dir.gradle +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -include 'smoke_test_settings.gradle' -rootProject.buildFileName = 'build_with_default_dir.gradle' \ No newline at end of file diff --git a/scripts/test-examples.py b/scripts/test-examples.py index cc8721c84..4464ddeb2 100755 --- a/scripts/test-examples.py +++ b/scripts/test-examples.py @@ -106,8 +106,9 @@ def infer_build_file(project_dir): return build_file -def run_example_build(settings_file, project_dir): - command = [gradlew, "-p", project_dir, "-c", settings_file, "clean", "check"] +def run_example_build(project_dir): + project_gradlew = f"{project_dir}/gradlew" + command = [project_gradlew, "-p", project_dir, "clean", "check"] str_cmd = " ".join(command) try: Out.info(f"Running {str_cmd}") @@ -172,7 +173,7 @@ def main(argv): infer_build_file(project_root) gradle_settings_file_path = f"{project_root}/settings.gradle.kts" generate_gradle_settings(settings_gradle_kts_template, codegen_version, gradle_settings_file_path) - run_example_build(gradle_settings_file_path, project_root) + run_example_build(project_root) if not keep_project_dir: Out.info(f"Removing {projects_dir}...")