| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- apply plugin: 'com.android.application'
- apply plugin: 'com.loveota.lbsdk'
- apply from: project(':lebian').file('lebian_app.gradle')
- apply from: '../build_cust.gradle'
- android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
- defaultConfig {
- applicationId ro.applicationId
- minSdkVersion 21
- targetSdkVersion 28
- versionCode ro.versionCode
- versionName ro.versionName
- ndk {
- //注意这个需要根据集成游戏支持的架构配置,配置成和你们游戏一样
- abiFilters 'armeabi-v7a'
- }
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- signingConfigs {
- release {
- storeFile file(ro.keyFile)
- keyAlias ro.keyAlias
- keyPassword ro.keyPassword
- storePassword ro.storePassword
- v2SigningEnabled false
- }
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- signingConfig signingConfigs.release
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- }
- dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar"])
- implementation project(":yunMain")
- }
- tasks.whenTaskAdded { task ->
- if (task.name.equalsIgnoreCase("assembleRelease")) {
- task.doLast {
- android.applicationVariants.all { variant ->
- // 如果是正式版打包
- if (variant.name.equalsIgnoreCase("release")) {
- File outputPath = new File("${ro.apkDir}")
- if (!outputPath.exists()) {
- mkdir(outputPath)
- }
- // 拷贝apk文件
- copy {
- from variant.outputs[0].outputFile
- into outputPath
- // 重命名导出名称
- rename {
- "${ro.apkName}"
- }
- }
- }
- }
- }
- }
- }
|