File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1313from rpdk .core .jsonutils .resolver import resolve_models
1414from rpdk .core .plugin_base import LanguagePlugin
1515
16+ from . import __version__
1617from .resolver import translate_type
1718from .utils import safe_reserved , validate_codegen_model , validate_namespace
1819
@@ -571,3 +572,17 @@ def generate_image_build_config(self, project):
571572 "dockerfile_path" : dockerfile_path ,
572573 "project_path" : str (project_path ),
573574 }
575+
576+ @staticmethod
577+ def _get_plugin_information (project ):
578+ return {
579+ "plugin-tool-version" : __version__ ,
580+ "plugin-name" : "java" ,
581+ "plugin-version" : JavaLanguagePlugin ._get_java_plugin_dependency_version (
582+ project
583+ ),
584+ }
585+
586+ @logdebug
587+ def get_plugin_information (self , project ):
588+ return self ._get_plugin_information (project )
Original file line number Diff line number Diff line change 88import pytest
99from rpdk .core .exceptions import InternalError , SysExitRecommendedError
1010from rpdk .core .project import Project
11+ from rpdk .java .__init__ import __version__
1112from rpdk .java .codegen import (
1213 InvalidMavenPOMError ,
1314 JavaArchiveNotFoundError ,
@@ -344,3 +345,13 @@ def test_generate_executable_entrypoint_old_project_version(project):
344345 plugin ._namespace_from_project (project )
345346
346347 assert not hasattr (project , "executable_entrypoint" )
348+
349+
350+ def test_get_plugin_information (project ):
351+ plugin_information = project ._plugin .get_plugin_information (project )
352+
353+ assert plugin_information ["plugin-tool-version" ] == __version__
354+ assert plugin_information ["plugin-name" ] == "java"
355+ assert plugin_information [
356+ "plugin-version"
357+ ] == JavaLanguagePlugin ._get_java_plugin_dependency_version (project )
You can’t perform that action at this time.
0 commit comments