Is it ok to have two allprojects sections in my build file?

Is it ok for me to put ‘allprojects’ configuration sections in more than one place in my build file? As an example of why I’m asking… for things like repositories, I need to configure them before my subprojects, but for properties like sourceCompatibility, I need to configure them after my subprojects (after the java plugin gets applied).

Yes, you can have as many ‘allprojects’ blocks as you like.