提交 9575b5b8 authored 作者: caoyongfeng's avatar caoyongfeng

android 依赖完善

上级 f3bcb524
// 应用本地依赖配置
//apply from: 'local-dependencies.gradle'
buildscript { buildscript {
repositories { repositories {
google() google()
...@@ -9,6 +12,21 @@ buildscript { ...@@ -9,6 +12,21 @@ buildscript {
} }
} }
//// 配置Gradle解决AAR-in-AAR问题
//allprojects {
// configurations.all {
// // 允许本地AAR作为库文件
// resolutionStrategy.dependencySubstitution.all { DependencySubstitution dependency ->
// if (dependency.requested instanceof ModuleComponentSelector) {
// def module = dependency.requested as ModuleComponentSelector
// if (module.group == 'com.arthenica' && module.module == 'ffmpeg-kit-https') {
// dependency.useTarget(files(rootProject.ext.ffmpegDependency).singleFile)
// }
// }
// }
// }
//}
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
......
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
\ No newline at end of file # ?????AAR??
android.ignoreAarMetadataCheck=true
\ No newline at end of file
// 本地依赖声明
ext.ffmpegDependency = files('libs/ffmpeg-kit-https-5.1.aar')
// 对所有模块应用依赖
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
dependencies {
implementation rootProject.ext.ffmpegDependency
}
}
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论