Importing Java libraries into settings.gradle


(Adam Bolding-Jones) #1

I have a multi-project build with an uncommon folder hierarchy. Rather than having all the subprojects contained within the root project, the subprojects are scattered throughout the file system. As a consequence, I’m overwriting the
project.projectDir of many subprojects as suggested in this post: How to include sub-projects in settings.gradle file?

I’d like to use Java’s Paths library ( to make it easier to work with paths. However, I’m unsure how/if I can important the java.nio.file library into my settings.gradle file. Simply import java.nio.file doesn’t seem to work.

(Adam Bolding-Jones) #2

It seems I was trying to import something that doesn’t exist. Using import java.nio.file.Paths seems to work.