Add gradle and fix a small bug with FlxJoint