68 lines
2.1 KiB
Groovy
68 lines
2.1 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
dependencies {
|
|
implementation project(':unityLibrary')
|
|
}
|
|
|
|
android {
|
|
namespace "**NAMESPACE**"
|
|
ndkPath "**NDKPATH**"
|
|
|
|
compileSdkVersion **APIVERSION**
|
|
buildToolsVersion '**BUILDTOOLS**'
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdkVersion **MINSDKVERSION**
|
|
targetSdkVersion **TARGETSDKVERSION**
|
|
applicationId '**APPLICATIONID**'
|
|
ndk {
|
|
abiFilters **ABIFILTERS**
|
|
}
|
|
versionCode **VERSIONCODE**
|
|
versionName '**VERSIONNAME**'
|
|
}
|
|
|
|
aaptOptions {
|
|
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
|
|
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
|
|
}**SIGN**
|
|
|
|
// ⭐ 修复 lintVitalAnalyzeRelease 构建失败:
|
|
// Release 构建时 AGP 会跑 lintVital 检查,其 ExtractAarTransform 在中文 Windows
|
|
// (系统编码 GBK) 下读取含中文的 manifest/资源时抛 MalformedInputException
|
|
// ("malformed input off : 75")。checkReleaseBuilds false 直接跳过 release 的
|
|
// lint 检查任务(Unity 游戏项目不需要 AGP 的 lint),abortOnError false 兜底。
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
abortOnError false
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
minifyEnabled **MINIFY_DEBUG**
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
|
|
jniDebuggable true
|
|
}
|
|
release {
|
|
minifyEnabled **MINIFY_RELEASE**
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
|
|
}
|
|
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
|
|
**BUILT_APK_LOCATION**
|
|
bundle {
|
|
language {
|
|
enableSplit = false
|
|
}
|
|
density {
|
|
enableSplit = false
|
|
}
|
|
abi {
|
|
enableSplit = true
|
|
}
|
|
}
|
|
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP** |