acl/android/acl_ndk12b/build.gradle

109 lines
3.9 KiB
Groovy
Raw Normal View History

2017-09-13 18:57:12 +08:00
apply plugin: 'com.android.library'
buildscript {
repositories {
2019-03-07 16:40:47 +08:00
google()
2017-09-13 18:57:12 +08:00
jcenter()
}
dependencies {
2019-03-07 16:40:47 +08:00
//classpath 'com.android.tools.build:gradle:3.3.2'
//classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:3.3.1'
2017-09-13 18:57:12 +08:00
}
2019-03-07 16:40:47 +08:00
//implementation {}
2017-09-13 18:57:12 +08:00
}
android {
2019-03-07 16:40:47 +08:00
compileSdkVersion 28
buildToolsVersion "28.0.3"
repositories {
maven { url 'https://repo1.maven.org/maven2' }
}
2017-09-13 18:57:12 +08:00
defaultConfig {
2019-11-01 15:13:01 +08:00
minSdkVersion 14
2019-03-07 16:40:47 +08:00
targetSdkVersion 28
2017-09-13 18:57:12 +08:00
versionCode 1
versionName "1.0"
2019-09-06 13:20:02 +08:00
// testIstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2017-09-13 18:57:12 +08:00
externalNativeBuild {
cmake {
2019-03-07 16:40:47 +08:00
//arguments "-DANDROID_STL=stl_shared"
2020-12-10 16:57:31 +08:00
arguments "-DANDROID_STL=gnustl_shared" // for ndk12b, ndk16b
arguments "-DACL_DISABLE_HOOK_IO=YES" // for ndk12b
2020-12-10 16:57:31 +08:00
//arguments "-DANDROID_STL=c++_shared" // for ndk20 or above
//arguments "-DHAS_ATOMIC=YES" // for ndk20 or above
//arguments "-DCMAKE_VERBOSE_MAKEFILE=ON"
2019-09-06 11:49:05 +08:00
arguments "-DCMAKE_BUILD_TYPE=RELEASE"
arguments "-DCMAKE_CXX_FLAGS_RELEASE=-O3"
arguments "-DCMAKE_C_FLAGS_RELEASE=-O3"
2019-10-04 11:31:08 +08:00
arguments "-DACL_CLIENT_ONLY=YES"
2020-08-24 14:33:54 +08:00
arguments "-DHAS_MBEDTLS=YES"
2020-03-25 11:34:09 +08:00
arguments "-DACL_BUILD_SHARED=YES"
2017-09-13 18:57:12 +08:00
//cppFlags "-fexceptions"
//abiFilters 'armeabi', 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
2020-12-10 16:57:31 +08:00
abiFilters 'armeabi', 'arm64-v8a', 'armeabi-v7a', 'x86' // for ndk12b, ndk16b
//abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86' // for ndk20 or above
2017-09-13 18:57:12 +08:00
}
cmake {
//arguments '-DANDROID_PLATFORM=android-14','-DANDROID_TOOLCHAIN=clang'
2020-12-10 10:29:29 +08:00
targets 'acl_static', 'protocol_static', 'acl_cpp_static', 'fiber_static', 'fiber_cpp_static' // for ndk12b, ndk16b
//targets 'acl_static', 'protocol_static', 'acl_cpp_static', 'fiber_static', 'fiber_cpp_static', 'acl', 'protocol', 'acl_cpp', 'fiber', 'fiber_cpp' // for ndk20 or above
}
2017-09-13 18:57:12 +08:00
}
}
buildTypes {
release {
minifyEnabled true
2017-09-13 18:57:12 +08:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
jniDebuggable true
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2017-09-13 18:57:12 +08:00
}
}
externalNativeBuild {
cmake {
path '../../CMakeLists.txt'
version "3.10.2"
2017-09-13 18:57:12 +08:00
}
}
packagingOptions {
2019-10-08 11:34:01 +08:00
exclude 'lib/arm64-v8a/libgnustl_shared.so'
exclude 'lib/armeabi-v7a/libgnustl_shared.so'
exclude 'lib/armeabi/libgnustl_shared.so'
exclude 'lib/x86/libgnustl_shared.so'
2019-03-07 16:40:47 +08:00
exclude 'lib/arm64-v8a/libc++_shared.so'
exclude 'lib/armeabi-v7a/libc++_shared.so'
exclude 'lib/armeabi/libc++_shared.so'
exclude 'lib/x86/libc++_shared.so'
2017-09-13 18:57:12 +08:00
}
productFlavors {
}
}
dependencies {
2019-03-07 16:40:47 +08:00
//compile fileTree(include: ['*.jar'], dir: 'libs')
implementation fileTree(include: ['*.jar'], dir: 'libs')
//androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
2017-09-17 00:02:43 +08:00
//compile 'com.android.support:appcompat-v7:25.3.1'
//compile 'com.android.support.constraint:constraint-layout:1.0.2'
//testCompile 'junit:junit:4.12'
2019-03-07 16:40:47 +08:00
//compile files('libs/junit-4.12.jar')
//implementation files('libs/junit-4.12.jar')
2017-09-13 18:57:12 +08:00
}
allprojects {
repositories {
2019-03-07 16:40:47 +08:00
google()
2017-09-13 18:57:12 +08:00
jcenter()
}
}