From a2067bc971071cd44495a2ebb8470d870795e9e2 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Sun, 26 Nov 2023 09:00:38 -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: 585447776 --- .../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"] + } + ] } ]