ErickErickson commented on a change in pull request #1199: LUCENE-9134: Port ant-regenerate tasks to Gradle build URL: https://github.com/apache/lucene-solr/pull/1199#discussion_r370969055
########## File path: lucene/queryparser/build.gradle ########## @@ -7,3 +7,305 @@ dependencies { testImplementation project(':lucene:test-framework') } + +configure(":lucene:queryparser") { + configurations { + javaCCDeps + + dependencies { + javaCCDeps "net.java.dev.javacc:javacc:5.0" + } + } +} +def conf = [ + "queryParser": ["inputFile": file('src/java/org/apache/lucene/queryparser/classic/QueryParser.jj'), "outputDir": file('src/java/org/apache/lucene/queryparser/classic')], + "surround" : ["inputFile": file('src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj'), "outputDir": file('src/java/org/apache/lucene/queryparser/surround/parser/')], + "flexible" : ["inputFile": file('src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj'), "outputDir": file('src/java/org/apache/lucene/queryparser/flexible/standard/parser')] +] + +String javaCCClasspath +String javaCCHome + +task installJavacc { + doLast { + javaCCClasspath = project.project(":lucene:queryparser").configurations.javaCCDeps.asPath + javaCCHome = javaCCClasspath.substring(0, javaCCClasspath.lastIndexOf("/")) + + String hacky = javaCCHome + "/" + "javacc.jar" Review comment: From what I can tell, the ant JavaCC task _requires_ the file be named javacc.jar and what's downloaded is javacc-5.0.jar (ancient, I know). I can't find a place to download it from so I'm relying on the Gradle dependency magic to get it in the first place. But then it needs to be renamed. I'll make this a little neater and add a comment. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org