feat: 增加预览并远程显示画面

This commit is contained in:
2026-07-14 00:23:36 +08:00
parent c3b816415a
commit b2af050e5d
21 changed files with 709 additions and 107 deletions

View File

@@ -2,6 +2,14 @@ plugins {
id 'com.android.application'
}
def releaseTime() {
return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
}
def appName() {
return "WebRTCControlled"
}
android {
namespace 'com.tt.controlled'
compileSdk 34
@@ -25,10 +33,85 @@ android {
aidl true
}
signingConfigs {
keypub {
storeFile file(rootProject.ext.signingConfigs.keypub.storeFile)
storePassword rootProject.ext.signingConfigs.keypub.storePassword
keyAlias rootProject.ext.signingConfigs.keypub.keyAlias
keyPassword rootProject.ext.signingConfigs.keypub.keyPassword
}
crosshatch {
storeFile file(rootProject.ext.signingConfigs.crosshatch.storeFile)
storePassword rootProject.ext.signingConfigs.crosshatch.storePassword
keyAlias rootProject.ext.signingConfigs.crosshatch.keyAlias
keyPassword rootProject.ext.signingConfigs.crosshatch.keyPassword
}
zhanxun {
storeFile file(rootProject.ext.signingConfigs.zhanxun.storeFile)
storePassword rootProject.ext.signingConfigs.zhanxun.storePassword
keyAlias rootProject.ext.signingConfigs.zhanxun.keyAlias
keyPassword rootProject.ext.signingConfigs.zhanxun.keyPassword
}
}
buildTypes {
zhanRuiDebug.initWith(debug)
zhanRuiDebug {
debuggable true
signingConfig signingConfigs.zhanxun
}
zhanRuiRelease.initWith(release)
zhanRuiRelease {
signingConfig signingConfigs.zhanxun
}
CrosshatchDebug.initWith(debug)
CrosshatchDebug {
debuggable true
signingConfig signingConfigs.crosshatch
}
CrosshatchRelease.initWith(release)
CrosshatchRelease {
signingConfig signingConfigs.crosshatch
}
debug {
versionNameSuffix "_debug"
debuggable true
minifyEnabled false
//Zipalign优化
zipAlignEnabled true
signingConfig signingConfigs.keypub
}
release {
minifyEnabled false
//Zipalign优化
zipAlignEnabled true
//前一部分代表系统默认的android程序的混淆文件该文件已经包含了基本的混淆声明后一个文件是自己的定义混淆文件
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
//签名
signingConfig signingConfigs.keypub
}
}
// Add application variant configuration here instead
applicationVariants.all { variant ->
variant.outputs.each { output ->
def buildType = variant.buildType.name
def fileName = ""
if (buildType.contains("debug")) {
fileName = "${appName()}_V${defaultConfig.versionName}_${releaseTime()}.apk"
} else {
fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType}.apk"
}
output.outputFileName = fileName
}
}