2015-05-15 16:37:43 +08:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 22
|
|
|
|
buildToolsVersion "22.0.1"
|
|
|
|
|
|
|
|
defaultConfig {
|
2015-05-21 18:27:30 +08:00
|
|
|
applicationId "org.cocos2dx.hellocpp"
|
2015-05-15 16:37:43 +08:00
|
|
|
minSdkVersion 10
|
|
|
|
targetSdkVersion 22
|
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
2017-02-20 11:14:36 +08:00
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
targets 'MyGame'
|
|
|
|
arguments 'NDK_MODULE_PATH=../../../..:../../../../cocos:../../../../external'
|
|
|
|
arguments '-j' + Runtime.runtime.availableProcessors()
|
|
|
|
abiFilters 'x86', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
|
|
|
|
}
|
|
|
|
}
|
2015-05-15 16:37:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets.main {
|
|
|
|
java.srcDir "src"
|
|
|
|
res.srcDir "res"
|
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
|
|
|
assets.srcDir "assets"
|
|
|
|
}
|
|
|
|
|
2017-02-20 11:14:36 +08:00
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
path "jni/Android.mk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-22 15:52:41 +08:00
|
|
|
signingConfigs {
|
|
|
|
|
|
|
|
release {
|
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
|
|
storeFile file(RELEASE_STORE_FILE)
|
|
|
|
storePassword RELEASE_STORE_PASSWORD
|
|
|
|
keyAlias RELEASE_KEY_ALIAS
|
|
|
|
keyPassword RELEASE_KEY_PASSWORD
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-15 16:37:43 +08:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2015-05-22 15:52:41 +08:00
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
2015-05-15 16:37:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
compile project(':libcocos2dx')
|
|
|
|
}
|
2015-12-22 14:54:09 +08:00
|
|
|
|
|
|
|
task cleanAssets(type: Delete) {
|
|
|
|
delete 'assets'
|
|
|
|
}
|
|
|
|
task copyAssets(type: Copy) {
|
|
|
|
from '../../Resources'
|
|
|
|
into 'assets'
|
|
|
|
}
|
|
|
|
|
|
|
|
clean.dependsOn cleanAssets
|
|
|
|
preBuild.dependsOn copyAssets
|