This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x-build-tools.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3009f0d  chore: Added support for "external-types" to the plugin
3009f0d is described below

commit 3009f0d2b80835e62c813e1e5b03668e3d7b136a
Author: Christofer Dutz <[email protected]>
AuthorDate: Tue Oct 15 23:30:07 2024 +0200

    chore: Added support for "external-types" to the plugin
---
 code-generation/RELEASE_NOTES                      | 23 +++++++++++++++++++++-
 .../codegenerator/language/LanguageOutput.java     |  2 +-
 .../plc4x/plugins/codegenerator/GenerateMojo.java  |  7 ++++++-
 3 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/code-generation/RELEASE_NOTES b/code-generation/RELEASE_NOTES
index f1a6e1c..cae6cf0 100644
--- a/code-generation/RELEASE_NOTES
+++ b/code-generation/RELEASE_NOTES
@@ -1,9 +1,30 @@
 ==============================================================
-(Unreleased) Apache PLC4X Build-Tools Code-Generation 1.7.0-SNAPSHOT
+(Unreleased) Apache PLC4X Build-Tools Code-Generation 1.8.0-SNAPSHOT
 ==============================================================
 
 New Features
 ------------
+- Updated to the latest maven project maven-wrapper.
+
+Incompatible changes
+--------------------
+- Added support for providing external type information when
+  using external API types in the mspec (Such as PlcValueType
+  or PlcResponseCode)
+- LanguageOutput now requires an additional Map<String,String>
+  argument for the type information.
+
+Bug Fixes
+---------
+
+==============================================================
+Apache PLC4X Build-Tools Code-Generation 1.7.0
+==============================================================
+
+New Features
+------------
+- Added a new "skip" option to the mojo.
+- Added a "nullBytesHex" option to optional fields.
 
 Incompatible changes
 --------------------
diff --git 
a/code-generation/language-base/src/main/java/org/apache/plc4x/plugins/codegenerator/language/LanguageOutput.java
 
b/code-generation/language-base/src/main/java/org/apache/plc4x/plugins/codegenerator/language/LanguageOutput.java
index e7a6d3f..4c806a8 100644
--- 
a/code-generation/language-base/src/main/java/org/apache/plc4x/plugins/codegenerator/language/LanguageOutput.java
+++ 
b/code-generation/language-base/src/main/java/org/apache/plc4x/plugins/codegenerator/language/LanguageOutput.java
@@ -46,7 +46,7 @@ public interface LanguageOutput {
     Set<String> supportedOptions();
 
     void generate(File outputDir, String version, String languageName, String 
protocolName, String outputFlavor, Map<String, TypeDefinition> types,
-        Map<String, String> options)
+        Map<String, String> options, Map<String, String> externalTypes)
         throws GenerationException;
 
 }
diff --git 
a/code-generation/plc4x-maven-plugin/src/main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java
 
b/code-generation/plc4x-maven-plugin/src/main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java
index 8b801ae..dff8d78 100644
--- 
a/code-generation/plc4x-maven-plugin/src/main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java
+++ 
b/code-generation/plc4x-maven-plugin/src/main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java
@@ -94,6 +94,9 @@ public class GenerateMojo extends AbstractMojo {
     @Parameter(required = false)
     private Map<String, String> options;
 
+    @Parameter(required = false)
+    private Map<String, String> externalTypes;
+
     public void execute()
             throws MojoExecutionException {
 
@@ -181,7 +184,9 @@ public class GenerateMojo extends AbstractMojo {
                 }
             }
             // Generate output for the type definitions.
-            language.generate(outputDir, project.getVersion(), languageName, 
protocolName, outputFlavor, types, options == null ? Collections.emptyMap() : 
options);
+            language.generate(outputDir, project.getVersion(), languageName, 
protocolName, outputFlavor, types,
+                    externalTypes == null ? Collections.emptyMap() : 
externalTypes,
+                    options == null ? Collections.emptyMap() : options);
         } catch (GenerationException e) {
             throw new MojoExecutionException("Error generating sources", e);
         }

Reply via email to