Gradle buildscript is added and placed in the local cache, so the project is not in the path of the buildscript class loader classes. You probably need org.gradle.api.Project. absoluteProjectPath() org.gradle.api.Project. absoluteProjectPath() .
eg. To read "src / main / resources / META-INF / MANIFEST.MF":
try(Reader in = new FileReader(project.absoluteProjectPath( "src/main/resources/META-INF/MANIFEST.MF" ))) {
source share