Add an ability to load binaries from classpath

This commit is contained in:
SpaiR committed 2020-01-19 14:54:04 +03:00
1 parent f1e5464d51
commit c259aaa8b6
5 files changed
+118 -21

No files matched your search

+57
View File
@@ -0,0 +1,57 @@
plugins {
id 'java'
id 'com.jfrog.bintray' version '1.8.4'
id 'maven-publish'
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
def packageName = 'natives-linux'
def libName = 'libimgui-java64.so'
if (System.getProperty('deployWin32')) {
packageName = 'natives-windows-x86'
libName = 'imgui-java.dll'
} else if (System.getProperty('deployWin64')) {
packageName = 'natives-windows'
libName = 'imgui-java64.dll'
} else if (System.getProperty('deployLinux32')) {
packageName = 'natives-linux-x86'
libName = 'libimgui-java.so'
} else if (System.getProperty('deployLinux64')) {
packageName = 'natives-linux'
libName = 'libimgui-java64.so'
}
jar {
from('../bin') {
include "$libName" // it's ok
into 'io/imgui/java/native-bin/'
}
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
groupId 'io.imgui.java'
artifactId packageName
artifact sourcesJar
version property('version')
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['MyPublication']
override = true
pkg {
repo = 'io.imgui.java'
name = packageName
}
}