| buildscript { |
| repositories { |
| maven { url '../../../../../out/repo' } |
| } |
| dependencies { |
| classpath 'com.android.tools.build:gradle:0.12.2' |
| } |
| } |
| apply plugin: 'com.android.application' |
| |
| android { |
| compileSdkVersion 19 |
| buildToolsVersion '19.1.0' |
| |
| defaultConfig { |
| ndk { |
| moduleName "sanangeles" |
| cFlags "-DANDROID_NDK -DDISABLE_IMPORTGL" |
| ldLibs "GLESv1_CM", "dl", "log" |
| stl "stlport_static" |
| } |
| |
| // This actual the app version code. Giving ourselves 1,000,000 values |
| versionCode = 123 |
| |
| } |
| |
| buildTypes.debug.jniDebugBuild true |
| |
| productFlavors { |
| x86 { |
| ndk { |
| abiFilter "x86" |
| } |
| |
| // this is the flavor part of the version code. |
| // It must be higher than the arm one for devices supporting |
| // both, as x86 is preferred. |
| versionCode = 3 |
| } |
| arm { |
| ndk { |
| abiFilter "armeabi-v7a" |
| } |
| versionCode = 2 |
| } |
| mips { |
| ndk { |
| abiFilter "mips" |
| } |
| versionCode = 1 |
| } |
| fat { |
| // fat binary, lowest version code to be |
| // the last option |
| versionCode = 0 |
| } |
| } |
| |
| // make per-variant version code |
| applicationVariants.all { variant -> |
| // get the single flavor |
| def flavorVersion = variant.productFlavors.get(0).versionCode |
| |
| // set the composite code |
| variant.mergedFlavor.versionCode = flavorVersion * 1000000 + defaultConfig.versionCode |
| } |
| } |