Gradle only fetch the last repository


I tried to fetch multiple repository from user input, and it logs perfectly, no error message (Except when the last part of the script tries to access a file that is not fetched). What am I doing wrong?

You are are creating a single task and then overwriting its configuration in a loop. Thus the last iteration wins. You need to create one clone task per module.

Hey! Thanks for replying.

How can I prevent it from overwriting it’s configuration? or maybe seperate it into one task for each module?

Instead of creating a single task (line 13), you should create one task for each module. Alternatively you can write your own task that can clone mutliple modules in one go, using the git API.