增强配置化打包程序,可有效防止手动打包配置错误
This commit is contained in:
parent
29badbf725
commit
a154f480f6
@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
|
|||||||
apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-parcelize'
|
apply plugin: 'kotlin-parcelize'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
|
@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
|
|||||||
apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-parcelize'
|
apply plugin: 'kotlin-parcelize'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
141
app/build.gradle
141
app/build.gradle
@ -3,6 +3,7 @@ apply plugin: 'img-optimizer'
|
|||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
apply plugin: 'com.google.firebase.crashlytics'
|
apply plugin: 'com.google.firebase.crashlytics'
|
||||||
apply plugin: 'com.alibaba.arouter'
|
apply plugin: 'com.alibaba.arouter'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
android {
|
android {
|
||||||
dexOptions {
|
dexOptions {
|
||||||
jumboMode = true
|
jumboMode = true
|
||||||
@ -10,49 +11,6 @@ android {
|
|||||||
project.tasks.getByName("tasks").doFirst {
|
project.tasks.getByName("tasks").doFirst {
|
||||||
|
|
||||||
}
|
}
|
||||||
/* flavorDimensions "packageApk"
|
|
||||||
productFlavors {
|
|
||||||
LinkTest {
|
|
||||||
dimension "packageApk"
|
|
||||||
manifestPlaceholders = [serverHost: "https://ceshi.yaoulive.com",isGooglePlay:0,isPluginModel:true]
|
|
||||||
}
|
|
||||||
LinkOfficial {
|
|
||||||
dimension "packageApk"
|
|
||||||
manifestPlaceholders = [serverHost: "https://napi.yaoulive.com",isGooglePlay:0,isPluginModel:true]
|
|
||||||
}
|
|
||||||
GoogleTest {
|
|
||||||
dimension "packageApk"
|
|
||||||
manifestPlaceholders = [serverHost: "https://ceshi.yaoulive.com",isGooglePlay:1,isPluginModel:false]
|
|
||||||
}
|
|
||||||
GoogleOfficial{
|
|
||||||
dimension "packageApk"
|
|
||||||
manifestPlaceholders = [serverHost: "https://napi.yaoulive.com",isGooglePlay:1,isPluginModel:false]
|
|
||||||
}
|
|
||||||
|
|
||||||
}*/
|
|
||||||
/* applicationVariants.all { variant ->
|
|
||||||
variant.mergeAssetsProvider.configure {
|
|
||||||
doLast {
|
|
||||||
delete(fileTree(dir: outputDir, includes: [
|
|
||||||
'model/ai_bgseg_green.bundle',
|
|
||||||
'model/ai_face_processor.bundle',
|
|
||||||
'model/ai_face_processor_lite.bundle',
|
|
||||||
'model/ai_hairseg.bundle',
|
|
||||||
'model/ai_hand_processor.bundle',
|
|
||||||
'model/ai_human_processor.bundle',
|
|
||||||
'model/ai_human_processor_gpu.bundle',
|
|
||||||
'model/ai_human_processor_mb_fast.bundle',
|
|
||||||
'graphics/body_slim.bundle',
|
|
||||||
'graphics/controller_cpp.bundle',
|
|
||||||
'graphics/face_beautification.bundle',
|
|
||||||
'graphics/face_makeup.bundle',
|
|
||||||
'graphics/fuzzytoonfilter.bundle',
|
|
||||||
'graphics/fxaa.bundle',
|
|
||||||
'graphics/tongue.bundle'
|
|
||||||
]))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
@ -128,22 +86,26 @@ android {
|
|||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
println "清空build文件夹";
|
println "清空build文件夹";
|
||||||
for (final def project in rootProject.getAllprojects()) {
|
for (final def project in rootProject.getAllprojects()) {
|
||||||
|
def name = variant.name.replace('Debug', '').replace('Release', '').toLowerCase()
|
||||||
delete project.buildDir
|
delete project.buildDir
|
||||||
|
delete 'app' + File.separator + name
|
||||||
println project.buildDir
|
println project.buildDir
|
||||||
}
|
}
|
||||||
String variantName = variant.name.capitalize()
|
String variantName = variant.name.capitalize()
|
||||||
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
|
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
|
||||||
processManifestTask.doLast { pm ->
|
processManifestTask.doLast { pm ->
|
||||||
String manifestPath = "build/intermediates/bundle_manifest/release/bundle-manifest/AndroidManifest.xml"
|
String manifestPath = "build/intermediates/bundle_manifest/google_onlineRelease/bundle-manifest/AndroidManifest.xml"
|
||||||
def isGooglePlay = rootProject.ext.manifestPlaceholders.isGooglePlay
|
def isGooglePlay = variant.name.contains("google")
|
||||||
println "谷歌版本:" + isGooglePlay
|
println "谷歌版本:" + isGooglePlay
|
||||||
println "文件存在" + file(manifestPath).exists()
|
println "文件存在" + file(manifestPath).exists()
|
||||||
println "" + (isGooglePlay != 0)
|
println "" + (isGooglePlay != 0)
|
||||||
println "" + (file(manifestPath).exists() && isGooglePlay != 0)
|
println "" + (file(manifestPath).exists() && isGooglePlay)
|
||||||
if (file(manifestPath).exists() && isGooglePlay != 0) {
|
if (file(manifestPath).exists() && isGooglePlay) {
|
||||||
def manifestContent = file(manifestPath).getText()
|
def manifestContent = file(manifestPath).getText()
|
||||||
println "移除权限"
|
println "移除权限"
|
||||||
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
||||||
@ -152,8 +114,8 @@ android {
|
|||||||
} else {
|
} else {
|
||||||
print "not Exists = " + manifestPath
|
print "not Exists = " + manifestPath
|
||||||
}
|
}
|
||||||
manifestPath = "build/intermediates/merged_manifests/release/processReleaseManifest/AndroidManifest.xml"
|
manifestPath = "build/intermediates/merged_manifests/google_onlineRelease/processReleaseManifest/AndroidManifest.xml"
|
||||||
if (file(manifestPath).exists() && isGooglePlay != 0) {
|
if (file(manifestPath).exists() && isGooglePlay) {
|
||||||
def manifestContent = file(manifestPath).getText()
|
def manifestContent = file(manifestPath).getText()
|
||||||
println "移除权限2"
|
println "移除权限2"
|
||||||
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
||||||
@ -198,24 +160,75 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
variant.outputs.all {
|
variant.outputs.all { vt ->
|
||||||
def isGoogle = "链接"
|
println("输出文件名:${vt}")
|
||||||
if (rootProject.ext.manifestPlaceholders.isGooglePlay == 1) {
|
def channel = ''
|
||||||
isGoogle = "谷歌"
|
def server=''
|
||||||
} else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 2) {
|
if (variant.name.startsWith('huawei')) {
|
||||||
isGoogle = "Huawei"
|
channel = "华为"
|
||||||
} else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 3) {
|
} else if (variant.name.startsWith('samsung')) {
|
||||||
isGoogle = "Samsung"
|
channel = "三星"
|
||||||
|
} else if (variant.name.startsWith('google')) {
|
||||||
|
channel = "谷歌"
|
||||||
|
} else {
|
||||||
|
channel = "链接"
|
||||||
|
}
|
||||||
|
if(variant.name.contains('online')){
|
||||||
|
server='正式服'
|
||||||
|
}else{
|
||||||
|
server='测试服'
|
||||||
|
}
|
||||||
|
outputFileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${channel}-${server}-${variant.buildType.name}.apk"
|
||||||
|
}
|
||||||
|
tasks.named("sign${variant.name.capitalize()}Bundle", com.android.build.gradle.internal.tasks.FinalizeBundleTask) {
|
||||||
|
File file = finalBundleFile.asFile.get()
|
||||||
|
def channel = ''
|
||||||
|
if (variant.name.startsWith('huawei')) {
|
||||||
|
channel = "华为"
|
||||||
|
} else if (variant.name.startsWith('samsung')) {
|
||||||
|
channel = "三星"
|
||||||
|
} else if (variant.name.startsWith('google')) {
|
||||||
|
channel = "谷歌"
|
||||||
|
} else {
|
||||||
|
channel = "链接"
|
||||||
|
}
|
||||||
|
File finalFile = new File(file.parentFile, "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${channel}-${variant.buildType.name}.aab")
|
||||||
|
finalBundleFile.set(finalFile)
|
||||||
|
}
|
||||||
|
project.afterEvaluate { project ->
|
||||||
|
project.tasks.each {
|
||||||
|
if (it.name.startsWith('assemble') && it.name.endsWith('Release')) {
|
||||||
|
it.doLast {
|
||||||
|
def dir = it.name.replace('assemble', '').replace('Release', '').toLowerCase()
|
||||||
|
println("处理assembleRelease ${project.rootDir}\\app\\$dir\\release\\ | " + new File("${project.rootDir}\\app\\$dir\\release\\").exists())
|
||||||
|
if (new File("${project.rootDir}\\app\\$dir\\release\\").exists()) {
|
||||||
|
println("准备拷贝apk文件")
|
||||||
|
copy {
|
||||||
|
from file("${project.rootDir}\\app\\$dir\\release\\")
|
||||||
|
into file("${project.rootDir}\\outputs\\apk\\")
|
||||||
|
include '**/*.apk'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
println("打包apk结束")
|
||||||
|
}
|
||||||
|
} else if (it.name.startsWith('sign') && it.name.endsWith('ReleaseBundle')) {
|
||||||
|
it.doLast {
|
||||||
|
def dir = it.name.replace('sign', '').replace('ReleaseBundle', '').toLowerCase()
|
||||||
|
println("处理signReleaseBundle ${project.rootDir}\\app\\$dir\\release\\ | " + new File("${project.rootDir}\\app\\$dir\\release\\").exists())
|
||||||
|
if (new File("${project.rootDir}\\app\\$dir\\release\\").exists()) {
|
||||||
|
println("准备拷贝aab文件")
|
||||||
|
copy {
|
||||||
|
from file("${project.rootDir}\\app\\$dir\\release\\")
|
||||||
|
into file("${project.rootDir}\\outputs\\aab\\")
|
||||||
|
include '**/*.aab'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
println("打包aab结束")
|
||||||
}
|
}
|
||||||
def isPlugin = "完整"
|
|
||||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
|
||||||
isPlugin = "插件"
|
|
||||||
}
|
}
|
||||||
def isTest = "测试服"
|
|
||||||
if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") {
|
|
||||||
isTest = "正式服"
|
|
||||||
}
|
}
|
||||||
outputFileName = "[${new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="myname.pdlive.shayu">
|
package="myname.pdlive.shayu">
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
|
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.CALL_PHONE"
|
android:name="android.permission.CALL_PHONE"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
apply from: "config.gradle"
|
apply from: "config.gradle"
|
||||||
apply from: "dependencies.gradle"
|
apply from: "dependencies.gradle"
|
||||||
|
apply from: "config.gradle"
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.6.20'
|
ext.kotlin_version = '1.6.20'
|
||||||
@ -49,9 +49,9 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
/*task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}*/
|
||||||
ext {
|
ext {
|
||||||
IS_PUBLISH_LOCAL=true
|
IS_PUBLISH_LOCAL=true
|
||||||
LIB_VERSION="1.0.6"
|
LIB_VERSION="1.0.6"
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
publishNonDefault true
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||||
@ -211,11 +210,17 @@ dependencies {
|
|||||||
//侧滑删除
|
//侧滑删除
|
||||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||||
|
|
||||||
//华为支付插件包
|
huawei_onlineImplementation project(':lib_huawei')
|
||||||
//api project(':lib_huawei')
|
huawei_testImplementation project(':lib_huawei')
|
||||||
|
|
||||||
//google插件包
|
samsung_onlineImplementation project(":lib_google")
|
||||||
api project(':lib_google')
|
samsung_testImplementation project(":lib_google")
|
||||||
|
|
||||||
|
google_onlineImplementation project(":lib_google")
|
||||||
|
google_testImplementation project(":lib_google")
|
||||||
|
|
||||||
|
link_onlineImplementation project(":lib_google")
|
||||||
|
link_testImplementation project(":lib_google")
|
||||||
|
|
||||||
//samsung插件包
|
//samsung插件包
|
||||||
api project(':IAP6Helper')
|
api project(':IAP6Helper')
|
||||||
|
@ -9,11 +9,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式、
|
//正式、
|
||||||
// serverHost : "https://napi.yaoulive.com",
|
serverHost : "https://napi.yaoulive.com",
|
||||||
// 测试
|
// 测试
|
||||||
serverHost : "https://ceshi.yaoulive.com",
|
testServerHost : "https://ceshi.yaoulive.com",
|
||||||
|
|
||||||
buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")),
|
|
||||||
|
|
||||||
buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")),
|
buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")),
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 31
|
compileSdkVersion 31
|
||||||
@ -45,6 +46,7 @@ dependencies {
|
|||||||
|
|
||||||
// Because the components are created only during the afterEvaluate phase, you must
|
// Because the components are created only during the afterEvaluate phase, you must
|
||||||
// configure your publications using the afterEvaluate() lifecycle method.
|
// configure your publications using the afterEvaluate() lifecycle method.
|
||||||
|
/*
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
@ -77,4 +79,4 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
@ -1 +1 @@
|
|||||||
apply plugin: 'com.android.library'
apply plugin: 'img-optimizer'
apply plugin: 'kotlin-android'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
packagingOptions {
pickFirst "lib/armeabi/libyuvutils.so"
pickFirst "lib/arm64-v8a/libyuvutils.so"
pickFirst "lib/armeabi-v7a/libyuvutils.so"
pickFirst "lib/armeabi/libyuvtools.so"
pickFirst "lib/arm64-v8a/libyuvtools.so"
pickFirst "lib/armeabi-v7a/libyuvtools.so"
exclude "lib/arm64-v8a/libmmcv_api_handgesture.so"
exclude "lib/arm64-v8a/libmmcv_api_express.so"
exclude "lib/arm64-v8a/libMediaEncoder.so"
exclude "lib/arm64-v8a/libarcore_sdk_c.so"
exclude "lib/arm64-v8a/libmediadecoder.so"
exclude "lib/arm64-v8a/libMediaMuxer.so"
exclude "lib/arm64-v8a/libarcore_sdk_jni.so"
exclude "lib/arm64-v8a/libMediaUtils.so"
exclude "lib/arm64-v8a/libcosmosffmpeg.so"
}
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode rootProject.ext.android.versionCode
versionName rootProject.ext.android.versionName
manifestPlaceholders = rootProject.ext.manifestPlaceholders
ndk {
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
}
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
aaptOptions {
cruncherEnabled = false
useNewCruncher = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
kotlinOptions {
allWarningsAsErrors = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
flatDir {
dirs 'libs', '../libs'
}
mavenCentral()
}
dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation (name:'../libs/beautysdk-202202241203',ext:'aar')
implementation (name:'../libs/svgaplayer-release-v1.2.1',ext:'aar')
//socket.io
implementation('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
//common
api project(path:':lib_faceunity')//声网-新娱美颜
api project(path:':FaceUnity')//融云-新娱美颜
api project(path:':common')//公共库
api project(':Share')//分享
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
//工具
api rootProject.ext.dependencies["blank-utilcode"]
implementation 'com.eightbitlab:blurview:1.6.6'
implementation 'com.google.code.gson:gson:2.8.6'
implementation "com.getkeepsafe.relinker:relinker:1.4.4"
}
|
apply plugin: 'com.android.library'
apply plugin: 'img-optimizer'
apply plugin: 'kotlin-android'
apply from: "../package_config.gradle"
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
packagingOptions {
pickFirst "lib/armeabi/libyuvutils.so"
pickFirst "lib/arm64-v8a/libyuvutils.so"
pickFirst "lib/armeabi-v7a/libyuvutils.so"
pickFirst "lib/armeabi/libyuvtools.so"
pickFirst "lib/arm64-v8a/libyuvtools.so"
pickFirst "lib/armeabi-v7a/libyuvtools.so"
exclude "lib/arm64-v8a/libmmcv_api_handgesture.so"
exclude "lib/arm64-v8a/libmmcv_api_express.so"
exclude "lib/arm64-v8a/libMediaEncoder.so"
exclude "lib/arm64-v8a/libarcore_sdk_c.so"
exclude "lib/arm64-v8a/libmediadecoder.so"
exclude "lib/arm64-v8a/libMediaMuxer.so"
exclude "lib/arm64-v8a/libarcore_sdk_jni.so"
exclude "lib/arm64-v8a/libMediaUtils.so"
exclude "lib/arm64-v8a/libcosmosffmpeg.so"
}
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode rootProject.ext.android.versionCode
versionName rootProject.ext.android.versionName
manifestPlaceholders = rootProject.ext.manifestPlaceholders
ndk {
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
}
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
aaptOptions {
cruncherEnabled = false
useNewCruncher = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
kotlinOptions {
allWarningsAsErrors = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
flatDir {
dirs 'libs', '../libs'
}
mavenCentral()
}
dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation (name:'../libs/beautysdk-202202241203',ext:'aar')
implementation (name:'../libs/svgaplayer-release-v1.2.1',ext:'aar')
//socket.io
implementation('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
//common
api project(path:':lib_faceunity')//声网-新娱美颜
api project(path:':FaceUnity')//融云-新娱美颜
api project(path:':common')//公共库
api project(':Share')//分享
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
//工具
api rootProject.ext.dependencies["blank-utilcode"]
implementation 'com.eightbitlab:blurview:1.6.6'
implementation 'com.google.code.gson:gson:2.8.6'
implementation "com.getkeepsafe.relinker:relinker:1.4.4"
}
|
@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
78
package_config.gradle
Normal file
78
package_config.gradle
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
android{
|
||||||
|
flavorDimensions 'packageApk'
|
||||||
|
productFlavors {
|
||||||
|
link_test {
|
||||||
|
dimension 'packageApk'
|
||||||
|
manifestPlaceholders = [
|
||||||
|
serverHost : rootProject.ext.manifestPlaceholders.testServerHost,
|
||||||
|
isGooglePlay : 0,
|
||||||
|
isUploadLog : true,
|
||||||
|
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
|
]
|
||||||
|
}
|
||||||
|
link_online {
|
||||||
|
dimension 'packageApk'
|
||||||
|
manifestPlaceholders = [
|
||||||
|
serverHost : rootProject.ext.manifestPlaceholders.serverHost,
|
||||||
|
isGooglePlay : 0,
|
||||||
|
isUploadLog : true,
|
||||||
|
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
|
]
|
||||||
|
}
|
||||||
|
samsung_test {
|
||||||
|
dimension 'packageApk'
|
||||||
|
manifestPlaceholders = [
|
||||||
|
serverHost : rootProject.ext.manifestPlaceholders.testServerHost,
|
||||||
|
isGooglePlay : 3,
|
||||||
|
isUploadLog : true,
|
||||||
|
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
|
]
|
||||||
|
}
|
||||||
|
samsung_online {
|
||||||
|
dimension 'packageApk'
|
||||||
|
manifestPlaceholders = [
|
||||||
|
serverHost : rootProject.ext.manifestPlaceholders.serverHost,
|
||||||
|
isGooglePlay : 3,
|
||||||
|
isUploadLog : true,
|
||||||
|
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
|
]
|
||||||
|
}
|
||||||
|
google_test {
|
||||||
|
dimension 'packageApk'
|
||||||
|
manifestPlaceholders = [
|
||||||
|
serverHost : rootProject.ext.manifestPlaceholders.testServerHost,
|
||||||
|
isGooglePlay : 1,
|
||||||
|
isUploadLog : true,
|
||||||
|
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
|
]
|
||||||
|
}
|
||||||
|
google_online {
|
||||||
|
dimension 'packageApk'
|
||||||
|
manifestPlaceholders = [
|
||||||
|
serverHost : rootProject.ext.manifestPlaceholders.serverHost,
|
||||||
|
isGooglePlay : 1,
|
||||||
|
isUploadLog : true,
|
||||||
|
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
|
]
|
||||||
|
}
|
||||||
|
huawei_test {
|
||||||
|
dimension 'packageApk'
|
||||||
|
manifestPlaceholders = [
|
||||||
|
serverHost : rootProject.ext.manifestPlaceholders.testServerHost,
|
||||||
|
isGooglePlay : 2,
|
||||||
|
isUploadLog : true,
|
||||||
|
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
|
]
|
||||||
|
}
|
||||||
|
huawei_online {
|
||||||
|
dimension 'packageApk'
|
||||||
|
manifestPlaceholders = [
|
||||||
|
serverHost : rootProject.ext.manifestPlaceholders.serverHost,
|
||||||
|
isGooglePlay : 2,
|
||||||
|
isUploadLog : true,
|
||||||
|
isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -4,7 +4,7 @@ include ':FaceUnity'
|
|||||||
//include ':recognizer'//融云语音转文字模块
|
//include ':recognizer'//融云语音转文字模块
|
||||||
include ':Share'
|
include ':Share'
|
||||||
include ':pluginsForAnchor'
|
include ':pluginsForAnchor'
|
||||||
//include ':lib_huawei'
|
include ':lib_huawei'
|
||||||
include ':lib_google'
|
include ':lib_google'
|
||||||
include ':IAP6Helper'
|
include ':IAP6Helper'
|
||||||
include ':lib_faceunity'
|
include ':lib_faceunity'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
Loading…
Reference in New Issue
Block a user