diff --git a/tools/check-flagged-apis/check-flagged-apis.sh b/tools/check-flagged-apis/check-flagged-apis.sh index d9934a11fe..dad1236f71 100755 --- a/tools/check-flagged-apis/check-flagged-apis.sh +++ b/tools/check-flagged-apis/check-flagged-apis.sh @@ -56,7 +56,7 @@ function run() { local errors=0 echo "# current" - check-flagged-apis \ + check-flagged-apis check \ --api-signature $(path_to_api_signature_file "frameworks-base-api-current.txt") \ --flag-values $(gettop)/out/soong/.intermediates/all_aconfig_declarations.pb \ --api-versions $PUBLIC_XML_VERSIONS @@ -64,7 +64,7 @@ function run() { echo echo "# system-current" - check-flagged-apis \ + check-flagged-apis check \ --api-signature $(path_to_api_signature_file "frameworks-base-api-system-current.txt") \ --flag-values $(gettop)/out/soong/.intermediates/all_aconfig_declarations.pb \ --api-versions $SYSTEM_XML_VERSIONS @@ -72,7 +72,7 @@ function run() { echo echo "# system-server-current" - check-flagged-apis \ + check-flagged-apis check \ --api-signature $(path_to_api_signature_file "frameworks-base-api-system-server-current.txt") \ --flag-values $(gettop)/out/soong/.intermediates/all_aconfig_declarations.pb \ --api-versions $SYSTEM_SERVER_XML_VERSONS @@ -80,7 +80,7 @@ function run() { echo echo "# module-lib" - check-flagged-apis \ + check-flagged-apis check \ --api-signature $(path_to_api_signature_file "frameworks-base-api-module-lib-current.txt") \ --flag-values $(gettop)/out/soong/.intermediates/all_aconfig_declarations.pb \ --api-versions $MODULE_LIB_XML_VERSIONS 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 1d2440dee8..26d3c9c40b 100644 --- a/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt +++ b/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt @@ -26,6 +26,7 @@ import com.android.tools.metalava.model.MethodItem import com.android.tools.metalava.model.text.ApiFile import com.github.ajalt.clikt.core.CliktCommand import com.github.ajalt.clikt.core.ProgramResult +import com.github.ajalt.clikt.core.subcommands import com.github.ajalt.clikt.parameters.options.help import com.github.ajalt.clikt.parameters.options.option import com.github.ajalt.clikt.parameters.options.required @@ -141,6 +142,10 @@ internal data class UnknownFlagError(override val symbol: Symbol, override val f } } +class MainCommand : CliktCommand() { + override fun run() {} +} + class CheckCommand : CliktCommand( help = @@ -446,4 +451,4 @@ internal fun findErrors( return errors } -fun main(args: Array) = CheckCommand().main(args) +fun main(args: Array) = MainCommand().subcommands(CheckCommand()).main(args)