Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support graphql-kotlin-bom #2022

Closed
wants to merge 8 commits into from

Conversation

mykevinjung
Copy link
Contributor

@mykevinjung mykevinjung commented Jul 25, 2024

📝 Description

Adding a support on graphql-kotlin-bom

Generated BOM looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do_not_remove: published-with-gradle-metadata -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.expediagroup</groupId>
  <artifactId>graphql-kotlin-bom</artifactId>
  <version>8.0.0-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>graphql-kotlin-bom</name>
  <description>BOM (Bill Of Materials) for graphql-kotlin</description>
  <url>https://github.com/ExpediaGroup/graphql-kotlin</url>
  <organization>
    <name>https://www.expediagroup.com/</name>
  </organization>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Expedia Group Committers</name>
      <email>[email protected]</email>
      <organization>Expedia Group</organization>
      <organizationUrl>https://www.expediagroup.com/</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/ExpediaGroup/graphql-kotlin.git</connection>
    <developerConnection>scm:git:git://github.com/ExpediaGroup/graphql-kotlin.git</developerConnection>
    <url>https://github.com/ExpediaGroup/graphql-kotlin</url>
  </scm>
  <dependencies>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-automatic-persisted-queries</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-client</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-client-generator</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-client-jackson</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-client-serialization</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-dataloader</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-dataloader-instrumentation</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-federated-hooks-provider</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-federation</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-graalvm-metadata-generator</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-gradle-plugin</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-hooks-provider</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-ktor-client</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-ktor-server</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-maven-plugin</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-schema-generator</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-sdl-generator</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-server</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-spring-client</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.expediagroup</groupId>
      <artifactId>graphql-kotlin-spring-server</artifactId>
      <version>8.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>

🔗 Related Issues

Comment on lines +28 to +51
url.set("https://github.com/ExpediaGroup/graphql-kotlin")
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
organization {
name.set("Expedia Group")
name.set("https://www.expediagroup.com/")
}
developers {
developer {
name.set("Expedia Group Committers")
email.set("[email protected]")
organization.set("Expedia Group")
organizationUrl.set("https://www.expediagroup.com/")
}
}
scm {
connection.set("scm:git:git://github.com/ExpediaGroup/graphql-kotlin.git")
developerConnection.set("scm:git:git://github.com/ExpediaGroup/graphql-kotlin.git")
url.set("https://github.com/ExpediaGroup/graphql-kotlin")
}
Copy link
Contributor Author

@mykevinjung mykevinjung Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are defined in com.expediagroup.graphql.conventions.gradle.kts and other java modules are using id("com.expediagroup.graphql.conventions") plugin. But that plugin is for java libraries, not applicable for this BOM. copy-create with pom packaging.

@dariuszkuc
Copy link
Collaborator

Whats the point/value of the platform jar/bom for this OSS project?

  • for Spring based servers -> you just need to import spring-server and it will transitively include all the other required modules
  • for Ktor based servers -> you just depend on the ktor-server to pull in the deps
  • plugins management doesn't really work with bom?
  • guess for clients it might be useful?

@mykevinjung
Copy link
Contributor Author

@dariuszkuc Applications may need multiple modules. For instance, GraphQL server apps, at least at EG, use server, client for integration test and maven-plugin to generate SDL in common. Also if a team develops a parent POM for other devs, then for instance, server parent POM may include both ktor and spring, and client parent POM may include ktor, spring, serialization or jackson so that app developers can choose whichever server/client module they want. These can be wrapped up in the parent POM but BOM seems to be a better place. Also I thought it's a good practice to provide a BOM in general when there are many modules in the project, 20+ modules here.

@dariuszkuc
Copy link
Collaborator

dariuszkuc commented Jul 26, 2024

If you are keen on creating the platform/bom then I'd suggest to also make it more useful to also specify some required dependency versions (e.g. graphql-kotlin v8 depends on graphql-java v22 etc)

*also a side note -> BOMs won't help with plugin management

@mykevinjung
Copy link
Contributor Author

It seems that the usage of graphql-kotlin requires just one module most time. BOM doesn't seem to be beneficial in this case although there are many modules. closing

@mykevinjung mykevinjung closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants