2020-04-13 16:20:37 +08:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
|
|
android {
|
2021-11-17 15:51:37 +08:00
|
|
|
compileSdkVersion 31
|
2020-04-13 16:20:37 +08:00
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
applicationId "cn.android.sample"
|
2022-05-31 14:55:56 +08:00
|
|
|
minSdkVersion 19
|
2021-11-17 15:51:37 +08:00
|
|
|
targetSdkVersion 31
|
2020-04-13 16:20:37 +08:00
|
|
|
versionCode 1
|
|
|
|
|
versionName "1.0"
|
|
|
|
|
|
2021-03-02 16:36:38 +08:00
|
|
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
2021-03-24 18:04:50 +08:00
|
|
|
ndk{
|
|
|
|
|
//生成so库名称 也是System.load
|
|
|
|
|
moduleName "apisecurity-lib"
|
|
|
|
|
// abiFilters 'x86', 'armeabi-v7a'
|
2020-04-13 16:20:37 +08:00
|
|
|
}
|
2021-03-02 16:36:38 +08:00
|
|
|
|
2020-04-13 16:20:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
|
release {
|
|
|
|
|
keyAlias 'wzbos'
|
|
|
|
|
keyPassword '123456'
|
|
|
|
|
storeFile file("test.keystore")
|
|
|
|
|
storePassword '123456'
|
|
|
|
|
}
|
2021-03-25 12:20:44 +08:00
|
|
|
debug {//非目标签名 用于验证
|
|
|
|
|
keyAlias 'androidkey'
|
|
|
|
|
keyPassword 'android'
|
|
|
|
|
storeFile file("androidkey.keystore")
|
|
|
|
|
storePassword 'android'
|
|
|
|
|
}
|
2021-03-02 16:36:38 +08:00
|
|
|
|
2020-04-13 16:20:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
release {
|
2021-03-02 16:36:38 +08:00
|
|
|
debuggable false//xml android:debuggable="false"
|
2020-04-13 16:20:37 +08:00
|
|
|
minifyEnabled false
|
2021-03-24 18:04:50 +08:00
|
|
|
zipAlignEnabled true
|
2020-04-13 16:20:37 +08:00
|
|
|
signingConfig signingConfigs.release
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
|
}
|
|
|
|
|
debug{
|
2021-03-02 16:36:38 +08:00
|
|
|
debuggable true
|
2021-03-25 12:20:44 +08:00
|
|
|
signingConfig signingConfigs.debug
|
2020-04-13 16:20:37 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
|
cmake {
|
|
|
|
|
path "CMakeLists.txt"
|
2021-11-17 15:51:37 +08:00
|
|
|
version '3.10.2'
|
2020-04-13 16:20:37 +08:00
|
|
|
}
|
|
|
|
|
}
|
2021-03-24 18:04:50 +08:00
|
|
|
//这里libold.so 是hook用的实际是apk 为了读源文件签名hook
|
2022-05-31 14:52:16 +08:00
|
|
|
sourceSets.main.jniLibs.srcDirs = ['libs'] //为了直接读取 lib目录下 arm64-v8a/libold.so=apk 和api-so无关
|
2020-04-13 16:20:37 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2021-11-17 15:51:37 +08:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
|
2020-04-13 16:20:37 +08:00
|
|
|
implementation project(':apisecurity')
|
|
|
|
|
}
|