Declaring a directory dependency in Gradle

I have an application that reads some files during its operation. These files are grouped in a directory dir which I would like to add as a dependency to Gradle. However when I add the following lines to my build.gradle, the files inside the directory dir are added to lib directory instead of dir with its files:

dependencies {
    runtime files('dir')
}

How do I declare a dependency to dir in such a way that the directory and not just its contents are added to lib?

Current result:

.
+-- lib
|   +-- file1.txt
|   +-- file2.txt

Desired result:

.
+-- lib
|   +-- dir
    |   +-- file1.txt
    |   +-- file2.txt

PS: one strange point is that the CLASSPATH in launch scripts is:

CLASSPATH=$APP_HOME/lib/dir