* [Build] CI refactor * [Build] Fix GenerateLibs * [Build] Up actions/checkout@v3 * [Build] Remove actions/gradle-build-action * [Build] Uncomment publish/release jobs * [Build] Delete obsolete jobs * [Build] Add more info to the jar manifest * [Build] Make checkout to fetch tags * [Build] Return job to update binaries * [Doc] Update README
52 lines
1.4 KiB
Groovy
52 lines
1.4 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
}
|
|
|
|
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 'win':
|
|
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 'mac':
|
|
packageName = 'imgui-java-natives-macos'
|
|
packageDesc = 'Native binaries for imgui-java binding for MacOS'
|
|
moduleName = 'imgui.natives.macos'
|
|
libName = 'libimgui-java64.dylib'
|
|
break
|
|
}
|
|
|
|
if (findProperty('freetype') == 'true') {
|
|
packageName += '-ft'
|
|
packageDesc += ' with Freetype support'
|
|
fromDir += '/freetype'
|
|
}
|
|
|
|
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)
|