Skip to content

Commit 044ee07

Browse files
authored
Add automatic module name, to allow users to limit native access (#77)
1 parent d2b7bef commit 044ee07

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ repositories {
2020
}
2121

2222
dependencies {
23-
implementation("app.photofox.vips-ffm:vips-ffm-core:0.5.8")
23+
implementation("app.photofox.vips-ffm:vips-ffm-core:0.5.9")
2424
}
2525
```
26+
When running your project you must add: `--enable-native-access=app.photofox.vipsffm` to your JVM runtime arguments. If
27+
you don't, you'll get a warning about "Restricted methods". In the future, the JVM will throw an error if you don't
28+
explicitly include this flag.
2629

2730
As the project uses the Java FFM API, it must target JDK 22+. Bindings are currently generated from libvips `8.15.3`,
2831
however they use the underlying libvips operation API. All operations **do not** use the C API directly (as described

core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ tasks.withType<JavaExec>().configureEach {
6565

6666
tasks.withType<Jar>().configureEach {
6767
manifest {
68-
attributes("Enable-Native-Access" to "ALL-UNNAMED")
68+
attributes("Automatic-Module-Name" to "app.photofox.vipsffm")
6969
}
7070
}
7171

0 commit comments

Comments
 (0)