File:${basedir} in Maven equivalent into settings.gradle


(George Alexander) #1

I’m not able to create a global in settings.gradle so that when a bean tries to interpret a placeholder, that placeholder gets the corresponding path variable substitued like:

def basedir = rootProject.projectDir.absolutePath


(George Alexander) #2

Inside of build.gradle:

processResources {
    filesMatching('**/*.properties') {
        filter {
            it.replace('${basedir}', 
            project.projectDir.absolutePath)
        }
    }
}