Skip to content

Commit ad016d3

Browse files
Merge branch 'release/0.4.1'
2 parents c878569 + 76c3673 commit ad016d3

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ This is a Maven wrapper for the [`jextract`](https://github.com/openjdk/jextract
2121
</goals>
2222
<configuration>
2323
<headerFile>point.h</headerFile>
24+
<libraries>
25+
<library>/path/to/shared/library.so</library>
26+
</libraries>
2427
<targetPackage>com.example.mypackage</targetPackage>
2528
<headerClassName>Point2d</headerClassName>
2629
<includeStructs>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>io.github.coffeelibs</groupId>
55
<artifactId>jextract-maven-plugin</artifactId>
66
<packaging>maven-plugin</packaging>
7-
<version>0.4.0</version>
7+
<version>0.4.1</version>
88
<name>jextract Maven Plugin</name>
99
<description>A Maven plugin to invokes jextract.</description>
1010
<inceptionYear>2022</inceptionYear>

src/main/java/io/github/coffeelibs/maven/jextract/SourcesMojo.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,15 @@ public class SourcesMojo extends AbstractMojo {
127127
@Parameter(property = "jextract.includeVars", required = false)
128128
private String[] includeVars;
129129

130+
/**
131+
* <dl>
132+
* <dt>--library</dt>
133+
* <dd>path to shared libraries to load</dd>
134+
* </dl>
135+
*/
136+
@Parameter(property = "jextract.libraries", required = false)
137+
private String[] libraries;
138+
130139
/**
131140
* <dl>
132141
* <dt>--output</dt>
@@ -161,6 +170,10 @@ public void execute() throws MojoFailureException {
161170
args.add(outputDirectory.getAbsolutePath());
162171
args.add("--target-package");
163172
args.add(targetPackage);
173+
Arrays.stream(libraries).forEach(str -> {
174+
args.add("--library");
175+
args.add(str);
176+
});
164177
Arrays.stream(headerSearchPaths).forEach(str -> {
165178
args.add("-I");
166179
args.add(str);

0 commit comments

Comments
 (0)