From 586bc899e8620443c14c9671a543af1f212badf0 Mon Sep 17 00:00:00 2001 From: xterao Date: Thu, 7 Aug 2025 11:48:48 +0900 Subject: [PATCH] Ensure grammar generation tasks run before compilation and build --- .claude/commands/create_pr.md | 1 - build.gradle.kts | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.claude/commands/create_pr.md b/.claude/commands/create_pr.md index ed72d6c1..885c21bd 100644 --- a/.claude/commands/create_pr.md +++ b/.claude/commands/create_pr.md @@ -8,7 +8,6 @@ This document describes the format and rules for creating a Pull Request (PR) on ## PR Guidelines - If there are unstaged changes when creating a pull request, please split them appropriately and commit them separately. -- When using the gh command, first authenticate with ```gh auth login```. - Use the [PR Template](../templates/PR_TEMPLATE.md) for PR descriptions - PR titles should be concise and descriptive - Ensure all tests pass before submitting a PR diff --git a/build.gradle.kts b/build.gradle.kts index dd947fa9..5a970582 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -180,6 +180,28 @@ tasks { publishPlugin { dependsOn(patchChangelog) } + + // Ensure generateLexer and generateParser run before compilation + compileJava { + dependsOn(generateLexer, generateParser) + } + + compileKotlin { + dependsOn(generateLexer, generateParser) + } + + compileTestJava { + dependsOn(generateLexer, generateParser) + } + + compileTestKotlin { + dependsOn(generateLexer, generateParser) + } + + // Ensure build task depends on grammar generation + build { + dependsOn(generateLexer, generateParser) + } } tasks.register("encodeBase64") {