I tried to compile the plugin with 3.7.1 and running into error below, It looks like the plugin config APIs have been significantly redesigned and the last update on this plugin is almost 3 years old, anyone who has experience in some of the more recently maintained plugins can help here?
% bazel build release
INFO: Invocation ID: bce9cf50-d95a-410e-ae9d-28d4f89bb395
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=229
INFO: Reading rc options for 'build' from /Users/username/gerrit_configs/project-download-commands-plugin/gerrit/.bazelrc:
'build' options: --workspace_status_command=python3 ./tools/workspace_status.py --repository_cache=~/.gerritcodereview/bazel-cache/repository --action_env=PATH --disk_cache=~/.gerritcodereview/bazel-cache/cas --java_language_version=11 --java_runtime_version=remotejdk_11 --tool_java_language_version=11 --tool_java_runtime_version=remotejdk_11 --incompatible_strict_action_env --announce_rc
INFO: Analyzed target //:release (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/username/gerrit_configs/project-download-commands-plugin/gerrit/plugins/project-download-commands/BUILD:3:14: Building plugins/project-download-commands/libproject-download-commands__plugin-class.jar (3 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor, AutoOneOfProcessor, AutoValueGsonAdapterFactoryProcessor) failed: (Exit 1): java failed: error executing command external/remotejdk11_macos_aarch64/bin/java -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' ... (remaining 17 arguments skipped)
plugins/project-download-commands/src/main/java/com/googlesource/gerrit/plugins/download/command/project/DownloadCommandUpdater.java:85: error: cannot find symbol
PluginConfig cfg = projectState.get().getConfig().getPluginConfig(pluginName);
^
symbol: method getPluginConfig(String)
location: class CachedProjectConfig
Target //:release failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.615s, Critical Path: 2.26s
INFO: 21 processes: 6 internal, 11 darwin-sandbox, 4 worker.
FAILED: Build did NOT complete successfully