check-flagged-apis: add support for command line options
Use clikt as the command line options parser library. Bug: 334870672 Test: m check-flagged-apis && check-flagged-apis Change-Id: I7c406456b00e29293294dcdbef411d2543a1e8d5
This commit is contained in:
parent
9008724b50
commit
acfeb11d86
2 changed files with 14 additions and 1 deletions
|
@ -21,5 +21,8 @@ java_binary_host {
|
|||
srcs: [
|
||||
"src/**/*.kt",
|
||||
],
|
||||
static_libs: [
|
||||
"metalava-tools-common-m2-deps",
|
||||
],
|
||||
main_class: "com.android.checkflaggedapis.Main",
|
||||
}
|
||||
|
|
|
@ -17,4 +17,14 @@
|
|||
|
||||
package com.android.checkflaggedapis
|
||||
|
||||
fun main() = println("hello world")
|
||||
import com.github.ajalt.clikt.core.CliktCommand
|
||||
import com.github.ajalt.clikt.core.ProgramResult
|
||||
|
||||
class CheckCommand : CliktCommand() {
|
||||
override fun run() {
|
||||
println("hello world")
|
||||
throw ProgramResult(0)
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) = CheckCommand().main(args)
|
||||
|
|
Loading…
Reference in a new issue