61 lines
1.6 KiB
Groovy
61 lines
1.6 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 25
|
|
buildToolsVersion "27.0.3"
|
|
|
|
defaultConfig {
|
|
applicationId "com.reicast.emulator"
|
|
minSdkVersion 9
|
|
targetSdkVersion 21
|
|
|
|
ndk {
|
|
moduleName "dc"
|
|
abiFilters 'armeabi-v7a', 'x86'
|
|
}
|
|
}
|
|
|
|
useLibrary 'org.apache.http.legacy'
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
}
|
|
}
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
path 'src/main/jni/Android.mk'
|
|
}
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
android.applicationVariants.all { v ->
|
|
if (v.buildType.name == "release") {
|
|
def hashtag = new ByteArrayOutputStream()
|
|
exec {
|
|
commandLine "git", "rev-parse", "HEAD"
|
|
standardOutput = hashtag
|
|
}
|
|
hashtag = hashtag.toString().trim()
|
|
v.outputs.each { output ->
|
|
output.outputFile = new File(output.outputFile.parent,
|
|
"reicast-android-" + hashtag.substring(0,7) + ".apk")
|
|
}
|
|
file('src/main/assets/build').text = hashtag
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.android.support:support-v4:25.3.1'
|
|
compile 'org.bouncycastle:bcprov-jdk16:1.46'
|
|
compile 'commons-io:commons-io:2.6'
|
|
compile 'org.apache.commons:commons-lang3:3.7'
|
|
compile ('com.googlecode.json-simple:json-simple:1.1.1') {
|
|
exclude module: 'junit'
|
|
}
|
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
|
}
|