Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AntlrTask doesn't respect non-default source-directories #13016

Closed
snazy opened this issue May 4, 2020 · 3 comments
Closed

AntlrTask doesn't respect non-default source-directories #13016

snazy opened this issue May 4, 2020 · 3 comments

Comments

@snazy
Copy link
Contributor

snazy commented May 4, 2020

Using a custom source-directory for antlr grammar files doesn't work.

For example (Kotlin):

sourceSets {
    main {
        withConvention(AntlrSourceVirtualDirectory::class) {
            this.antlr.srcDir("src/antlr")
        }
    }
}

The above changes the srcDir, but the inputDirectories evaluated in AntlrExecuter still evaluates the default src/main/antlr, which leads to wrong relative directories and in turn a failed build. I.e. spec.getGrammarFiles() uses the correct set of files (in src/antlr), but spect.getInputDirectories() always uses src/main/antlr.

TBH, the nested for-each-loops over the input-directories AND the relative source-grammar files is quite confusing.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Apr 16, 2022
@stale
Copy link

stale bot commented Jun 19, 2022

This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to to let know so we can reopen the issue. Please try to provide steps to reproduce, a quick explanation of your use case or a high-quality pull request.

@stale stale bot closed this as completed Jun 19, 2022
@wolfs wolfs closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
@abextm
Copy link

abextm commented Apr 22, 2023

This is still broken in 8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants