title: Kotlin DSL: Import a versions.gradle.kts into another build.gradle.kts
body: <p>I have created a <code>versions.gradle.kts</code> just like that:</p>
  
  <pre><code>object Defines {
       const val kotlinVersion = "1.2.61"
       const val junitVersion = "5.3.0"
  }
  </code></pre>
  
  <p>Now I want to import and use that files like that:</p>
  
  <pre><code>import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  
  group = "io.github.deglans"
  version = "0.0.1-SNAPSHOT"
  
  plugins {
      application
      kotlin("jvm") version Defines.kotlinVersion
  }
  
  application {
      mainClassName = "io.github.deglans.polishnotation.MainKt"
  }
  
  dependencies {
      compile(kotlin("stdlib-jdk8"))
      testCompile("org.junit.jupiter", "junit-jupiter-api", Defines.junitVersion)
      testRuntime("org.junit.jupiter", "junit-jupiter-engine", Defines.junitVersion)
  }
  
  tasks.withType&lt;KotlinCompile&gt; {
      kotlinOptions.jvmTarget = "1.8"
  }
  </code></pre>
  
  <p>How can I do that?</p>
  
  <p>NOTE:
  I have already seen <a href="https://stackoverflow.com/questions/45753733/ext-in-buildscript-can-not-be-recognised-by-gradle-kotlin-dsl">this post</a> but it is not exactly that I search...</p>