apply plugin: 'com.androID.application'androID { compileSdkVersion 22 buildToolsversion "22.0.1" defaultConfig { applicationID "org.cocos2dx.dobiParkour" minSdkVersion 14 targetSdkVersion 22 versionCode 1 versionname "1.0" // dex突破65535的限制 multIDexEnabled true // 默认渠道 manifestPlaceholders = [CHANNEL_VALUE: "Youmi"] } signingConfigs { release { } } buildTypes { deBUG{ } release { // 不显示Log buildConfigFIEld "boolean","LOG_DEBUG","false" MinifyEnabled false zipAlignEnabled true // 移除无用的resource文件 shrinkResources true proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro' signingConfig signingConfigs.release applicationVariants.all { variant -> variant.outputs.each { output -> def outputfile = output.outputfile if (outputfile != null && outputfile.name.endsWith('.apk')) { // 输出apk名称为dobi_v1.0_wandoujia.apk def filename = "dobiParkour_${variant.productFlavors[0].name}.apk" output.outputfile = new file(outputfile.parent,filename) } } } } } sourceSets { main { //打包.so库 jnilibs.srcDirs = ['libs'] //打包cocos2dx的resource资源 assets.srcDirs= ['assets'] } } // 多渠道打包 productFlavors { Youmi {} Xindian {} Saile {} Youyoucun {} Kuhua {} Sikai {} damengshikong {} jimeichuanmei {} Dianle {} Manleyou {} Gude {} } productFlavors.all { flavor -> flavor.manifestPlaceholders = [CHANNEL_VALUE: name] }}dependencIEs { compile filetree(dir: 'libs',include: ['*.jar','.so']) compile project(':libcocos2dx') compile files('libs/alipaysdk.jar') compile files('libs/alipaysecsdk.jar') compile files('libs/alipayutdID.jar') compile files('libs/androID-support-v4.jar') compile files('libs/BmobPay_V1.0.2.jar') compile files('libs/EAccount_SDK_AndroID_V3.0.9_build201509091117.jar') compile files('libs/fastJson-1.2.5.jar') compile files('libs/MobLogCollector.jar') compile files('libs/MobTools.jar') compile files('libs/open_sdk_r5509.jar') compile files('libs/ShareSDK-Core-2.6.3.jar') compile files('libs/ShareSDK-QQ-2.6.3.jar') compile files('libs/ShareSDK-QZone-2.6.3.jar') compile files('libs/ShareSDK-SinaWeibo-2.6.3.jar') compile files('libs/ShareSDK-Wechat-2.6.3.jar') compile files('libs/ShareSDK-Wechat-Core-2.6.3.jar') compile files('libs/ShareSDK-Wechat-Moments-2.6.3.jar') compile files('libs/volley.jar')}
以上写法包含了多渠道打包的方法以及打包.so库和cocos2dx中resources的方法。
总结以上是内存溢出为你收集整理的cocos2dx工程部署到android-studio中,build.gradle的写法全部内容,希望文章能够帮你解决cocos2dx工程部署到android-studio中,build.gradle的写法所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)