Disable build, keep using prebuilt libraries and include them in the artifacts
This commit is contained in:
16
build.gradle
16
build.gradle
@@ -17,8 +17,8 @@ dependencies {
|
|||||||
|
|
||||||
group = 'com.github.boukefalos'
|
group = 'com.github.boukefalos'
|
||||||
project.archivesBaseName = 'jlibusb'
|
project.archivesBaseName = 'jlibusb'
|
||||||
version = '0.5.7'
|
version = '0.5.8'
|
||||||
def jniVersion = '0.2.3.0'
|
def jniVersion = '0.2.3.1'
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
gradleVersion = '1.12'
|
gradleVersion = '1.12'
|
||||||
@@ -56,7 +56,7 @@ model {
|
|||||||
libs(PrebuiltLibraries) {
|
libs(PrebuiltLibraries) {
|
||||||
usb { lib ->
|
usb { lib ->
|
||||||
binaries.withType(StaticLibraryBinary) {
|
binaries.withType(StaticLibraryBinary) {
|
||||||
staticLibraryFile = file("lib/${targetPlatform.name}/libusb-1.0.dll.a")
|
staticLibraryFile = file("lib/${targetPlatform.name}/libusb-1.0.dll")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ task jniHeaders(dependsOn: compileJava) {
|
|||||||
args '-o', outputFile
|
args '-o', outputFile
|
||||||
args '-classpath', sourceSets.main.output.classesDir
|
args '-classpath', sourceSets.main.output.classesDir
|
||||||
args '-classpath', file("$buildDir/../bin")
|
args '-classpath', file("$buildDir/../bin")
|
||||||
args 'ch.ntb.usb.LibusbJava1'
|
args 'ch.ntb.usb.LibusbJava'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,6 @@ libraries {
|
|||||||
tasks.withType(CppCompile) { task ->
|
tasks.withType(CppCompile) { task ->
|
||||||
task.dependsOn jniHeaders
|
task.dependsOn jniHeaders
|
||||||
}
|
}
|
||||||
|
|
||||||
lib library: 'usb', linkage: 'static'
|
lib library: 'usb', linkage: 'static'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,8 +134,11 @@ binaries.withType(SharedLibraryBinary) { binary ->
|
|||||||
}
|
}
|
||||||
def builderTask = binary.tasks.builder
|
def builderTask = binary.tasks.builder
|
||||||
def libraryDirectory = project.group.replace('.', '/') + "/${project.archivesBaseName}/${variantName}"
|
def libraryDirectory = project.group.replace('.', '/') + "/${project.archivesBaseName}/${variantName}"
|
||||||
nativeJar.into(libraryDirectory) { from builderTask.outputFile }
|
nativeJar.into(libraryDirectory) {
|
||||||
nativeJar.dependsOn builderTask
|
from builderTask.outputFile
|
||||||
|
from file("lib/${targetPlatform.name}/libusb0.dll")
|
||||||
|
}
|
||||||
|
// nativeJar.dependsOn builderTask
|
||||||
}
|
}
|
||||||
|
|
||||||
def mainPom = uploadArchives.repositories.mavenDeployer.pom
|
def mainPom = uploadArchives.repositories.mavenDeployer.pom
|
||||||
|
|||||||
BIN
lib/windows_amd64/libusb0.dll
Normal file
BIN
lib/windows_amd64/libusb0.dll
Normal file
Binary file not shown.
BIN
lib/windows_i386/libusb0.dll
Normal file
BIN
lib/windows_i386/libusb0.dll
Normal file
Binary file not shown.
@@ -361,6 +361,7 @@ public class LibusbJava {
|
|||||||
private static native int usb_error_no(int value);
|
private static native int usb_error_no(int value);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
Native.load("com.github.boukefalos", "jlibusb", "libusb0");
|
||||||
Native.load("com.github.boukefalos", "jlibusb");
|
Native.load("com.github.boukefalos", "jlibusb");
|
||||||
|
|
||||||
// define the error codes
|
// define the error codes
|
||||||
|
|||||||
Reference in New Issue
Block a user