Add Builders and construction variables for kotlinc to an Environment.
(env)
| 154 | |
| 155 | |
| 156 | def generate(env): |
| 157 | """Add Builders and construction variables for kotlinc to an Environment.""" |
| 158 | |
| 159 | env["KOTLINC"] = _detect(env) |
| 160 | |
| 161 | env.SetDefault( |
| 162 | KOTLINC="kotlinc", |
| 163 | KOTLINSUFFIX=".kt", |
| 164 | KOTLINEXTENSION="Kt", |
| 165 | KOTLINCLASSSUFFIX=".class", |
| 166 | KOTLINJARSUFFIX=".jar", |
| 167 | KOTLINCFLAGS=SCons.Util.CLVar(), |
| 168 | KOTLINJARFLAGS=SCons.Util.CLVar(), |
| 169 | KOTLINRTJARFLAGS=SCons.Util.CLVar(["-include-runtime"]), |
| 170 | KOTLINCCOM="$KOTLINC $KOTLINCFLAGS $SOURCE", |
| 171 | KOTLINCCOMSTR="", |
| 172 | KOTLINJARCOM="$KOTLINC $KOTLINJARFLAGS -d $TARGET $SOURCE", |
| 173 | KOTLINJARCOMSTR="", |
| 174 | KOTLINRTJARCOM="$KOTLINC $KOTLINRTJARFLAGS -d $TARGET $SOURCE", |
| 175 | KOTLINRTJARCOMSTR="", |
| 176 | ) |
| 177 | |
| 178 | env.AddMethod(Kotlin, "Kotlin") |
| 179 | env.AddMethod(KotlinJar, "KotlinJar") |
| 180 | env.AddMethod(KotlinRuntimeJar, "KotlinRuntimeJar") |
| 181 | |
| 182 | |
| 183 | def exists(env): |