2017-03-27 10:03:49 +00:00
|
|
|
plugins {
|
2017-03-31 08:56:30 +00:00
|
|
|
id 'com.gladed.androidgitversion' version '0.3.4'
|
2017-03-27 10:03:49 +00:00
|
|
|
}
|
2017-03-13 22:45:25 +00:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
2017-03-27 10:03:49 +00:00
|
|
|
androidGitVersion {
|
|
|
|
codeFormat = "MNPPBBBB"
|
|
|
|
format = "%tag%%-count%%-branch%%-dirty%"
|
|
|
|
prefix = "v" // Only tags beginning with v are considered.
|
|
|
|
}
|
|
|
|
|
2017-03-13 22:45:25 +00:00
|
|
|
android {
|
|
|
|
signingConfigs {
|
2017-03-16 12:13:30 +00:00
|
|
|
debug {
|
|
|
|
storeFile file("debug.keystore")
|
|
|
|
}
|
|
|
|
optimized {
|
|
|
|
storeFile file("debug.keystore")
|
|
|
|
}
|
2017-03-20 10:06:52 +00:00
|
|
|
|
|
|
|
// Set these in a system global (or project local, but not checked in) gradle.properties .
|
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
|
|
release {
|
|
|
|
storeFile file(RELEASE_STORE_FILE)
|
|
|
|
storePassword RELEASE_STORE_PASSWORD
|
|
|
|
keyAlias RELEASE_KEY_ALIAS
|
|
|
|
keyPassword RELEASE_KEY_PASSWORD
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
release {
|
|
|
|
// Can't build release builds without a key store.
|
2017-03-25 08:38:05 +00:00
|
|
|
println 'This build type should only be invoked from CI. Use Optimized builds instead.'
|
2017-03-20 10:06:52 +00:00
|
|
|
}
|
2017-03-13 22:45:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
compileSdkVersion 25
|
|
|
|
buildToolsVersion '25.0.0'
|
|
|
|
defaultConfig {
|
|
|
|
applicationId 'org.ppsspp.ppsspp'
|
2017-03-27 10:03:49 +00:00
|
|
|
if (androidGitVersion.name() != "unknown" && androidGitVersion.code() >= 14000000) {
|
|
|
|
// Start using automatic Android version numbers from version 1.4.
|
|
|
|
println "Overriding Android Version Name, Code: " + androidGitVersion.name() + " " + androidGitVersion.code();
|
|
|
|
versionName androidGitVersion.name()
|
|
|
|
versionCode androidGitVersion.code()
|
|
|
|
} else {
|
|
|
|
println "(not using these:) Android Version Name, Code: " + androidGitVersion.name() + " " + androidGitVersion.code();
|
|
|
|
}
|
|
|
|
|
2017-03-27 14:58:08 +00:00
|
|
|
new File("versionname.txt").write(androidGitVersion.name())
|
|
|
|
new File("versioncode.txt").write(androidGitVersion.code().toString())
|
|
|
|
|
2017-03-13 22:45:25 +00:00
|
|
|
minSdkVersion 9
|
|
|
|
targetSdkVersion 25
|
2017-03-23 09:47:58 +00:00
|
|
|
if (project.hasProperty("ANDROID_VERSION_CODE") && project.hasProperty("ANDROID_VERSION_NAME")) {
|
|
|
|
versionCode ANDROID_VERSION_CODE
|
|
|
|
versionName ANDROID_VERSION_NAME
|
|
|
|
}
|
2017-03-13 22:45:25 +00:00
|
|
|
ndk {
|
|
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
|
|
}
|
2017-03-16 12:13:30 +00:00
|
|
|
signingConfig signingConfigs.debug
|
2017-03-13 22:45:25 +00:00
|
|
|
}
|
|
|
|
buildTypes {
|
2017-03-16 12:13:30 +00:00
|
|
|
debug {
|
|
|
|
minifyEnabled = false
|
|
|
|
jniDebuggable true
|
|
|
|
signingConfig signingConfigs.debug
|
|
|
|
}
|
|
|
|
optimized {
|
|
|
|
// Debug signed but optimized.
|
2017-03-13 22:45:25 +00:00
|
|
|
minifyEnabled = false
|
2017-03-16 12:13:30 +00:00
|
|
|
signingConfig android.buildTypes.debug.signingConfig
|
2017-03-13 22:45:25 +00:00
|
|
|
}
|
2017-03-23 09:47:58 +00:00
|
|
|
release {
|
|
|
|
minifyEnabled = false
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
2017-03-13 22:45:25 +00:00
|
|
|
}
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path '../CMakeLists.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
|
|
res.srcDirs = ['res']
|
|
|
|
java.srcDirs = ['src']
|
|
|
|
aidl.srcDirs = ['src']
|
|
|
|
resources.srcDirs = ['src']
|
|
|
|
assets.srcDirs = [
|
2017-03-31 08:56:30 +00:00
|
|
|
'../assets',
|
2017-03-13 22:45:25 +00:00
|
|
|
]
|
|
|
|
jni.srcDirs = ['..']
|
|
|
|
}
|
2017-03-17 10:55:14 +00:00
|
|
|
gold {
|
|
|
|
res.srcDirs = ['gold/res']
|
|
|
|
}
|
2017-03-13 22:45:25 +00:00
|
|
|
}
|
|
|
|
productFlavors {
|
|
|
|
normal {
|
|
|
|
applicationId 'org.ppsspp.ppsspp'
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
// Available arguments listed at https://developer.android.com/ndk/guides/cmake.html
|
|
|
|
arguments '-DANDROID=true',
|
|
|
|
'-DANDROID_PLATFORM=android-15',
|
|
|
|
'-DANDROID_TOOLCHAIN=clang',
|
|
|
|
'-DANDROID_CPP_FEATURES=',
|
|
|
|
'-DANDROID_STL=gnustl_static',
|
|
|
|
'-DANDROID_ARM_NEON=TRUE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gold {
|
|
|
|
applicationId 'org.ppsspp.ppssppgold'
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
// Available arguments listed at https://developer.android.com/ndk/guides/cmake.html
|
|
|
|
arguments '-DANDROID=true',
|
|
|
|
'-DANDROID_PLATFORM=android-15',
|
|
|
|
'-DANDROID_TOOLCHAIN=clang',
|
|
|
|
'-DANDROID_CPP_FEATURES=',
|
|
|
|
'-DANDROID_STL=gnustl_static',
|
|
|
|
'-DANDROID_ARM_NEON=TRUE',
|
|
|
|
'-DGOLD=TRUE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
afterEvaluate {
|
|
|
|
android.sourceSets.main.assets.getSrcDirs().each { println it }
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
compile project(':com.bda.controller')
|
|
|
|
}
|