diff options
author | Liam Miller-Cushon <cushon@google.com> | 2022-09-07 13:23:01 -0700 |
---|---|---|
committer | Javac Team <javac-team+copybara@google.com> | 2022-09-07 13:23:46 -0700 |
commit | 92737b0d3de25e33114fe2ab05915fcc7b71f91c (patch) | |
tree | d2c0fd4b0f0a2a9bc28ad397f06f0da0605c0412 | |
parent | 251853760c039250efc2ff485607cecad0d0d43b (diff) | |
download | turbine-92737b0d3de25e33114fe2ab05915fcc7b71f91c.tar.gz |
Add support for native-image builds for turbine to maven build
PiperOrigin-RevId: 472798197
-rw-r--r-- | pom.xml | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -38,6 +38,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <protobuf.version>3.19.2</protobuf.version> <grpc.version>1.43.2</grpc.version> + <native.maven.plugin.version>0.9.11</native.maven.plugin.version> </properties> <organization> @@ -333,5 +334,44 @@ </plugins> </build> </profile> + <profile> + <id>native</id> + <build> + <plugins> + <plugin> + <groupId>org.graalvm.buildtools</groupId> + <artifactId>native-maven-plugin</artifactId> + <version>${native.maven.plugin.version}</version> + <extensions>true</extensions> + <executions> + <execution> + <id>build-native</id> + <goals> + <goal>build</goal> + </goals> + <phase>package</phase> + </execution> + <execution> + <id>test-native</id> + <goals> + <goal>test</goal> + </goals> + <phase>test</phase> + </execution> + </executions> + <configuration> + <imageName>turbine</imageName> + <mainClass>com.google.turbine.main.Main</mainClass> + <classpath> + <param>${project.build.directory}/${project.artifactId}-${project.version}-all-deps.jar</param> + </classpath> + <buildArgs> + <buildArg>--no-fallback</buildArg> + </buildArgs> + </configuration> + </plugin> + </plugins> + </build> + </profile> </profiles> </project> |