diff --git a/tools/check-flagged-apis/Android.bp b/tools/check-flagged-apis/Android.bp index 4695ca0338..209c89b9a7 100644 --- a/tools/check-flagged-apis/Android.bp +++ b/tools/check-flagged-apis/Android.bp @@ -21,5 +21,8 @@ java_binary_host { srcs: [ "src/**/*.kt", ], + static_libs: [ + "metalava-tools-common-m2-deps", + ], main_class: "com.android.checkflaggedapis.Main", } 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 dee4fdbe3c..ecb2675ac8 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) = CheckCommand().main(args)