From 8e9da3c79c33aa027d438aaf9ec96ca4efcf18d0 Mon Sep 17 00:00:00 2001 From: Jordan Demeulenaere Date: Wed, 29 May 2024 16:36:46 +0200 Subject: [PATCH] Replace ktfmt.py hook by built-in hook in Launcher3/ This CL replaces the ktfmt.py hook of this repository by the builtin ktfmt hook. This will allow to delete our custom hook and provide features like automatic fixup (see http://screen/5uXuuPgs7oL83c2). Note that this also means that this CL is upgrading ktfmt from v0.43 to v0.49, so it is expected to see some minor formatting diffs on existing files after this CL is submitted. Bug: 342153000 Test: N/A Flag: NONE Repohook Update Change-Id: I66ae0443e6d5c45c771791b4182e610a20675815 --- PREUPLOAD.cfg | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg index 3d15e77853..ff97b22e4e 100644 --- a/PREUPLOAD.cfg +++ b/PREUPLOAD.cfg @@ -1,6 +1,13 @@ +[Builtin Hooks] +ktfmt = true + +[Builtin Hooks Options] +ktfmt = --kotlinlang-style + +[Tool Paths] +ktfmt = ${REPO_ROOT}/prebuilts/build-tools/common/framework/ktfmt.jar + [Hook Scripts] checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --config_xml tools/checkstyle.xml --sha ${PREUPLOAD_COMMIT} -ktfmt_hook = ${REPO_ROOT}/external/ktfmt/ktfmt.py --check ${PREUPLOAD_FILES} - flag_hook = ${REPO_ROOT}/frameworks/base/packages/SystemUI/flag_check.py --msg=${PREUPLOAD_COMMIT_MESSAGE} --files=${PREUPLOAD_FILES} --project=${REPO_PATH}