Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot create empty folder in gradle

Tags:

gradle

groovy

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?

like image 942
ServerSideCat Avatar asked Mar 30 '15 11:03

ServerSideCat


2 Answers

Why don't you just try:

new File('lol').mkdirs()

With gradle:

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

Docs are here.

like image 81
Opal Avatar answered Nov 15 '22 23:11

Opal


Now mkdir is built-in:

project.mkdir "${someDir}/subdir"
like image 24
gavenkoa Avatar answered Nov 15 '22 22:11

gavenkoa