Files
imgui-java/buildSrc/scripts/publish.sh
T
SpaiR 46c008eb02 build(binding): add universal macOS ARM64 dylib and static FreeType compilation
- 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.
2024-08-07 09:41:09 +03:00

46 lines
1.2 KiB
Bash

#!/bin/bash
# Set base directory and navigate to project root
echo "Setting base directory and navigating to project root..."
BASEDIR=$(dirname "$0")
cd "$BASEDIR"/../.. || exit 1
echo "Navigated to $(pwd)"
echo '> Publishing Modules...'
publish_module() {
local module=$1
echo ">> Publishing Module [$module]"
./gradlew $module:publishImguiPublicationToMavenCentralRepository
if [ $? -ne 0 ]; then
echo "Failed to publish $module module"
exit 1
fi
echo ">> Module [$module] published successfully"
}
# Publish each module
publish_module "imgui-app"
publish_module "imgui-lwjgl3"
publish_module "imgui-binding"
echo '> Publishing Natives...'
publish_natives() {
local platform=$1
echo ">> Publishing Natives: [$platform]"
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=$platform
if [ $? -ne 0 ]; then
echo "Failed to publish natives for $platform"
exit 1
fi
echo ">> Natives for $platform published successfully"
}
# Publish natives for each platform
publish_natives "windows"
publish_natives "linux"
publish_natives "macos"
echo "All modules and natives published successfully."