# Kotlin DSL, Gradle and private information

**URL:** <https://discuss.kotlinlang.org/t/kotlin-dsl-gradle-and-private-information/14573>\
**Category:** JavaScript\
**Created:** [October 8, 2019, 10:32am UTC](https://discuss.kotlinlang.org/t/kotlin-dsl-gradle-and-private-information/14573 "2019-10-08T10:32:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marianocaldara](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@marianocaldara](https://discuss.kotlinlang.org/u/marianocaldara)\
**Post date:** [October 8, 2019, 10:32am UTC](https://discuss.kotlinlang.org/t/kotlin-dsl-gradle-and-private-information/14573/1 "2019-10-08T10:32:06Z")

</div>

Hi there!  
I’m working on a porting of a big library from Java to Kotlin and use gradle to create a mpp project.  
Gradle traduce Kotlin to JS and JVM and give the chance to pubblish the module JS to [npmjs.com](http://npmjs.com)  
I have to put private information like password and email somewhere.  
Where? in gradle.properties.kts? or could i create a specific file as npm.properties.kts? Or use enviroment variable?  
Can explain some good pratictes and how i can retrieve them in buildscript?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![imanushin](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/imanushin/32/5471_2.png) [@imanushin](https://discuss.kotlinlang.org/u/imanushin)\
**Post date:** [October 8, 2019, 3:15pm UTC](https://discuss.kotlinlang.org/t/kotlin-dsl-gradle-and-private-information/14573/2 "2019-10-08T15:15:32Z")

</div>

If you use TeamCity, I can suggest password parameters, please check [official docs here](https://www.jetbrains.com/help/teamcity/typed-parameters.html). During the build script you can just read gradle property.

I hope there is the same for Jenkins, GitLab, etc.

---

<div class="post-metadata">

**Author:** ![pdvrieze](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pdvrieze/32/1882_2.png) [@pdvrieze](https://discuss.kotlinlang.org/u/pdvrieze)\
**Post date:** [October 11, 2019, 1:09pm UTC](https://discuss.kotlinlang.org/t/kotlin-dsl-gradle-and-private-information/14573/3 "2019-10-11T13:09:37Z")

</div>

You can use gradle.properties in the home directory. Gradle can also read environment variables.
