[ https://issues.apache.org/jira/browse/LUCENE-9134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17015608#comment-17015608 ]
Erick Erickson commented on LUCENE-9134: ---------------------------------------- OK, bear with me, I'm finally getting my feet wet. First, let me check the magic: settings.gradle essentially points to all the directories containing a build.gradle file we care about, so any task defined in one of the build.gradle files will be found. So when I just added tasks (well, copied some of Marks work as a way to start) into lucene/queryparser/build.gradle) tasks are magically found and I can try to execute "./gradlew regenerate" for instance, which in turn eventually depends on a task (among others) defined like so: {code} task runJavaccQueryParser(type: org.apache.lucene.gradle.JavaCC)... {code} and fails with {code} Could not get unknown property 'org' for project ':lucene:queryparser' of type org.gradle.api.Project. {code} but at least it tries. Which brings me to the next bit. Mark's work has a directory here: ./buildSrc/src/main/groovy/org/apache/lucene/gradle which has a file JavaCC.groovy that defines the JavaCC class: {code} org.apache.lucene.gradle class JavaCC..... {code} How are we organizing this kind of thing in the current work? I can move the JavaCC.groovy file anywhere it should go, where would that be? And before I do that, is there a better approach to this problem? > Port ant-regenerate tasks to Gradle build > ----------------------------------------- > > Key: LUCENE-9134 > URL: https://issues.apache.org/jira/browse/LUCENE-9134 > Project: Lucene - Core > Issue Type: Sub-task > Reporter: Erick Erickson > Assignee: Erick Erickson > Priority: Major > > Here are the "regenerate" targets I found in the ant version. There are a > couple that I don't have evidence for or against being rebuilt > // Very top level > {code:java} > ./build.xml: <target name="regenerate" description="Runs all code > regenerators"> > ./build.xml: <subant target="regenerate" inheritall="false" > failonerror="true"> > ./build.xml: <target name="regenerateAndCheck" > depends="regenerate,-check-after-regeneration"/> > {code} > // top level Lucene. This includes the core/build.xml and > test-framework/build.xml files > {code:java} > ./lucene/build.xml: <target name="regenerate"> > ./lucene/build.xml: <subant target="regenerate" failonerror="true" > inheritall="false"> > ./lucene/build.xml: <modules-crawl target="regenerate"/> > {code} > // This one has quite a number of customizations to > {code:java} > ./lucene/core/build.xml: <target name="regenerate" > depends="createLevAutomata,createPackedIntSources,jflex"/> > {code} > // This one has a bunch of code modifications _after_ javacc is run on > certain of the > // output files. Save this one for last? > {code:java} > ./lucene/queryparser/build.xml: <target name="regenerate" depends="javacc"/> > {code} > // the files under ../lucene/analysis... are pretty self contained. I expect > these could be done as a unit > {code:java} > ./lucene/analysis/build.xml: <target name="regenerate"> > ./lucene/analysis/build.xml: <forall-analyzers target="regenerate"/> > ./lucene/analysis/common/build.xml: <target name="regenerate" > depends="jflex,unicode-data"/> > ./lucene/analysis/icu/build.xml: <target name="regenerate" > depends="gen-utr30-data-files,gennorm2,genrbbi"/> > ./lucene/analysis/kuromoji/build.xml: <target name="regenerate" > depends="build-dict"/> > ./lucene/analysis/nori/build.xml: <target name="regenerate" > depends="build-dict"/> > ./lucene/analysis/opennlp/build.xml: <target name="regenerate" > depends="train-test-models"/> > {code} > > // These _are_ regenerated from the top-level regenerate target, but for -- > LUCENE-9080//the changes were only in imports so there are no > //corresponding files checked in in that JIRA > {code:java} > ./lucene/expressions/build.xml: <target name="regenerate" > depends="run-antlr"/> > {code} > // Apparently unrelated to ./lucene/analysis/opennlp/build.xml > "train-test-models" target > // Apparently not rebuilt from the top level, but _are_ regenerated when > executed from > // ./solr/contrib/langid > {code:java} > ./solr/contrib/langid/build.xml: <target name="regenerate" > depends="train-test-models"/> > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org