mirror of
https://github.com/libretro/Play-.git
synced 2024-12-11 18:54:11 +00:00
112 lines
2.4 KiB
Groovy
112 lines
2.4 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
|
}
|
|
}
|
|
|
|
project.ext {
|
|
keyStorePropFile = rootProject.file('keystore.properties')
|
|
signingEnabled = keyStorePropFile.exists()
|
|
}
|
|
|
|
project.afterEvaluate {
|
|
preBuild.dependsOn 'copyPatchFile'
|
|
|
|
def configName = 'release'
|
|
if(project.ext.signingEnabled && android.signingConfigs.hasProperty(configName)) {
|
|
def props = new Properties()
|
|
props.load(new FileInputStream(project.ext.keyStorePropFile))
|
|
android.signingConfigs[configName].storeFile = file(props['storeFile'])
|
|
android.signingConfigs[configName].storePassword = props['storePassword']
|
|
android.signingConfigs[configName].keyAlias = props['keyAlias']
|
|
android.signingConfigs[configName].keyPassword = props['keyPassword']
|
|
}
|
|
}
|
|
|
|
android {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
compileSdkVersion 'android-24'
|
|
buildToolsVersion '25.0.0'
|
|
|
|
defaultConfig {
|
|
versionCode 39
|
|
versionName '0.30'
|
|
minSdkVersion 19
|
|
targetSdkVersion 24
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments "-DANDROID_ARM_NEON=TRUE", "-DANDROID_TOOLCHAIN=clang",
|
|
"-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_STL=c++_static"
|
|
cppFlags "-frtti"
|
|
targets "Play"
|
|
}
|
|
ndk {
|
|
abiFilters 'armeabi-v7a', 'x86', 'x86_64', 'arm64-v8a'
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.android.support:appcompat-v7:23.3.0'
|
|
compile 'org.apache.commons:commons-lang3:3.4'
|
|
compile 'commons-io:commons-io:2.5'
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
storeFile file('store.keystore')
|
|
storePassword ''
|
|
keyAlias ''
|
|
keyPassword ''
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
debuggable true
|
|
jniDebuggable true
|
|
buildConfigField "java.util.Date", "buildTime", "new java.util.Date(" + System.currentTimeMillis() + "L)"
|
|
}
|
|
release {
|
|
proguardFile getDefaultProguardFile('proguard-android.txt')
|
|
if(project.ext.signingEnabled) {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
buildConfigField "java.util.Date", "buildTime", "new java.util.Date(" + System.currentTimeMillis() + "L)"
|
|
}
|
|
}
|
|
|
|
packagingOptions {
|
|
exclude 'META-INF/LICENSE.txt'
|
|
exclude 'META-INF/NOTICE.txt'
|
|
}
|
|
|
|
task copyPatchFile(type: Copy) {
|
|
from '../patches.xml'
|
|
into 'src/main/assets'
|
|
}
|
|
|
|
sourceSets.main {
|
|
java.srcDirs = [ '../Source/ui_android/java' ]
|
|
jni.srcDirs = []
|
|
jniLibs.srcDir 'src/main/libs'
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path '../build_cmake/CMakeLists.txt'
|
|
}
|
|
}
|
|
}
|