roryqi commented on code in PR #14237:
URL: https://github.com/apache/gravitino/pull/14237#discussion_r4399800645
##########
core/build.gradle.kts:
##########
@@ -227,11 +239,52 @@ tasks.test {
}
tasks.withType<JavaCompile>().configureEach {
+ options.errorprone.excludedPaths.set(".*/generated-src/antlr/.*")
if (name.contains("jcstress", ignoreCase = true)) {
- options.errorprone.excludedPaths.set(".*/generated/.*")
+
options.errorprone.excludedPaths.set(".*/(generated|generated-src/antlr)/.*")
}
}
+// The generator is build tooling; only antlr4-runtime belongs on the server
classpath.
+configurations.matching { it.name in setOf("api", "implementation")
}.configureEach {
+ setExtendsFrom(extendsFrom.filterNot { it.name == "antlr" })
+}
+
+tasks.generateGrammarSource {
+ arguments = arguments + listOf("-visitor", "-no-listener", "-package",
"org.apache.gravitino.policy.sql.antlr")
+}
+
+tasks.named<Jar>("sourcesJar") {
+ dependsOn(tasks.generateGrammarSource)
+}
+
+val shadedCoreJar = tasks.named<ShadowJar>("shadowJar") {
+ configurations = listOf(shadedAntlr)
+ archiveClassifier.set("")
+ relocate("org.antlr.v4.runtime",
"org.apache.gravitino.shaded.org.antlr.v4.runtime")
Review Comment:
Fixed in b5eaee4375: added ANTLR4 to the BSD section of LICENSE.lance. Ran
./gradlew compileLanceRESTServer -PskipTests -PskipITs successfully and
confirmed the standalone package contains the updated LICENSE,
licenses/antlr4.txt, and the shaded core JAR. Thanks for catching the
additional packaging path!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]