flycast/shell/android-studio/reicast/build.gradle

110 lines
2.8 KiB
Groovy
Raw Normal View History

2018-03-18 17:43:51 +00:00
apply plugin: 'com.android.application'
apply plugin: 'com.github.triplet.play'
2018-09-12 10:43:26 +00:00
def getBuildId = { ->
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 {
compileSdkVersion 25
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.reicast.emulator"
minSdkVersion 16
targetSdkVersion 25
2018-09-12 10:43:26 +00:00
versionCode getBuildId()
2018-07-14 15:40:17 +00:00
versionName getVersionName()
vectorDrawables.useSupportLibrary = true
2018-03-18 17:43:51 +00:00
ndk {
moduleName "dc"
2018-03-19 10:49:51 +00:00
abiFilters 'armeabi-v7a', 'x86'
moduleName "sexplay"
abiFilters 'armeabi-v7a', 'x86'
2018-03-18 17:43:51 +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 {
debug {
debuggable true
zipAlignEnabled true
}
2018-03-18 17:43:51 +00:00
release {
debuggable false
2018-03-18 17:43:51 +00:00
minifyEnabled false
zipAlignEnabled true
2018-03-18 17:43:51 +00:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
2018-03-18 17:43:51 +00:00
}
}
2018-03-18 17:43:51 +00:00
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
lintOptions {
abortOnError false
}
2018-03-18 17:43:51 +00:00
}
afterEvaluate {
android.applicationVariants.all { v ->
if (v.buildType.name == "release") {
2018-09-12 10:43:26 +00:00
def hashtag = getVersionHash()
v.outputs[0].outputFileName = "reicast-android-" + hashtag + ".apk"
}
}
}
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 {
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') {
exclude module: 'junit'
}
implementation fileTree(include: ['*.jar'], dir: 'libs')
}