//plugins { // id 'kotlin-android' // id 'kotlin-kapt' // id 'com.yanzhenjie.andserver' // AndServer //} apply plugin: 'com.android.application' apply from: 'p_module.gradle' apply plugin: 'kotlin-android' def VERSION_CODE = 3 def VERSION_NAME_LT = "LT.A.1.2.2.3_20231225_prod" def VERSION_NAME = "A.2.6.5.9_20240423" def flag = "_inner_test" android { compileSdkVersion 30 buildToolsVersion '30.0.3' namespace 'com.aispeech.nativedemo' defaultConfig { applicationId "com.aispeech.nativedemo" minSdkVersion 26 targetSdkVersion 30 versionCode VERSION_CODE versionName VERSION_NAME flavorDimensions "defalut" sourceSets { main { //这个配置是必须的,如果你的so文件放在了libs/armeabi/下,则下面srcDir = libs即可 jniLibs.srcDirs = ['libs'] } } ndk { // 设置支持的SO库架构 abiFilters 'armeabi-v7a', 'arm64-v8a'//, 'x86', , 'x86_64' } multiDexEnabled true vectorDrawables.useSupportLibrary = true buildConfigField("String", "ACCESS_KEY", ACCESS_KEY) buildConfigField("String", "USER_SAVE_VALUE_KEY", USER_SAVE_VALUE_KEY) buildConfigField("String", "USER_SAVE_KEY", USER_SAVE_KEY) buildConfigField("String", "USER_SAVE_DES_IV", USER_SAVE_DES_IV) buildConfigField("int", "ASR_MODE", "0") buildConfigField("int", "DB_VERSION", "1") manifestPlaceholders = [qqappid: "1108812179", APP_NAME: "@string/app_name", APP_LOGO: "@drawable/logo"] } signingConfigs { release { storeFile file('../keystore/release.keystore') storePassword 'speech888' keyAlias 'aios' keyPassword 'speech888' } debug { storeFile file('../keystore/debug.keystore') } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release ndk { // abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" abiFilters "armeabi-v7a", "arm64-v8a" } manifestPlaceholders = [APP_LOGO: "@drawable/logo"] } debug { minifyEnabled false zipAlignEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.debug versionNameSuffix flag manifestPlaceholders = [APP_LOGO: "@drawable/logo_debug", APP_NAME: "@string/app_name_debug"] } } productFlavors { portraitH5 { buildConfigField("int", "ASR_MODE", "0") versionName VERSION_NAME } ltLandscape { //manifestPlaceholders = [APP_LOGO: "@drawable/lt_logo", APP_NAME: "@string/app_name"] buildConfigField("String", "AD_ID", '"ltLandscape_ID"') buildConfigField("int", "ASR_MODE", "1") versionName VERSION_NAME_LT } window { versionName VERSION_NAME } } externalNativeBuild { ndkBuild { path file('src/main/jni/Android.mk') } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false } packagingOptions { exclude 'META-INF/DEPENDENCIES' pickFirst 'lib/arm64-v8a/libc++_shared.so' pickFirst 'lib/armeabi-v7a/libc++_shared.so' } viewBinding { enabled = true } } configurations { all { exclude group: 'xml-apis', module: 'xml-apis' } } //repositories { // flatDir { // dirs 'libs', '../test/libs'//this way we can find the .aar file in libs folder // } //} dependencies { implementation fileTree(dir: 'libs', excludes: ['framework.jar', 'fastjson-1.2.21.jar', 'rt.jar', 'lefaceSDK-multiatt-0814_enc.aar'], include: ['*.jar', '*.aar']) implementation fileTree(dir: '../test/libs', excludes: ['framework.jar'], include: ['*.jar', '*.aar']) //noinspection GradleCompatible implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.google.android.material:material:1.4.0' implementation group: 'org.java-websocket', name: 'Java-WebSocket', version: '1.5.1' implementation("io.minio:minio:8.2.2") { exclude group: 'com.squareup.okhttp3' } //implementation files ('C:/Users/唐明杰/.jdks/corretto-1.8.0_362/jre/lib/rt.jar') //Rxjava implementation 'io.reactivex.rxjava2:rxjava:2.2.5' implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' // H5原生通信 //api 'com.github.wendux:DSBridge-Android:3.0.0' //支持腾讯x5浏览器内核 //api 'com.github.wendux:DSBridge-Android:x5-3.0-SNAPSHOT' implementation project(path: ':test') api project(path: ':dsbridge') api project(path: ':base') implementation project(path: ':andServer') implementation 'androidx.core:core-ktx:1.3.1' implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0' implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'org.apache.xmlrpc:xmlrpc-client:3.1.3' //implementation 'com.github.yangjie10930:EpMedia:v1.0.1' implementation 'com.writingminds:FFmpegAndroid:0.3.2' implementation 'com.readystatesoftware.chuck:library:1.1.0' implementation 'com.google.zxing:core:3.3.3' // 调试助手 debugImplementation "io.github.didi.dokit:dokitx:3.5.0.1" releaseImplementation "io.github.didi.dokit:dokitx-no-op:3.5.0.1" //implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0' // leakCanary //debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7' implementation files('libs/hdmiV1_0.jar') // implementation files('libs/rt.jar') { // } compileOnly files('libs/framework.jar') // implementation 'org.pytorch:pytorch_android:1.8.0' // implementation 'org.pytorch:pytorch_android_torchvision:1.8.0' // //implementation project(':api') // //annotationProcessor project(':processor') // //implementation 'javax.activation:javax.activation-api:1.2.0' // implementation 'com.yanzhenjie.andserver:api:2.1.9' // kapt 'com.yanzhenjie.andserver:processor:2.1.9' // // implementation 'com.google.android.material:material:1.1.0' // implementation 'com.android.support:appcompat-v7:28.0.0' // //implementation 'com.android.support:appcompat-v7:28.0.0' // // implementation 'org.apache.commons:commons-lang3:3.9' // implementation 'org.apache.commons:commons-collections4:4.4' // //implementation "ch.acra:acra-notification:5.1.3" // // implementation 'com.yanzhenjie:loading:1.0.0' // api 'com.alibaba:fastjson:1.1.71.android' // // api files('libs/rt.jar') { // } // api files('libs/lefaceSDK-multiatt-0814_enc.aar') { // } // // implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" // implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } //configurations.all { // resolutionStrategy { // force "androidx.exifinterface:exifinterface:1.3.2" // } //}