ServerSideCat
ServerSideCat

Reputation: 2072

Cannot create empty folder in gradle

It sounds confusing, but...

how to create a simple empty folder in target folder with the help of gradle without copying artifacts and using "into()" method?

Is it a simple way to do it not using native Groovy, but Gradle?

Upvotes: 11

Views: 14273

Answers (2)

gavenkoa
gavenkoa

Reputation: 48853

Now mkdir is built-in:

project.mkdir "${someDir}/subdir"

Upvotes: 8

Opal
Opal

Reputation: 84834

Why don't you just try:

new File('lol').mkdirs()

With gradle:

project.file('lol').mkdirs()

Docs are here.

Upvotes: 18

Related Questions