From dc8b461b8599df1f043d6a1efaadfc44dfa6b823 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Fri, 8 Dec 2023 12:27:55 -0800 Subject: [PATCH] Make g-j-f native image more compatible I was reminded of this by https://github.com/bazelbuild/bazel/pull/20306 PiperOrigin-RevId: 589210771 --- .../META-INF/native-image/reflect-config.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/src/main/resources/META-INF/native-image/reflect-config.json b/core/src/main/resources/META-INF/native-image/reflect-config.json index 2c6580345..4d30840f1 100644 --- a/core/src/main/resources/META-INF/native-image/reflect-config.json +++ b/core/src/main/resources/META-INF/native-image/reflect-config.json @@ -2,5 +2,23 @@ { "name": "com.sun.tools.javac.parser.UnicodeReader", "allDeclaredMethods": true + }, + { + "name": "com.google.googlejavaformat.java.java17.Java17InputAstVisitor", + "methods": [ + { + "name": "", + "parameterTypes": ["com.google.googlejavaformat.OpsBuilder", "int"] + } + ] + }, + { + "name": "com.google.googlejavaformat.java.java21.Java21InputAstVisitor", + "methods": [ + { + "name": "", + "parameterTypes": ["com.google.googlejavaformat.OpsBuilder", "int"] + } + ] } ]