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

[🐘gradle-plugin] Remix the multi-module configurations once again #6027

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

martinbonnin
Copy link
Contributor

  • Introduce the com.apollographql.direction attribute and use it to disambiguate the downstream dependencies.
  • Always create configurations in groups of 3: scope, resolvable, consumable.
  • Hide internal API.
  • Update migration guide.

@martinbonnin martinbonnin requested review from a team and BoD as code owners July 4, 2024 10:02
Copy link

netlify bot commented Jul 4, 2024

Deploy Preview for apollo-android-docs canceled.

Name Link
🔨 Latest commit 047c140
🔍 Latest deploy log https://app.netlify.com/sites/apollo-android-docs/deploys/6686739f26ada2000888c6b8

Comment on lines -67 to 69
val existingService = services.firstOrNull {
it.name == serviceName
}
if (existingService != null) {
existingService.isADependencyOf(project.rootProject.project(projectPath))
} else {
pendingDownstreamDependencies.compute(serviceName) { _, oldValue ->
oldValue.orEmpty() + projectPath
project.configurations.configureEach {
if (it.name == ModelNames.configuration(serviceName, ApolloDirection.Downstream, ApolloUsage.Ir, ConfigurationKind.DependencyScope)) {
it.dependencies.add(project.dependencies.project(mapOf("path" to projectPath)))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual fix. If existingService was not null, it's too late to call isADependencyOf().

Copy link
Contributor

@BoD BoD left a comment

Choose a reason for hiding this comment

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

🚀

@martinbonnin martinbonnin merged commit 8a273b5 into main Jul 4, 2024
9 checks passed
@martinbonnin martinbonnin deleted the fix-hedvig branch July 4, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants