- Static FreeType linking flow for all OS - Flow to build universal binaries for macOS (x86_64, aarch64) - Simplified CI workflow by removing FreeType branches from the build matrix Added 2 new scripts: 1. `buildSrc/scripts/vendor_freetype.sh` 2. `buildSrc/scripts/build.sh` The first script prepares FreeType for usage in the build process. The result of this script is used in the `GenerateLibs` task. Other ways of building with FreeType are removed. If it's impossible to build with FreeType, it is recommended to set `freetype=false`. The second script aggregates commands to build native binaries. It includes specific steps, such as creating a universal library for macOS and copying the result to the specific folder `/tmp/imgui/dst`. Script 1 can be used for local builds. Script 2 is primarily intended for use in CI.
52 lines
1.4 KiB
Groovy
52 lines
1.4 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(8))
|
|
}
|
|
}
|
|
|
|
def packageName = 'imgui-java-natives-linux'
|
|
def packageDesc = 'Native binaries for imgui-java binding for Linux'
|
|
def moduleName = 'imgui.natives.linux'
|
|
def fromDir = '../bin'
|
|
def libName = 'libimgui-java64.so'
|
|
|
|
switch (findProperty('deployType')) {
|
|
case 'windows':
|
|
packageName = 'imgui-java-natives-windows'
|
|
packageDesc = 'Native binaries for imgui-java binding for Windows'
|
|
moduleName = 'imgui.natives.windows'
|
|
libName = 'imgui-java64.dll'
|
|
break
|
|
case 'linux':
|
|
packageName = 'imgui-java-natives-linux'
|
|
packageDesc = 'Native binaries for imgui-java binding for Linux'
|
|
moduleName = 'imgui.natives.linux'
|
|
libName = 'libimgui-java64.so'
|
|
break
|
|
case 'macos':
|
|
packageName = 'imgui-java-natives-macos'
|
|
packageDesc = 'Native binaries for imgui-java binding for macOS'
|
|
moduleName = 'imgui.natives.macos'
|
|
libName = 'libimgui-java64.dylib'
|
|
break
|
|
}
|
|
|
|
jar {
|
|
from(fromDir) {
|
|
include "$libName" // this is fine
|
|
into 'io/imgui/java/native-bin/'
|
|
}
|
|
manifest {
|
|
attributes 'Automatic-Module-Name': moduleName
|
|
}
|
|
}
|
|
|
|
apply from: "$rootDir/publish.gradle"
|
|
configurePublishing(packageName, packageDesc, project.version)
|