bilibili添加gradle配置,处理okhttp类重复问题,指定使用固定的类

main
liuchunguang 2026-03-06 12:41:15 +08:00
parent 8f8bdf0a76
commit b3ba6cee4e
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,46 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
// okhttp3 使 Bilibili SDK
configurations.all {
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
**DEPS**}
android {
namespace "com.unity3d.player"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 580c54e36949bd04d81a6b56b841c1ca
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: