Add onDisposeBefore, onDisposeAfter lifecycle tern project.