netty-shaded: Use compile instead of runtime dependency in pom (#5901)

Maven does not include transitive runtime dependencies in the
compile-time classpath (testing shows Gradle 4 does; docs say
Gradle 5 doesn't). So if a user references the shaded
NettyServerBuilder without also depending on grpc-core directly,
compilation will fail because AbstractServerImplBuilder couldn't
be found.

This isn't technically a problem, since we're not wanting to encourage
users to reference the shaded classes directly. But some users will
certainly reference the classes anyway and the error is pretty confusing
while also being trivially worked around. In other words: it justs
wastes people's time and benefits nobody.

Fixes #5881
This commit is contained in:
Eric Anderson 2019-06-19 09:51:00 -07:00 committed by GitHub
parent 6e2bb6b402
commit 3d289213ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ publishing {
dependencyNode.appendNode('artifactId', dep.name)
def version = (dep.name == 'grpc-core') ? '[' + dep.version + ']' : dep.version
dependencyNode.appendNode('version', version)
dependencyNode.appendNode('scope', 'runtime')
dependencyNode.appendNode('scope', 'compile')
}
}
}