mirror of
https://github.com/libretro/Play-.git
synced 2024-12-12 19:22:30 +00:00
110 lines
2.2 KiB
Groovy
110 lines
2.2 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:2.2.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 '24.0.3'
|
|
|
|
defaultConfig {
|
|
versionCode 36
|
|
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 "PlayCore"
|
|
}
|
|
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
|
|
}
|
|
release {
|
|
proguardFile getDefaultProguardFile('proguard-android.txt')
|
|
if(project.ext.signingEnabled) {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
}
|
|
|
|
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'
|
|
}
|
|
}
|
|
}
|