2018-03-18 17:43:51 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2018-07-08 21:24:12 +00:00
|
|
|
apply plugin: 'com.github.triplet.play'
|
|
|
|
|
2018-09-12 10:43:26 +00:00
|
|
|
def getBuildId = { ->
|
2018-07-14 17:29:16 +00:00
|
|
|
def build_id = System.getenv("TRAVIS_JOB_ID") ?: "8"
|
|
|
|
return Integer.parseInt( build_id )
|
2018-07-14 15:40:17 +00:00
|
|
|
}
|
|
|
|
|
2018-09-12 10:43:26 +00:00
|
|
|
def getVersionHash = { ->
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
return stdout.toString().trim()
|
|
|
|
}
|
|
|
|
|
2018-07-14 15:40:17 +00:00
|
|
|
def getVersionName = { ->
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
2018-08-02 21:59:47 +00:00
|
|
|
commandLine 'git', 'describe', '--tags', '--always'
|
2018-07-14 15:40:17 +00:00
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
return stdout.toString().trim()
|
|
|
|
}
|
2018-03-18 17:43:51 +00:00
|
|
|
|
|
|
|
android {
|
2018-11-28 20:04:00 +00:00
|
|
|
compileSdkVersion 26
|
2018-03-18 17:43:51 +00:00
|
|
|
buildToolsVersion "27.0.3"
|
|
|
|
|
|
|
|
defaultConfig {
|
2019-06-20 19:50:19 +00:00
|
|
|
applicationId "com.flycast.emulator"
|
2018-04-19 20:13:44 +00:00
|
|
|
minSdkVersion 16
|
2018-11-28 20:04:00 +00:00
|
|
|
targetSdkVersion 26
|
2018-09-12 10:43:26 +00:00
|
|
|
versionCode getBuildId()
|
2018-07-14 15:40:17 +00:00
|
|
|
versionName getVersionName()
|
2018-03-22 09:52:05 +00:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2018-03-18 17:43:51 +00:00
|
|
|
|
|
|
|
ndk {
|
|
|
|
moduleName "dc"
|
2019-07-10 07:57:08 +00:00
|
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
2018-03-18 17:43:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-08 21:24:12 +00:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
storeFile file("../reicast-beta-cd.jks")
|
|
|
|
storePassword "notasecret"
|
|
|
|
keyAlias "reicast-upload-key"
|
|
|
|
keyPassword "notasecret"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-18 17:43:51 +00:00
|
|
|
buildTypes {
|
2018-08-27 15:42:05 +00:00
|
|
|
debug {
|
|
|
|
debuggable true
|
2018-10-02 14:49:53 +00:00
|
|
|
minifyEnabled true
|
2018-08-27 15:42:05 +00:00
|
|
|
zipAlignEnabled true
|
2018-10-02 14:49:53 +00:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
2018-08-27 15:42:05 +00:00
|
|
|
}
|
2018-03-18 17:43:51 +00:00
|
|
|
release {
|
2018-08-27 15:42:05 +00:00
|
|
|
debuggable false
|
2018-10-02 09:02:53 +00:00
|
|
|
minifyEnabled true
|
2018-08-19 01:28:44 +00:00
|
|
|
zipAlignEnabled true
|
2018-03-18 17:43:51 +00:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
2018-07-08 21:24:12 +00:00
|
|
|
signingConfig signingConfigs.release
|
2018-03-18 17:43:51 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-08 21:24:12 +00:00
|
|
|
|
2018-10-22 15:45:19 +00:00
|
|
|
flavorDimensions "systemtype"
|
|
|
|
productFlavors {
|
|
|
|
dreamcast {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-18 17:43:51 +00:00
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
path 'src/main/jni/Android.mk'
|
|
|
|
}
|
|
|
|
}
|
2018-07-08 21:24:12 +00:00
|
|
|
|
2018-03-27 08:36:39 +00:00
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
}
|
2018-03-18 17:43:51 +00:00
|
|
|
}
|
|
|
|
|
2018-03-24 18:01:29 +00:00
|
|
|
afterEvaluate {
|
|
|
|
android.applicationVariants.all { v ->
|
|
|
|
if (v.buildType.name == "release") {
|
2018-09-12 10:43:26 +00:00
|
|
|
def hashtag = getVersionHash()
|
2019-06-20 19:50:19 +00:00
|
|
|
v.outputs[0].outputFileName = "flycast-android-" + hashtag + ".apk"
|
2018-03-24 18:01:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-08 21:24:12 +00:00
|
|
|
play {
|
|
|
|
track = 'beta'
|
|
|
|
serviceAccountEmail = 'reicast-beta-cd@api-7801059239587459896-777757.iam.gserviceaccount.com'
|
|
|
|
pk12File = file('../reicast-beta-cd.p12')
|
|
|
|
}
|
|
|
|
|
2018-03-18 17:43:51 +00:00
|
|
|
dependencies {
|
2018-07-20 19:01:48 +00:00
|
|
|
implementation 'com.android.support:support-v4:25.4.0'
|
|
|
|
implementation 'com.android.support:appcompat-v7:25.4.0'
|
|
|
|
implementation 'com.android.support:design:25.4.0'
|
|
|
|
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
|
|
|
|
implementation 'org.bouncycastle:bcprov-jdk16:1.46'
|
|
|
|
implementation 'commons-io:commons-io:2.6'
|
|
|
|
implementation 'org.apache.commons:commons-lang3:3.7'
|
|
|
|
implementation ('com.googlecode.json-simple:json-simple:1.1.1') {
|
2018-03-24 18:01:29 +00:00
|
|
|
exclude module: 'junit'
|
|
|
|
}
|
2018-07-20 19:01:48 +00:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2018-04-02 16:40:56 +00:00
|
|
|
}
|