Skip to content

Commit

Permalink
Added dependencies for antlr and kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Jul 23, 2023
1 parent 206c4c7 commit edc2350
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 11 additions & 1 deletion buildSrc/src/main/kotlin/antlr-grammar.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.nio.file.Files

apply<AntlrPlugin>()

Expand Down Expand Up @@ -42,3 +41,14 @@ tasks {
arguments.addAll(listOf("-package", packageName, "-Werror", "-visitor"))
}
}

try {
tasks.named("compileKotlin") {
dependsOn("generateGrammarSource")
}
tasks.named("compileTestKotlin") {
dependsOn("generateTestGrammarSource")
}
} catch (_: UnknownTaskException) {

}
10 changes: 10 additions & 0 deletions buildSrc/src/main/kotlin/kotlin-common.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,14 @@ tasks {
jvmTarget = "17"
}
}
}
try {
tasks.named("compileKotlin") {
dependsOn("generateGrammarSource")
}
tasks.named("compileTestKotlin") {
dependsOn("generateTestGrammarSource")
}
} catch (_: UnknownTaskException) {

}

0 comments on commit edc2350

Please sign in to comment.