| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- import org.apache.tools.ant.taskdefs.condition.Os
- apply plugin: 'com.android.application'
- android {
- compileSdkVersion 30
- buildToolsVersion '30.0.2'
- aaptOptions {
- cruncherEnabled = false
- useNewCruncher = false
- }
- defaultConfig {
- // applicationId "com.aries.sgzj"
- applicationId PACKAGE_NAME
- minSdkVersion 16
- targetSdkVersion 29
- versionCode VERSION_CODE.toInteger()
- versionName VERSION_NAME.toString()
- multiDexEnabled true
- manifestPlaceholders = [MY_APP_NAME: MY_APP_NAME]
- // uroi_ad_sdk_url_scheme 替换为您应用的url_scheme ,当前主要用作埋点检测。
- // 建议:应用包名+"uroi_ad_sdk_scheme"
- manifestPlaceholders.put("APPLOG_SCHEME", "com.aries.sgzj_uroi_ad_sdk_url_scheme".toLowerCase())
- ndk {
- abiFilters 'armeabi-v7a'
- }
- lintOptions {
- checkReleaseBuilds false
- abortOnError false
- }
- externalNativeBuild {
- ndkBuild {
- if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
- // skip the NDK Build step if PROP_NDK_MODE is none
- targets 'cocos2djs'
- arguments 'NDK_TOOLCHAIN_VERSION=clang'
- def module_paths = [project.file("${System.getenv("COCOSCREATOR_HOME")}/resources/.editors/Creator/2.3.3/resources/cocos2d-x"),
- project.file("${System.getenv("COCOSCREATOR_HOME")}/resources/.editors/Creator/2.3.3/resources/cocos2d-x/cocos"),
- project.file("${System.getenv("COCOSCREATOR_HOME")}/resources/.editors/Creator/2.3.3/resources/cocos2d-x/external")]
- //def module_paths = [project.file("D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.3.3/resources/cocos2d-x"),
- //project.file("D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.3.3/resources/cocos2d-x/cocos"),
- // project.file("D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.3.3/resources/cocos2d-x/external")]
- if (Os.isFamily(Os.FAMILY_WINDOWS)) {
- arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
- } else {
- arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
- }
- arguments '-j' + Runtime.runtime.availableProcessors()
- abiFilters.addAll(PROP_APP_ABI.split(':').collect { it as String })
- }
- }
- }
- }
- sourceSets.main {
- java.srcDirs "../src", "src"
- res.srcDirs "../res", 'res'
- res.srcDirs += 'libs/topon_res'
- jniLibs.srcDirs "../libs", 'libs'
- manifest.srcFile "AndroidManifest.xml"
- }
- externalNativeBuild {
- ndkBuild {
- if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
- // skip the NDK Build step if PROP_NDK_MODE is none
- path "jni/Android.mk"
- }
- }
- }
- signingConfigs {
- release {
- storeFile file(new File('./keystore/android.keystore'))
- storePassword RELEASE_STORE_PASSWORD
- keyAlias RELEASE_KEY_ALIAS
- keyPassword RELEASE_KEY_PASSWORD
- }
- }
- buildTypes {
- release {
- signingConfig signingConfigs.release
- debuggable false
- jniDebuggable false
- renderscriptDebuggable false
- minifyEnabled false
- shrinkResources false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- if (project.hasProperty("RELEASE_STORE_FILE")) {
- signingConfig signingConfigs.release
- }
- externalNativeBuild {
- ndkBuild {
- arguments 'NDK_DEBUG=0'
- }
- }
- buildConfigField "String", "TF_CHANNEL", "${TF_CHANNEL}"
- buildConfigField "String", "JL_AID", "${JL_AID}"
- buildConfigField "String", "JL_CHANNEL", "${JL_CHANNEL}"
- buildConfigField "String", "KS_AID", "${KS_AID}"
- buildConfigField "String", "KS_ANAME", "${KS_ANAME}"
- buildConfigField "String", "KS_CHANNEL", "${KS_CHANNEL}"
- buildConfigField "String", "UM_AID", "${UM_AID}"
- buildConfigField "String", "UM_CHANNEL", "${UM_CHANNEL}"
- buildConfigField "String", "UM_SECRET", "${UM_SECRET}"
- buildConfigField "String", "WX_APP_ID", "${WX_APP_ID}"
- buildConfigField "String", "TOPON", "${TOPON}"
- buildConfigField "String", "APP_CONFIG_CODE", "${APP_CONFIG_CODE}"
- }
- debug {
- debuggable true
- jniDebuggable true
- renderscriptDebuggable true
- externalNativeBuild {
- ndkBuild {
- arguments 'NDK_DEBUG=1'
- }
- }
- buildConfigField "String", "TF_CHANNEL", "${TF_CHANNEL}"
- buildConfigField "String", "JL_AID", "${JL_AID}"
- buildConfigField "String", "JL_CHANNEL", "${JL_CHANNEL}"
- buildConfigField "String", "KS_AID", "${KS_AID}"
- buildConfigField "String", "KS_ANAME", "${KS_ANAME}"
- buildConfigField "String", "KS_CHANNEL", "${KS_CHANNEL}"
- buildConfigField "String", "UM_AID", "${UM_AID}"
- buildConfigField "String", "UM_CHANNEL", "${UM_CHANNEL}"
- buildConfigField "String", "UM_SECRET", "${UM_SECRET}"
- buildConfigField "String", "WX_APP_ID", "${WX_APP_ID}"
- buildConfigField "String", "TOPON", "${TOPON}"
- buildConfigField "String", "APP_CONFIG_CODE", "${APP_CONFIG_CODE}"
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- // repositories {
- // flatDir {
- // dirs 'libs'
- // }
- // }
- }
- android.applicationVariants.all { variant ->
- // delete previous files first
- delete "${buildDir}/intermediates/merged_assets/${variant.dirName}"
- variant.mergeAssets.doLast {
- def sourceDir = "${buildDir}/../../../../.."
- copy {
- from "${sourceDir}/res"
- into "${outputDir}/res"
- }
- copy {
- from "${sourceDir}/subpackages"
- into "${outputDir}/subpackages"
- }
- copy {
- from "${sourceDir}/src"
- into "${outputDir}/src"
- }
- copy {
- from "${sourceDir}/jsb-adapter"
- into "${outputDir}/jsb-adapter"
- }
- copy {
- from "${sourceDir}/main.js"
- from "${sourceDir}/project.json"
- into outputDir
- }
- }
- }
- def SUPPORT_VERSION = "27.1.1"
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar', '*.so'])
- implementation fileTree(dir: "${System.getenv("COCOSCREATOR_HOME")}/resources/.editors/Creator/2.3.3/resources/cocos2d-x/cocos/platform/android/java/libs", include: ['*.jar'])
- //implementation fileTree(dir: "D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.3.3/resources/cocos2d-x/cocos/platform/android/java/libs", include: ['*.jar'])
- implementation project(':libcocos2dx')
- // implementation(name: 'open_ad_sdk', ext: 'aar')
- implementation 'com.android.support:multidex:1.0.0'
- androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
- implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
- implementation 'com.squareup.okhttp3:okhttp:3.4.1'
- implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
- //implementation "com.android.support:appcompat-v7:${SUPPORT_VERSION}"
- implementation "com.android.support:support-annotations:${SUPPORT_VERSION}"
- //implementation "com.android.support:support-v4:${SUPPORT_VERSION}"
- implementation files('libs\\crashsdk-3.2.0.4.jar')
- implementation files('libs\\umeng-asms-v1.1.3.jar')
- implementation files('libs\\umeng-common-9.1.0.jar')
- implementation files('libs\\umeng-crash-v0.0.4.jar')
- implementation files('libs\\umeng-game-9.1.0+G.jar')
- implementation files('libs\\utdid4all-1.5.2-proguard.jar')
- implementation project(':push')
- implementation 'cn.thinkingdata.android:ThinkingAnalyticsSDK:2.5.6'
- //TopOn
- api fileTree(include: ['*.jar', '*.aar'], dir: 'libs/topon_lib')
- //noinspection GradleCompatible
- api 'com.android.support:appcompat-v7:28.0.0'
- //noinspection GradleCompatible
- api 'com.android.support:design:28.0.0'
- implementation files('libs/OpenInstall_v2.5.0.jar')
- implementation 'com.google.zxing:core:3.3.0'
- // api 'com.google.code.gson:gson:2.8.0'
- }
|