J2ObjC. Cross platform development Google way
summary
J2ObjC translates Java business logic into Objective‑C source so one shared Java module feeds Android and iOS, adding about 3 MB binary overhead and preserving Java 7 features with Java 8 work in progress; Gradle plugin exists but is unofficial (team maintains a fork). Cross‑compiled code debugs if Xcode project is generated, performance matches or beats native in benchmarks, and real projects cut iteration time dramatically — build time cut from 6 to <2 minutes after tuning — but it requires near‑100% unit test coverage.
AI-written summary · about
chapters (29)
- 0:00Introduction to cross-platform
- 1:10J2ObjC overview and Google's use
- 2:12Our SDK challenges and needs
- 4:42Why we chose J2ObjC
- 6:51What J2ObjC actually is
- 7:56What J2ObjC is not
- 9:22J2ObjC language support
- 10:05Native code embedding
- 11:30Gradle plugin setup
- 14:03Android project setup
- 14:26iOS project setup options
- 15:53Debugging generated code
- 16:55Cross-compilation architectures
- 17:16Build time optimizations
- 18:41Project structure and architecture
- 20:27Using third-party libraries
- 21:32Library inclusion methods
- 22:56Supported libraries overview
- 24:00Testing cross-compiled code
- 25:24Testing challenges
- 26:27Objective-C naming issues
- 27:31Mapping Java to Objective-C
- 28:58Wrapping ugly names
- 29:18Performance impact
- 30:21Memory and size impact
- 31:51Reducing binary size
- 32:33Development time savings
- 33:16Team hiring implications
- 33:38Pros and cons summary
