maven - What is the best way to read in gradle repository credentials from a properties file? -
it's not clear me logging repository happens in gradle execution/configuration chain i have task loadmyproperties { properties props = new properties() props.load(new fileinputstream(mypropertiesfilename)) myusername = props.getproperty('user') mypassword = props.getproperty('password') } and make compile depend on compilejava.dependson loadproperties however, not @ sure when repositories block repositories { maven { credentials { username myusername password mypassword } url myurl } } is 'executed' compared other tasks, nor when attempts gain authorization specified repository provided credentials. when run gradle build sometimes credentials work, , don't (i 401 authorization error maven server), makes me think not ordering tasks. my thinking loadproperties code happens inside configuration phase (since it's no...