title: How to put the res files from the project to the jar in the same folder?
body: <p>I have problem with gradle. 
  I need the res folder had exactly the same location as in the project in order that would be executable file addressed to the resource in the same way as in the "unbuild" project.
  my project file tree:</p>
  
  <pre><code>Project
  +--src
     +--main
        |--kotlin
        +--res
  </code></pre>
  
  <p>In the project resource usage I address in the following way: </p>
  
  <pre><code>var serviceAccount =  FileInputStream("src/main/res/my_resource_file.json")
  </code></pre>
  
  <p>And I need when assembled the project location of the resource file saved in the jar file</p>
  
  <p>my build.gradle file:</p>
  
  <pre><code>group 'Bot'
  version '1.0'
  
  buildscript {
      ext.kotlin_version = '1.1.2'
  
      repositories {
          mavenCentral()
          jcenter()
      }
      dependencies {
          classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
      }
  }
  
  apply plugin: 'kotlin'
  
  repositories {
      mavenCentral()
  }
  
  ext {
      jsoup = "1.10.2"
      //...
      firebase_admin = "5.0.0"
  }
  
  dependencies {
      compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
      //...
      compile "com.google.firebase:firebase-admin:$firebase_admin"
  }
  
  sourceSets {
      main.java.srcDirs += 'src/main/kotlin/'
      test.java.srcDirs += 'src/test/kotlin/'
      main {
          resources {
              srcDirs = ["src/main/res"]
          }
      }
  }
  
  jar {
      manifest {
          attributes 'Main-Class': 'com.my.bot.MainKt'
      }
      from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
  }
  </code></pre>
  
  <p>I suspect that you need to configure this section <code>jar{//...}</code>, but i don't know what did is in gradle</p>