A pseudo-Builder wrapper for the kotlinc executable. kotlinc [options] file
(env, target, source=None, *args, **kw)
| 81 | |
| 82 | |
| 83 | def Kotlin(env, target, source=None, *args, **kw): |
| 84 | """ |
| 85 | A pseudo-Builder wrapper for the kotlinc executable. |
| 86 | kotlinc [options] file |
| 87 | """ |
| 88 | if not SCons.Util.is_List(target): |
| 89 | target = [target] |
| 90 | if not source: |
| 91 | source = target[:] |
| 92 | if not SCons.Util.is_List(source): |
| 93 | source = [source] |
| 94 | |
| 95 | result = [] |
| 96 | kotlinc_suffix = env.subst("$KOTLINCLASSSUFFIX") |
| 97 | kotlinc_extension = env.subst("$KOTLINEXTENSION") |
| 98 | for t, s in zip(target, source): |
| 99 | t_ext = t |
| 100 | if not t.endswith(kotlinc_suffix): |
| 101 | if not t.endswith(kotlinc_extension): |
| 102 | t_ext += kotlinc_extension |
| 103 | |
| 104 | t_ext += kotlinc_suffix |
| 105 | # Ensure that the case of first letter is upper-case |
| 106 | t_ext = t_ext[:1].upper() + t_ext[1:] |
| 107 | # Call builder |
| 108 | kotlin_class = kotlinc_builder.__call__(env, t_ext, s, **kw) |
| 109 | result.extend(kotlin_class) |
| 110 | |
| 111 | return result |
| 112 | |
| 113 | |
| 114 | def KotlinJar(env, target, source=None, *args, **kw): |
nothing calls this directly
no outgoing calls
no test coverage detected