ExpediaGroup / graphql-kotlin

Libraries for running GraphQL in Kotlin
https://opensource.expediagroup.com/graphql-kotlin/
Apache License 2.0
1.73k stars 345 forks source link

Build error with google app engine plugin #2035

Open ronjunevaldoz opened 1 month ago

ronjunevaldoz commented 1 month ago

Library Version version: 8.0.0

Describe the bug Build error

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Some problems were found with the configuration of task ':server:graphqlGenerateClient' (type 'GraphQLGenerateClientTask').
  - In plugin 'com.expediagroup.graphql' type 'com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateClientTask' property 'packageName' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'packageName'.
      2. Mark property 'packageName' as optional.

    For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#value_not_set in the Gradle documentation.
  - In plugin 'com.expediagroup.graphql' type 'com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateClientTask' property 'schemaFile' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'schemaFile'.
      2. Mark property 'schemaFile' as optional.

    For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#value_not_set in the Gradle documentation.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Some problems were found with the configuration of task ':server:graphqlGenerateTestClient' (type 'GraphQLGenerateTestClientTask').
  - In plugin 'com.expediagroup.graphql' type 'com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateTestClientTask' property 'packageName' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'packageName'.
      2. Mark property 'packageName' as optional.

    For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#value_not_set in the Gradle documentation.
  - In plugin 'com.expediagroup.graphql' type 'com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateTestClientTask' property 'queryFileDirectory' specifies directory '/Users/ronjunevaldoz/StudioProjects/golearnph/server/src/test/resources' which doesn't exist.

    Reason: An input file was expected to be present but it doesn't exist.

    Possible solutions:
      1. Make sure the directory exists before the task is called.
      2. Make sure that the task which produces the directory is declared as an input.

    For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#input_file_does_not_exist in the Gradle documentation.
  - In plugin 'com.expediagroup.graphql' type 'com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateTestClientTask' property 'schemaFile' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'schemaFile'.
      2. Mark property 'schemaFile' as optional.

    For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#value_not_set in the Gradle documentation.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

To Reproduce Steps to reproduce the behavior. Please provide:

plugins { alias(libs.plugins.kotlinJvm) alias(libs.plugins.kotlinSerialization) alias(libs.plugins.ktor) alias(libs.plugins.graphql) alias(libs.plugins.appengine) alias(libs.plugins.realm) alias(libs.plugins.shadow) application }

configure { stage { setArtifact("build/libs/${project.name}-all.jar") } deploy { version = "1.0.0" projectId = "PROJECT" } }


**Expected behavior**
- [ ] Able to build successfully
- [ ] Move separate server & client graphql library & plugin?

**Temporary solution**
- Disable these tasks
  - graphqlGenerateClient
  - graphqlGenerateTestClient

```kotlin
// disable graphql tasks due to build error while installing google app engine plugin.
val tasksToDisable = listOf("graphqlGenerateClient", "graphqlGenerateTestClient")
tasksToDisable.forEach { taskName ->
    tasks.named(taskName) {
        enabled = false
    }
}