From 93ba41b34379f61bab7d81d821aff88855524ec9 Mon Sep 17 00:00:00 2001 From: TomXin <766781886@qq.com> Date: Fri, 5 Jan 2024 09:48:15 +0800 Subject: [PATCH] Add maven build support --- .gitignore | 1 + README.md | 25 +++++++++++++++++++++++ pom.xml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore index 92dfe06..8084942 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # build directory build/ builddir/ +target/ # output.png output.png diff --git a/README.md b/README.md index 75b86a1..714a1ae 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,37 @@ Work-in-progress pure java JPEG XL decoder ## Compiling +### [Meson] + JXLatte is built with the [Meson build system](https://mesonbuild.com/). To build, create a build directory, for example, with `mkdir build && cd build`. Then run `meson setup ../` to set up the build directory, and `ninja` to compile JXLatte. +### [Maven] + +Now you can also build JXLatte using Maven. Just run `mvn clean install`. + +The artifact will be installed to the local repository and then you can reference it in your project like this + +Maven +```xml + + com.traneptora + jxlatte + 0.0.1-SNAPSHOT + +``` +Gradle +```groovy +implementation 'com.traneptora:jxlatte:0.0.1-SNAPSHOT' +``` +Gradle(Kotlin) +```kotlin +implementation( "com.traneptora:jxlatte:0.0.1-SNAPSHOT") +``` + ## Running JXLatte can be executed just like any normal jar file: diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..ad1d1f3 --- /dev/null +++ b/pom.xml @@ -0,0 +1,59 @@ + + + 4.0.0 + + com.traneptora + jxlatte + 0.0.1-SNAPSHOT + jar + + UTF-8 + + + + + java + + + false + java/resources + + bt2020-d65-pq.icc + natural-order.dat + default-weights-float.dat + + + + + + maven-compiler-plugin + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-source-plugin + + true + + meson.build + resources/default-weights-double.dat + + + + + attach-sources + verify + + jar-no-fork + + + + + + +