Support monorepo builds by forking the build.gradle into two files #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Shopify in the android repo will soon be split into two modules (app and core) but the
graphql_java_gensupport module is not compatible with this configurationWe are getting the following error:
The reason for this is the
dependenciesblock in thebuild.gradle. When building the support library on its own, this is a valid construct. However, when part of the monorepo, the supportbuild.gradlefile is included as a submodule and the dependency resolution strategy on modern gradle versions does not allow for submodules to modify the classpath.So, my solution is simple. Remove the unsupported
dependencystatement and move the remaining contents of the build.gradle file into a newgraphql.java.gen.build.gradlefile. This new file will be referenced by the monorepo. Then, create a simple stubbuild.gradlethat continues to reference thebintraydependency and then includes the new file.