# How to implement a programming language compiler plugin?

**URL:** <https://discuss.gradle.org/t/how-to-implement-a-programming-language-compiler-plugin/44394>\
**Category:** Help/Discuss\
**Created:** [December 3, 2022, 12:15pm UTC](https://discuss.gradle.org/t/how-to-implement-a-programming-language-compiler-plugin/44394 "2022-12-03T12:15:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bleser](https://avatars.discourse-cdn.com/v4/letter/b/7cd45c/32.png) [@Bleser](https://discuss.gradle.org/u/Bleser)\
**Post date:** [December 3, 2022, 12:15pm UTC](https://discuss.gradle.org/t/how-to-implement-a-programming-language-compiler-plugin/44394/1 "2022-12-03T12:15:39Z")

</div>

I looked at the existing plugins for java, scala, but it’s completely incomprehensible how the source code is searched, the compiler is checked, the compiler is launched.  
There are only trivial examples in the documentation.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [December 4, 2022, 11:10pm UTC](https://discuss.gradle.org/t/how-to-implement-a-programming-language-compiler-plugin/44394/2 "2022-12-04T23:10:38Z")

</div>

I guess that is a too complex question for a simple forum post like here.

Such a task can reach from a simple task implementation using `execOperations.exec` to call some compile executable with arguments, to very fancy logic involving compile-avoidance if only non-ABI changes were done and so on.
