From 9a948f03a75e4b12ca4d1c0fc18ca27f2c73485f Mon Sep 17 00:00:00 2001 From: xucz Date: Tue, 9 Apr 2024 11:17:21 +0800 Subject: [PATCH] [Android]Update gradle config. --- Android/APIExample/app/build.gradle | 45 +++++++++++++++++------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/Android/APIExample/app/build.gradle b/Android/APIExample/app/build.gradle index 827619c07..c667884a4 100644 --- a/Android/APIExample/app/build.gradle +++ b/Android/APIExample/app/build.gradle @@ -3,14 +3,16 @@ apply plugin: 'kotlin-android' apply from: "${rootDir.absolutePath}/git-hooks.gradle" apply from: 'vendors.gradle' +def agoraSdkVersion = "4.3.1" def localSdkPath= "${rootProject.projectDir.absolutePath}/../../sdk" + android { compileSdkVersion 32 buildToolsVersion "32.0.0" defaultConfig { - applicationId "io.agora.test.entfull" + applicationId "io.agora.api.example" minSdkVersion 21 targetSdkVersion 32 versionCode 1 @@ -55,6 +57,14 @@ android { viewBinding true } + applicationVariants.all { + variant -> + variant.outputs.all { output -> + outputFileName = new File(rootProject.name + + "_" + agoraSdkVersion + + "_" + new Date().format("yyyyMMddHHmm") + ".apk") + } + } } dependencies { @@ -64,25 +74,24 @@ dependencies { implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar']) } else { - def agora_sdk_version = "4.3.1" // case 1: full libs - implementation "io.agora.rtc:full-sdk:${agora_sdk_version}" - implementation "io.agora.rtc:full-screen-sharing:${agora_sdk_version}" + implementation "io.agora.rtc:full-sdk:${agoraSdkVersion}" + implementation "io.agora.rtc:full-screen-sharing:${agoraSdkVersion}" // case 2: partial libs - // implementation "io.agora.rtc:full-rtc-basic:${agora_sdk_version}" - // implementation "io.agora.rtc:ains:${agora_sdk_version}" - // implementation "io.agora.rtc:full-content-inspect:${agora_sdk_version}" - // implementation "io.agora.rtc:full-virtual-background:${agora_sdk_version}" - // implementation "io.agora.rtc:full-super-resolution:${agora_sdk_version}" - // implementation "io.agora.rtc:spatial-audio:${agora_sdk_version}" - // implementation "io.agora.rtc:audio-beauty:${agora_sdk_version}" - // implementation "io.agora.rtc:clear-vision:${agora_sdk_version}" - // implementation "io.agora.rtc:pvc:${agora_sdk_version}" - // implementation "io.agora.rtc:screen-capture:${agora_sdk_version}" - // implementation "io.agora.rtc:aiaec:${agora_sdk_version}" - // implementation "io.agora.rtc:drm-loader:${agora_sdk_version}" - // implementation "io.agora.rtc:drm:${agora_sdk_version}" - // implementation "io.agora.rtc:full-vqa:${agora_sdk_version}" + // implementation "io.agora.rtc:full-rtc-basic:${agoraSdkVersion}" + // implementation "io.agora.rtc:ains:${agoraSdkVersion}" + // implementation "io.agora.rtc:full-content-inspect:${agoraSdkVersion}" + // implementation "io.agora.rtc:full-virtual-background:${agoraSdkVersion}" + // implementation "io.agora.rtc:full-super-resolution:${agoraSdkVersion}" + // implementation "io.agora.rtc:spatial-audio:${agoraSdkVersion}" + // implementation "io.agora.rtc:audio-beauty:${agoraSdkVersion}" + // implementation "io.agora.rtc:clear-vision:${agoraSdkVersion}" + // implementation "io.agora.rtc:pvc:${agoraSdkVersion}" + // implementation "io.agora.rtc:screen-capture:${agoraSdkVersion}" + // implementation "io.agora.rtc:aiaec:${agoraSdkVersion}" + // implementation "io.agora.rtc:drm-loader:${agoraSdkVersion}" + // implementation "io.agora.rtc:drm:${agoraSdkVersion}" + // implementation "io.agora.rtc:full-vqa:${agoraSdkVersion}" }