Skip to content

Commit 505a28a

Browse files
authored
Markdown comments and libvips 8.17.0 (#150)
* Migrate to maintained JavaPoet * Build with JDK 24 but target 22 compatibility * Migrate hand-written comments to markdown * Generate Markdown documentation for all V-Classes * Add libvips submodule to work against
1 parent 3123453 commit 505a28a

File tree

150 files changed

+16798
-17956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+16798
-17956
lines changed

.github/workflows/checks.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/setup-java@v4
1919
with:
2020
distribution: "temurin"
21-
java-version: 22
21+
java-version: 23
2222

2323
- name: Setup Gradle
2424
uses: gradle/actions/setup-gradle@v3
@@ -43,7 +43,7 @@ jobs:
4343
uses: actions/setup-java@v4
4444
with:
4545
distribution: "temurin"
46-
java-version: 22
46+
java-version: 23
4747

4848
- name: Setup Gradle
4949
uses: gradle/actions/setup-gradle@v3
@@ -68,7 +68,7 @@ jobs:
6868
uses: actions/setup-java@v4
6969
with:
7070
distribution: "temurin"
71-
java-version: 22
71+
java-version: 23
7272

7373
- name: Setup Gradle
7474
uses: gradle/actions/setup-gradle@v3
@@ -78,12 +78,12 @@ jobs:
7878
- name: Run samples
7979
shell: pwsh
8080
run: |
81-
Invoke-WebRequest "https://github.com/libvips/build-win64-mxe/releases/download/v8.15.3/vips-dev-w64-web-8.15.3-static-ffi.zip" -OutFile "vips_w64.zip"
82-
(Get-FileHash .\vips_w64.zip).Hash -eq "60500d990c6063a1e95f1ff29a540c5943537ccbed4dd55711947b68229774ee"
81+
Invoke-WebRequest "https://github.com/libvips/build-win64-mxe/releases/download/v8.17.0-rc1/vips-dev-w64-web-8.17.0-rc1-static-ffi.zip" -OutFile "vips_w64.zip"
82+
(Get-FileHash .\vips_w64.zip).Hash -eq "sha256:ffbea9b23d57a60ef85fd0761510949e66116799ad6c2878c17d31780bd93a8a"
8383
Expand-Archive vips_w64.zip
84-
$env:Path = "$pwd\vips_w64\vips-dev-8.15;$pwd\vips_w64\vips-dev-8.15\bin;" + $env:Path
84+
$env:Path = "$pwd\vips_w64\vips-dev-8.17;$pwd\vips_w64\vips-dev-8.17\bin;" + $env:Path
8585
Write-Output $env:Path
86-
Get-ChildItem .\vips_w64\vips-dev-8.15
86+
Get-ChildItem .\vips_w64\vips-dev-8.17
8787
.\gradlew.bat sample:clean sample:shadowJar
8888
java -jar sample/build/libs/sample-all.jar
8989
@@ -97,7 +97,7 @@ jobs:
9797
uses: actions/setup-java@v4
9898
with:
9999
distribution: "temurin"
100-
java-version: 22
100+
java-version: 23
101101

102102
- name: Setup Gradle
103103
uses: gradle/actions/setup-gradle@v3

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/setup-java@v4
2121
with:
2222
distribution: "temurin"
23-
java-version: 22
23+
java-version: 23
2424

2525
- name: Setup Gradle
2626
uses: gradle/actions/setup-gradle@v3

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ hs_err*
1616
sample_run
1717
.kotlin
1818
sample_output*
19-
sample*.jar
19+
sample*.jar

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "libvips"]
2+
path = libvips
3+
url = https://github.com/libvips/libvips/
4+
branch = tags/v8.17.0

.run/Discover Vips operations.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Discover Vips operations" type="JetRunConfigurationType">
33
<envs>
4-
<env name="DYLD_LIBRARY_PATH" value="/opt/homebrew/lib" />
4+
<env name="DYLD_LIBRARY_PATH" value="libvips/release/lib:/opt/homebrew/lib:$DYLD_LIBRARY_PATH" />
55
</envs>
66
<option name="MAIN_CLASS_NAME" value="vipsffm.DiscoverVipsOperationsKt" />
77
<module name="vips-ffm.generator.main" />

.run/Generate V classes.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Generate V classes" type="JetRunConfigurationType">
33
<envs>
4-
<env name="DYLD_LIBRARY_PATH" value="/opt/homebrew/lib" />
4+
<env name="DYLD_LIBRARY_PATH" value="libvips/release/lib:/opt/homebrew/lib:$DYLD_LIBRARY_PATH" />
55
</envs>
66
<option name="MAIN_CLASS_NAME" value="vipsffm.GenerateVClasses" />
77
<module name="vips-ffm.generator.main" />

.run/Generate VipsHelper class.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Generate VipsHelper class" type="JetRunConfigurationType">
33
<envs>
4-
<env name="DYLD_LIBRARY_PATH" value="/opt/homebrew/lib" />
4+
<env name="DYLD_LIBRARY_PATH" value="libvips/release/lib:/opt/homebrew/lib:$DYLD_LIBRARY_PATH" />
55
</envs>
66
<option name="MAIN_CLASS_NAME" value="vipsffm.GenerateVipsHelperClass" />
77
<module name="vips-ffm.generator.main" />

.run/Run samples.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run samples" type="JetRunConfigurationType">
33
<envs>
4-
<env name="DYLD_LIBRARY_PATH" value="/opt/homebrew/lib" />
4+
<env name="DYLD_LIBRARY_PATH" value="libvips/release/lib:/opt/homebrew/lib:$DYLD_LIBRARY_PATH" />
55
</envs>
66
<option name="MAIN_CLASS_NAME" value="vipsffm.SampleRunner" />
77
<module name="vips-ffm.sample.main" />

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ Thank you for being enthusiastic about the project!
2323
## Code changes
2424

2525
You'll find it easiest to use [IntelliJ IDEA](https://www.jetbrains.com/idea/) to work on the project - there's a free
26-
version.
26+
version. The project is only developed on macOS, but in theory it should be possible to work in other Unix-like environments.
27+
28+
Set up the libvips submodule, and create a build of it, by running `./setup_development.sh`.
2729

2830
The project uses Gradle, and is split into multiple modules:
2931
* `generator` uses the libvips operations API to generate most of the code in `core`

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repositories {
2222
}
2323

2424
dependencies {
25-
implementation("app.photofox.vips-ffm:vips-ffm-core:1.5.2")
25+
implementation("app.photofox.vips-ffm:vips-ffm-core:1.6.0")
2626
}
2727
```
2828

@@ -33,8 +33,8 @@ There are also lots of examples in the [samples](#samples).
3333
You must add `--enable-native-access=ALL-UNNAMED` to your JVM runtime arguments. If you don't, you'll get a warning
3434
about "Restricted methods". In the future, the JVM will throw an error if you don't explicitly include this flag.
3535

36-
As the project uses the Java FFM API, your target must also be JDK 22+. Bindings are currently generated from libvips
37-
`8.16.1` (but should be safe to use with different minor or patch versions).
36+
As the project uses the Java FFM API, and Markdown comments, your target must also be JDK 23+. Bindings are currently
37+
generated from libvips `8.17.0` (but should be safe to use with different minor or patch versions).
3838

3939
> [!NOTE]
4040
> This library **does not** include `libvips` in the download, you must add it to the system/container you're building
@@ -92,7 +92,7 @@ Samples are included that show various usages of these bindings. They include va
9292

9393
To get set up to run samples (on macOS):
9494
* `brew install vips`
95-
* `sdk use java 22-open`
95+
* `sdk use java 23-open`
9696
* Then either:
9797
* Run `./run_samples.sh` in your terminal
9898
* Use the included `Run samples` profile in IntelliJ
@@ -222,4 +222,4 @@ Thank you for being enthusiastic about the project!
222222
* And only after a GitHub Release is made
223223
* Run `./publish_release_to_maven_central.sh <version matching github release version, including v prefix>`
224224

225-
[1]: https://docs.oracle.com/en/java/javase/22/core/memory-segments-and-arenas.html
225+
[1]: https://docs.oracle.com/en/java/javase/23/core/memory-segments-and-arenas.html

0 commit comments

Comments
 (0)