mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
15 lines
492 B
Kotlin
Vendored
15 lines
492 B
Kotlin
Vendored
import java.io.File
|
|
import java.util.jar.JarFile
|
|
|
|
fun main(args: Array<String>) {
|
|
val jar = File(args[0])
|
|
// if "includeRuntime" is specified to be true
|
|
var specifiedBeTrue = args[1].toBoolean()
|
|
for (entry in JarFile(jar).entries()) {
|
|
if (!specifiedBeTrue && entry.name.startsWith("kotlin/")) {
|
|
println("Error: Kotlin runtime is expected to be excluded if the attribute \"includeRuntime\" is not specified to be true")
|
|
break;
|
|
}
|
|
}
|
|
}
|