diff --git a/plugins/graphql-kotlin-gradle-plugin/src/integration/client-deprecated-type/build.gradle.kts b/plugins/graphql-kotlin-gradle-plugin/src/integration/client-deprecated-type/build.gradle.kts index a5e1a432c8..eb7e00ff5d 100644 --- a/plugins/graphql-kotlin-gradle-plugin/src/integration/client-deprecated-type/build.gradle.kts +++ b/plugins/graphql-kotlin-gradle-plugin/src/integration/client-deprecated-type/build.gradle.kts @@ -1,8 +1,9 @@ import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateClientTask +@Suppress("DSL_SCOPE_VIOLATION") // TODO: remove once KTIJ-19369 / Gradle#22797 is fi plugins { id("com.expediagroup.graphql") - kotlin("jvm") version "1.7.21" + alias(libs.plugins.kotlin.jvm) } repositories { @@ -16,7 +17,7 @@ repositories { dependencies { implementation("com.expediagroup:graphql-kotlin-spring-client") - implementation("org.jetbrains.kotlin:kotlin-stdlib:1.7.21") + implementation(libs.kotlin.stdlib) } val graphqlGenerateClient by tasks.getting(GraphQLGenerateClientTask::class) { diff --git a/plugins/graphql-kotlin-gradle-plugin/src/integration/download-sdl-timeout/build.gradle.kts b/plugins/graphql-kotlin-gradle-plugin/src/integration/download-sdl-timeout/build.gradle.kts index 47fc35fcde..3bb56210f6 100644 --- a/plugins/graphql-kotlin-gradle-plugin/src/integration/download-sdl-timeout/build.gradle.kts +++ b/plugins/graphql-kotlin-gradle-plugin/src/integration/download-sdl-timeout/build.gradle.kts @@ -1,9 +1,10 @@ import com.expediagroup.graphql.plugin.gradle.config.TimeoutConfiguration import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLDownloadSDLTask +@Suppress("DSL_SCOPE_VIOLATION") // TODO: remove once KTIJ-19369 / Gradle#22797 is fi plugins { id("com.expediagroup.graphql") - kotlin("jvm") version "1.7.21" + alias(libs.plugins.kotlin.jvm) } repositories { @@ -17,7 +18,7 @@ repositories { dependencies { implementation("com.expediagroup:graphql-kotlin-spring-client") - implementation("org.jetbrains.kotlin:kotlin-stdlib:1.7.21") + implementation(libs.kotlin.stdlib) } val serverUrl = System.getenv("wireMockServerUrl") ?: System.getProperty("wireMockServerUrl") diff --git a/plugins/graphql-kotlin-gradle-plugin/src/integration/introspection-timeout/build.gradle.kts b/plugins/graphql-kotlin-gradle-plugin/src/integration/introspection-timeout/build.gradle.kts index 3a9fc95657..b336b87768 100644 --- a/plugins/graphql-kotlin-gradle-plugin/src/integration/introspection-timeout/build.gradle.kts +++ b/plugins/graphql-kotlin-gradle-plugin/src/integration/introspection-timeout/build.gradle.kts @@ -1,27 +1,28 @@ import com.expediagroup.graphql.plugin.gradle.config.TimeoutConfiguration import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLIntrospectSchemaTask +@Suppress("DSL_SCOPE_VIOLATION") // TODO: remove once KTIJ-19369 / Gradle#22797 is fi plugins { - kotlin("jvm") version "1.7.21" - id("com.expediagroup.graphql") + id("com.expediagroup.graphql") + alias(libs.plugins.kotlin.jvm) } repositories { - mavenCentral() - mavenLocal { - content { - includeGroup("com.expediagroup") + mavenCentral() + mavenLocal { + content { + includeGroup("com.expediagroup") + } } - } } dependencies { - implementation("org.jetbrains.kotlin:kotlin-stdlib:1.7.21") - implementation("com.expediagroup:graphql-kotlin-spring-client") + implementation("com.expediagroup:graphql-kotlin-spring-client") + implementation(libs.kotlin.stdlib) } val serverUrl = System.getenv("wireMockServerUrl") ?: System.getProperty("wireMockServerUrl") val graphqlIntrospectSchema by tasks.getting(GraphQLIntrospectSchemaTask::class) { - endpoint.set("$serverUrl/graphql") - timeoutConfig.set(com.expediagroup.graphql.plugin.gradle.config.TimeoutConfiguration(connect = 100, read = 100)) + endpoint.set("$serverUrl/graphql") + timeoutConfig.set(com.expediagroup.graphql.plugin.gradle.config.TimeoutConfiguration(connect = 100, read = 100)) } diff --git a/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLDownloadSDLTaskIT.kt b/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLDownloadSDLTaskIT.kt index 1514e22d3a..7b4fc099f5 100755 --- a/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLDownloadSDLTaskIT.kt +++ b/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLDownloadSDLTaskIT.kt @@ -38,6 +38,9 @@ class GraphQLDownloadSDLTaskIT : WireMockAbstractIT() { val sourceDirectory = File("src/integration/download-sdl-timeout") sourceDirectory.copyRecursively(testProjectDirectory) + // version catalog setup + File("../../gradle/libs.versions.toml").copyTo(File(testProjectDirectory, "gradle/libs.versions.toml")) + WireMock.reset() WireMock.stubFor(stubSdlEndpoint(delay = 10_000)) diff --git a/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLGenerateClientTaskIT.kt b/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLGenerateClientTaskIT.kt index 0dd7370bba..7781f81c36 100755 --- a/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLGenerateClientTaskIT.kt +++ b/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLGenerateClientTaskIT.kt @@ -37,6 +37,9 @@ class GraphQLGenerateClientTaskIT : WireMockAbstractIT() { val sourceDirectory = File("src/integration/download-sdl-timeout") sourceDirectory.copyRecursively(testProjectDirectory) + // version catalog setup + File("../../gradle/libs.versions.toml").copyTo(File(testProjectDirectory, "gradle/libs.versions.toml")) + val buildResult = GradleRunner.create() .withProjectDir(testProjectDirectory) .withPluginClasspath() diff --git a/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLIntrospectSchemaTaskIT.kt b/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLIntrospectSchemaTaskIT.kt index 93d5a1abd0..cccbeff5cc 100755 --- a/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLIntrospectSchemaTaskIT.kt +++ b/plugins/graphql-kotlin-gradle-plugin/src/test/kotlin/com/expediagroup/graphql/plugin/gradle/tasks/GraphQLIntrospectSchemaTaskIT.kt @@ -38,6 +38,9 @@ class GraphQLIntrospectSchemaTaskIT : WireMockAbstractIT() { val sourceDirectory = File("src/integration/introspection-timeout") sourceDirectory.copyRecursively(testProjectDirectory) + // version catalog setup + File("../../gradle/libs.versions.toml").copyTo(File(testProjectDirectory, "gradle/libs.versions.toml")) + WireMock.reset() WireMock.stubFor(stubIntrospectionResult(delay = 10_000))