Perhaps the title is not very clear, I will describe the problem in more detail.
Required to configure build.gradle
There is the following project structure:
main java config and build.gradle (below only the relevant code from the script)
distributions { main { contents { into('config') { from 'src/main/config' } } } } in the config folder there are files (ini, logback, etc.) that I want to change both in the development process and in the process of working with the assembled application.
Ie for example, the code says new FileReader ("main.ini") (main.ini is in the config folder)
and I want the program to pick up the parameters in a relative path in all three cases:
1) gralde run (application plugin)
2) idea - Main - run (normal run on the main class)
3) gradle distZip - unzip - ./program.sh
How to do it as correctly as possible?