Fix patch file code
Fix gradle building