NEW: ccc/build.sh will properly clean and build, name of lib is now libwolfssl-jni
This commit is contained in:
parent
dff8054b49
commit
30402a6126
|
@ -9,4 +9,4 @@ libwebp
|
|||
.DS_Store
|
||||
wolfssl-git
|
||||
var/
|
||||
|
||||
dist/
|
||||
|
|
|
@ -46,6 +46,24 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Copies files to the dist/ folder, adds a timestamp
|
||||
// instead of using a bash script I ventured out to try this file copy in Groovy (Gradle)
|
||||
// ...and yay, I was successful =)
|
||||
task copyLibs(type: Copy) {
|
||||
def thisDate = new Date().format('yyyyMMdd_HHmmssSSS')
|
||||
from('build/intermediates/cmake/debug/obj/') {
|
||||
include '**/*.so'
|
||||
into 'debug'
|
||||
}
|
||||
from('build/intermediates/cmake/release/obj/') {
|
||||
include '**/*.so'
|
||||
into 'release'
|
||||
}
|
||||
into "dist/wolfssl-jni_${thisDate}/"
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
// compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
// implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# BUILD this JNI library
|
||||
# - gradle task 'copyLibs' was created by me to copy the .so files to dist/
|
||||
#
|
||||
gradle clean
|
||||
# there is a bug in the cleaner task, we need to blow away this artifact directory too
|
||||
rm -rf .externalNativeBuild/
|
||||
# build and copy the libs
|
||||
gradle build copyLibs
|
|
@ -1,6 +1,6 @@
|
|||
# create a build target of "ccc-jni"
|
||||
# create a build target of "wolfssl-jni"
|
||||
# library is a SHARED (not STATIC), to be used with JNI
|
||||
add_library( ccc-jni
|
||||
add_library( wolfssl-jni
|
||||
SHARED
|
||||
jni/jni_fips.c
|
||||
jni/jni_native_struct.c
|
||||
|
@ -33,9 +33,9 @@ include_directories( jni/include
|
|||
|
||||
# set(distribution_DIR ${CMAKE_SOURCE_DIR}/dist)
|
||||
|
||||
set_target_properties( ccc-jni
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY
|
||||
"${CMAKE_SOURCE_DIR}/dist/ccc-jni/${ANDROID_ABI}" )
|
||||
# set_target_properties( wolfssl-jni
|
||||
# PROPERTIES
|
||||
# ARCHIVE_OUTPUT_DIRECTORY
|
||||
# "${CMAKE_SOURCE_DIR}/dist/wolfssl-jni/${ANDROID_ABI}" )
|
||||
|
||||
target_link_libraries( ccc-jni wolfssl-oem )
|
||||
target_link_libraries( wolfssl-jni wolfssl-oem )
|
Loading…
Reference in New Issue