Native libraries: (issue #624)

- publish to maven central
- load from same location as flatlaf.jar (if available, otherwise extract from jar to temporary directory)
This commit is contained in:
Karl Tauber
2023-01-21 18:29:05 +01:00
parent 9b62b8395f
commit 35e23574cf
3 changed files with 93 additions and 7 deletions

View File

@@ -14,6 +14,8 @@
* limitations under the License.
*/
import Flatlaf_publish_gradle.NativeArtifact
plugins {
`java-library`
`flatlaf-toolchain`
@@ -123,4 +125,11 @@ flatlafPublish {
artifactId = "flatlaf"
name = "FlatLaf"
description = "Flat Look and Feel"
val natives = "src/main/resources/com/formdev/flatlaf/natives"
nativeArtifacts = listOf(
NativeArtifact( "${natives}/flatlaf-windows-x86.dll", "windows-x86", "dll" ),
NativeArtifact( "${natives}/flatlaf-windows-x86_64.dll", "windows-x86_64", "dll" ),
NativeArtifact( "${natives}/libflatlaf-linux-x86_64.so", "linux-x86_64", "so" ),
)
}