Skip to content

Commit

Permalink
Exclude .g4 files under spark from repository
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoyuki Morita <[email protected]>
  • Loading branch information
ykmr1224 committed May 17, 2024
1 parent 2bba6dd commit 6b4f74b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions spark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
mavenCentral()
}

tasks.register('downloadG4Files', Exec) {
tasks.register('downloadG4Files') {
description = 'Download remote .g4 files from GitHub'

// use doLast to wait the completion of command execution
Expand All @@ -27,6 +27,11 @@ tasks.register('downloadG4Files', Exec) {
args '-o', 'src/main/antlr/SqlBaseParser.g4', 'https://raw.githubusercontent.com/apache/spark/master/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4'
args '-o', 'src/main/antlr/SqlBaseLexer.g4', 'https://raw.githubusercontent.com/apache/spark/master/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseLexer.g4'
}
project.exec {
executable 'ls'

args '-l', 'src/main/antlr/'
}
}
}
clean.delete fileTree('src/main/antlr/') { include '*.g4' }
Expand All @@ -45,8 +50,6 @@ configurations {
// Make sure the downloadG4File task runs before the generateGrammarSource task
generateGrammarSource.dependsOn downloadG4Files

compileJava.dependsOn generateGrammarSource

dependencies {
antlr "org.antlr:antlr4:4.7.1"

Expand Down

0 comments on commit 6b4f74b

Please sign in to comment.