Can't update sponge's source

I followed these script to install Sponge in Eclipse:

 git clone --recursive
 cd Sponge
 cp scripts/pre-commit .git/hooks
 gradle setupDecompWorkspace --refresh-dependencies
 gradle eclipse

I import Sponge, SpongeCommon, and SpongeAPI in Eclipse, and everything works :smile:
BUT, When I want to update sources, I follow these script:

 git remote add upstream [email protected]:SpongePowered/Sponge.git
 git pull --rebase upstream master
 git submodule update --recursive

I restart Eclipse and I get many errors in sources :frowning:

Since this day, when I want to update sources, I delete all projects and I follow the install script instead of just updating the clone.

I don’t know if I was clear, my english is not perfect.

Short answer:
When you update the sources you often need to re-run the gradle commands as well, this is because the sources contain what are known as access transformers which require updating occasionally.

Slighly longer but quite-useful-to-know answer:
You can do this within eclipse quite easily, simply right-click on the Sponge project, and choose Run As > flyout and then Gradle Build... (the one with the ... not the one without). Wait a few seconds until the status message saying Building project models goes away and then type setupDecompWorkspace in the box, click on the Arguments tab and put --refresh-dependencies into the Program Args box (the one at the bottom).

Whilst this might seem a bit more cumbersome than just typing the command, you now have a single button you can click to run the task any time you want!

After running the setupDecompWorkspace task via the IDE, just right-click on the project and choose Gradle > then Refresh Dependencies. This is the equivalent of running the gradle eclipse command in the console.

You can see how to do this in my video tutorial, here, but ignore the part about putting the eclipse task in the config, since the addition of SpongeCommon you must now just put in setupDecompWorkspace and then run the refresh manually. This should be fixed soon.