Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In IntelliJ IDEA, how to copy non-source assets to output folder during build?

I have a project in IntelliJ IDEA, inside that a couple of modules and one of my modules has two build configurations. One of them needs to copy a <projectroot>/tools folder to its out/production/<BuildConfigurationName> folder. Can IDEA somehow automate this?

like image 387
Borek Bernard Avatar asked Oct 26 '25 21:10

Borek Bernard


1 Answers

The accepted answer above is incorrect. IDEA can do this (without ant/gradle) via the artifacts system (accessed via Build menu or project settings). Any one artifact job copies multiple files/folders/build outputs to a chosen location (optionally jarred) and can be set to automatically run on make.

Artifacts can even be chained, i.e. output from one as input to another.

like image 54
barneypitt Avatar answered Oct 29 '25 18:10

barneypitt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!