Since gradle android plugins 2.2-alpha4:
Gradle will attempt to download missing SDK packages that a project depends on
Which
I solved this problem by creating a public git repo with the accepted license files. Then I use wget to fetch these licenses on any machine I need into a [sdk-dir]/licenses directory before running ./gradlew to build my project.
wget