Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ shadowJar {
include 'com.google.common.math.*'
include 'com.google.common.primitives.*'
}
relocate('org.antlr.v4.runtime', 'graphql.org.antlr.v4.runtime')
dependencies {
include(dependency('com.google.guava:guava:31.0.1-jre'))
include(dependency('org.antlr:antlr4-runtime:' + antlrVersion))
}
from "LICENSE.md"
from "src/main/antlr/Graphql.g4"
Expand All @@ -143,14 +145,14 @@ shadowJar {
//Configure bnd for shadowJar
// -exportcontents: graphql.* Adds all packages of graphql and below to the exported packages list
// -removeheaders: Private-Package Removes the MANIFEST.MF header Private-Package, which contains all the internal packages and
// also the repackaged pckages like guava, which would be wrong after repackaging.
// also the repackaged packages like guava, which would be wrong after repackaging.
// Import-Package: Changes the imported packages header, to exclude guava and dependencies from the import list (! excludes packages)
// Guava was repackaged and included inside the jar, so we need remove it.
// The last ,* copies all the existing imports from the other dependencies, which is required.
bnd('''
-exportcontents: graphql.*
-removeheaders: Private-Package
Import-Package: !com.google.*,!org.checkerframework.*,!javax.annotation.*,!graphql.com.google.*,*
Import-Package: !com.google.*,!org.checkerframework.*,!javax.annotation.*,!graphql.com.google.*,!org.antlr.*,!graphql.org.antlr.*,*
''')
}

Expand Down Expand Up @@ -238,15 +240,15 @@ publishing {
classifier "javadoc"
}
pom.withXml {
// The ANTLR-related code below--introduced in `1ac98bf`--addresses an issue with
// Removing antlr4 below (introduced in `1ac98bf`) addresses an issue with
// the Gradle ANTLR plugin. `1ac98bf` can be reverted and this comment removed once
// that issue is fixed and Gradle upgraded. See https://goo.gl/L92KiF and https://goo.gl/FY0PVR.
//
// We are removing here guava because the classes we want to use is "shaded" into the jar itself
// Removing antlr4-runtime and guava because the classes we want to use are "shaded" into the jar itself
// via the shadowJar task
def pomNode = asNode()
pomNode.dependencies.'*'.findAll() {
it.artifactId.text() == 'antlr4' || it.artifactId.text() == 'guava'
it.artifactId.text() == 'antlr4' || it.artifactId.text() == 'antlr4-runtime' || it.artifactId.text() == 'guava'
}.each() {
it.parent().remove(it)
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/execution/ExecutionContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ public OperationDefinition getOperationDefinition() {
}

/**
* @return map of coerced variables
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixing up javadoc warnings, unrelated to antlr

*
* @deprecated use {@link #getCoercedVariables()} instead
*/
@Deprecated
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/graphql/execution/ExecutionContextBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ public ExecutionContextBuilder root(Object root) {
}

/**
* @param variables map of already coerced variables
* @return this builder
*
* @deprecated use {@link #coercedVariables(CoercedVariables)} instead
*/
@Deprecated
Expand Down