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
diff --git a/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt b/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt
index dee4fdb..ecb2675 100644
--- a/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt
+++ b/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt
@@ -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)