Gradle only fetch the last repository

(Scott M Sunarto) #1


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?

(Stefan Oehme) #2

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.

(Scott M Sunarto) #3

Hey! Thanks for replying.

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

(Stefan Oehme) #4

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.