static base path to resource files

is this possible to specify base path to resource files included in plugin jar - as static constant?

1 comment

this works:

add resources folder at the same level as src, mark it as resources folder.


sourceSets {
main {
java.srcDirs 'src'
resources.srcDirs 'resources'


assuming there is a dir "resources/img", path to files in this dir is:

public class Resource {
public static String PathToImg(String name) {
return "/img/" + name;

Please sign in to leave a comment.