axmol/tests/lua-tests/project/proj.android-studio/app/build.gradle

96 lines
2.5 KiB
Groovy
Raw Normal View History

2015-05-15 16:37:43 +08:00
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "org.cocos2dx.lua_tests"
minSdkVersion 10
targetSdkVersion 22
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
targets 'lua_tests'
arguments 'NDK_MODULE_PATH=../../../../..:../../../../../cocos:../../../../../external'
arguments '-j' + Runtime.runtime.availableProcessors()
abiFilters 'armeabi'
}
}
2015-05-15 16:37:43 +08:00
}
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
manifest.srcFile "AndroidManifest.xml"
}
externalNativeBuild {
ndkBuild {
path "jni/Android.mk"
}
2015-05-15 16:37:43 +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'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
}
2015-05-15 16:37:43 +08:00
}
}
}
android.applicationVariants.all { variant ->
def copyAssets = task("${variant.dirName}copyAssets", type: Copy) {
// delete previous files first
delete "${buildDir}/intermediates/assets/${variant.dirName}"
copy {
from "${buildDir}/../../../../res"
into "${buildDir}/intermediates/assets/${variant.dirName}/res"
}
copy {
from "${buildDir}/../../../../src"
into "${buildDir}/intermediates/assets/${variant.dirName}/src"
}
copy {
from("${buildDir}/../../../../../cpp-tests/Resources") {
exclude "**/*.gz"
}
into "${buildDir}/intermediates/assets/${variant.dirName}/res"
}
copy {
from "${buildDir}/../../../../../../cocos/scripting/lua-bindings/script"
into "${buildDir}/intermediates/assets/${variant.dirName}/src/cocos"
}
}
variant.mergeAssets.finalizedBy copyAssets
}
2015-05-15 16:37:43 +08:00
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libcocos2dx')
}