My first build.gradle for a 3D space graphics program
The part where you create directories with a single file removeme.txt doesn't belong in a build.gradle file of an Android project. This appears to be a one time setup for your project, specifically for using Git as the version control system. After a single execution followed by a commit, this code is pointless, it doesn't need to be executed again, so I suggest to put it in a separate helper script file.

It's a very minor thing, but to keep "empty"directories in Git, a common name for the place holder file seems to be .gitkeep