MOD: updating build prefs to test the ndk lib

This commit is contained in:
JohnE 2019-02-19 10:30:03 -08:00
parent 17059b1f03
commit 1aa9732294
2 changed files with 15 additions and 14 deletions

View File

@ -12,13 +12,13 @@ android {
versionCode 1 versionCode 1
versionName '1.0' versionName '1.0'
externalNativeBuild { // externalNativeBuild {
cmake { // cmake {
arguments '-DANDROID_PLATFORM=android-23', // arguments '-DANDROID_PLATFORM=android-23',
'-DANDROID_TOOLCHAIN=clang', // '-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=c++_static' // '-DANDROID_STL=c++_static'
} // }
} // }
} }
buildTypes { buildTypes {
release { release {
@ -33,11 +33,11 @@ android {
jniLibs.srcDirs = ['libs/wolfssl-jni'] jniLibs.srcDirs = ['libs/wolfssl-jni']
} }
} }
externalNativeBuild { // externalNativeBuild {
cmake { // cmake {
path 'CMakeLists.txt' // path 'CMakeLists.txt'
} // }
} // }
} }
// Copies files to the dist/ folder, adds a timestamp // Copies files to the dist/ folder, adds a timestamp
@ -57,7 +57,8 @@ task copyLibs(type: Copy) {
} }
dependencies { dependencies {
testImplementation 'junit:junit:4.12' // testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0'
} }
// tasks.whenTaskAdded { task -> // tasks.whenTaskAdded { task ->

View File

@ -21,7 +21,7 @@ public class MainActivity extends AppCompatActivity {
} }
public native String stringFromJNI(); public native String stringFromJNI();
static { static {
System.loadLibrary("hello-libs"); System.loadLibrary("wolfssl-jni");
} }
} }