Commit fd111dd
committed
Fix Java examples using Kotlin-specific syntax
Java examples were incorrectly using Kotlin-specific syntax like listOf() and mapOf(). This commit fixes the issue by:
- Added language-specific parameter support to getParamExample() method in Kotlin.php
- Created getKotlinMapExample() and getJavaMapExample() helper methods for proper syntax generation
- Updated getPermissionExample() to support both Java (Arrays.asList) and Kotlin (listOf) syntax
- Added new javaParamExample Twig filter that generates Java-compatible syntax
- Updated Java example templates to use javaParamExample filter
- Fixed import ordering in Java templates to follow Java conventions (java.* imports first, then project imports)
Now Java examples correctly use:
- Arrays.asList() instead of listOf()
- new HashMap<String, Object>() {{ put() }} instead of mapOf()
- Collections.emptyList() instead of listOf()1 parent 05367bc commit fd111dd
File tree
4 files changed
+200
-103
lines changed- src/SDK/Language
- templates
- android/docs/java
- kotlin/docs/java
4 files changed
+200
-103
lines changed
0 commit comments