# Purpose of KotlinCompile#kotlinOptions#noStdlib in Gradle Kotlin plugin

**URL:** <https://discuss.kotlinlang.org/t/purpose-of-kotlincompile-kotlinoptions-nostdlib-in-gradle-kotlin-plugin/13594>\
**Category:** Uncategorized\
**Created:** [July 23, 2019, 11:54am UTC](https://discuss.kotlinlang.org/t/purpose-of-kotlincompile-kotlinoptions-nostdlib-in-gradle-kotlin-plugin/13594 "2019-07-23T11:54:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgoldberg](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@rgoldberg](https://discuss.kotlinlang.org/u/rgoldberg)\
**Post date:** [July 23, 2019, 11:54am UTC](https://discuss.kotlinlang.org/t/purpose-of-kotlincompile-kotlinoptions-nostdlib-in-gradle-kotlin-plugin/13594/1 "2019-07-23T11:54:08Z")

</div>

What is the purpose of `KotlinCompile#kotlinOptions#noStdlib` in the Gradle Kotlin plugin?

It defaults to `true`, but why would I ever set it to `false`?

---

<div class="post-metadata">

**Author:** ![Andrey.Uskov](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@Andrey.Uskov](https://discuss.kotlinlang.org/u/Andrey.Uskov)\
**Post date:** [January 18, 2021, 9:23pm UTC](https://discuss.kotlinlang.org/t/purpose-of-kotlincompile-kotlinoptions-nostdlib-in-gradle-kotlin-plugin/13594/2 "2021-01-18T21:23:22Z")

</div>

> [@rgoldberg](#):
>
> It defaults to `true` , but why would I ever set it to `false` ?

This flag indicates that the compiler should not include the bundled stdlib into the compilation classpath. At the moment (KGP 1.4.30 and newer) there are no reasons to use this flag. KGP adds the corresponding gradle dependency. If you don’t want to have stdlib in classpath, you could use “kotlin.stdlib.default.dependency=false” property.
