I used to work on Sheets. We built the “engine” of Sheets in Java. Then we used GWT to transpile to JS (probably switched to J2CL by now). We built Android version by compiling the Java code against different libraries. And we were the first (or one of?) teams to launch an iOS app using J2ObjC.
I was amazed that we were able to pull it off, tbh. The biggest issue that I remember was that the Java collection classes didn’t transpile well to JS. So we made an abstraction over them. Java code used the native collection classes, JS code used native JS arrays, etc.