Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 35 additions & 9 deletions core-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<description>Protobuf common support for protobuf4j</description>

<dependencies>
<dependency>
<groupId>com.dylibso.chicory</groupId>
<artifactId>annotations</artifactId>
<version>${chicory.version}</version>
</dependency>
<dependency>
<groupId>com.dylibso.chicory</groupId>
<artifactId>wasi</artifactId>
Expand Down Expand Up @@ -50,24 +55,33 @@
<build>
<plugins>
<plugin>
<groupId>com.dylibso.chicory</groupId>
<artifactId>chicory-compiler-maven-plugin</artifactId>
<version>${chicory.version}</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>protoc-wrapper</id>
<id>normalize-wasm-path</id>
<goals>
<goal>compile</goal>
<goal>run</goal>
</goals>
<phase>initialize</phase>
<configuration>
<name>io.roastedroot.protobuf4j.common.ProtobufWrapperCommon</name>
<wasmFile>${project.basedir}/../wasm/protoc-wrapper-v3.wasm</wasmFile>
<moduleInterface>io.roastedroot.protobuf4j.common.Protobuf</moduleInterface>
<target>
<property location="${project.basedir}/../wasm/protoc-wrapper-v3.wasm" name="wasm.resource.path.raw"/>
<makeurl file="${wasm.resource.path.raw}" property="wasm.resource.url.temp"/>
<loadresource property="wasm.resource.url">
<propertyresource name="wasm.resource.url.temp"/>
<filterchain>
<tokenfilter>
<replaceregex pattern="^file:/" replace="file:///"/>
</tokenfilter>
</filterchain>
</loadresource>
</target>
<exportAntProperties>true</exportAntProperties>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand All @@ -86,6 +100,18 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<executions>
<execution>
<id>filtering-java-templates</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.roastedroot.protobuf4j.common;

public final class WasmResource {
public static final String absoluteFile = "${wasm.resource.url}";

private WasmResource() {}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.roastedroot.protobuf4j.common;

import com.dylibso.chicory.annotations.WasmModuleInterface;
import com.dylibso.chicory.runtime.ByteArrayMemory;
import com.dylibso.chicory.runtime.ImportMemory;
import com.dylibso.chicory.runtime.ImportValues;
Expand Down Expand Up @@ -28,6 +29,7 @@
import java.util.logging.Logger;
import java.util.stream.Collectors;

@WasmModuleInterface(value = WasmResource.absoluteFile)
public final class Protobuf {

private static final Logger LOGGER = Logger.getLogger(Protobuf.class.getCanonicalName());
Expand Down
12 changes: 12 additions & 0 deletions core-v3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<executions>
<execution>
<id>filtering-java-templates</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
12 changes: 12 additions & 0 deletions core-v4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<executions>
<execution>
<id>filtering-java-templates</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<checkstyle.version>12.3.1</checkstyle.version>
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
<spotless-maven-plugin.version>3.4.0</spotless-maven-plugin.version>
<templating-maven-plugin.version>3.1.0</templating-maven-plugin.version>
<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
<surefire-plugin.version>3.5.2</surefire-plugin.version>
<failsafe-plugin.version>${surefire-plugin.version}</failsafe-plugin.version>
Expand Down Expand Up @@ -160,8 +161,21 @@
<configuration>
<parameters>true</parameters>
<release>${maven.compiler.release}</release>
<annotationProcessorPathsUseDepMgmt>true</annotationProcessorPathsUseDepMgmt>
<annotationProcessorPaths>
<path>
<groupId>com.dylibso.chicory</groupId>
<artifactId>annotations-processor</artifactId>
<version>${chicory.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>${templating-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand All @@ -185,6 +199,7 @@
<compilerArgs combine.self="override"/>
<parameters>true</parameters>
<release>${maven.compiler.release}</release>
<annotationProcessorPathsUseDepMgmt>true</annotationProcessorPathsUseDepMgmt>
</configuration>
</plugin>
</plugins>
Expand Down