Gravity in gauge mediation