2015-04-30 16:15:10 -06:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 21
|
2015-05-06 18:12:58 -06:00
|
|
|
buildToolsVersion "20.0.0"
|
2015-04-30 16:15:10 -06:00
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
// This is important as it will run lint but not abort on error
|
|
|
|
// Lint has some overly obnoxious "errors" that should really be warnings
|
|
|
|
abortOnError false
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.dolphinemu.dolphinemu"
|
|
|
|
minSdkVersion 18
|
|
|
|
targetSdkVersion 21
|
|
|
|
versionCode 13
|
|
|
|
versionName "0.13"
|
|
|
|
}
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
if (project.hasProperty('keystore')) {
|
|
|
|
storeFile file(project.property('keystore'))
|
|
|
|
storePassword project.property('storepass')
|
|
|
|
keyAlias project.property('keyalias')
|
|
|
|
keyPassword project.property('keypass')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
// Signed by release key, allowing for upload to Play Store.
|
|
|
|
release {
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
|
|
|
|
|
|
|
// Signed by debug key disallowing distribution on Play Store.
|
|
|
|
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
|
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
versionNameSuffix '-debug'
|
|
|
|
jniDebuggable true
|
2015-05-18 18:22:01 -06:00
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
compileTask -> compileTask.dependsOn(compileNative)
|
|
|
|
}
|
2015-04-30 16:15:10 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
2015-05-06 18:12:58 -06:00
|
|
|
compile 'com.android.support:support-v4:22.1.1'
|
|
|
|
compile 'com.android.support:support-v13:22.0.0'
|
|
|
|
compile 'com.android.support:cardview-v7:21.0.3'
|
|
|
|
compile 'com.android.support:recyclerview-v7:21.0.3'
|
|
|
|
|
|
|
|
// For showing the banner as a circle a-la Material Design Guidelines
|
|
|
|
compile 'de.hdodenhof:circleimageview:1.2.2'
|
|
|
|
|
|
|
|
// For loading huge screenshots from the disk.
|
2015-05-08 17:54:56 -06:00
|
|
|
compile 'com.squareup.picasso:picasso:2.5.2'
|
2015-04-30 16:15:10 -06:00
|
|
|
}
|
2015-05-18 18:22:01 -06:00
|
|
|
|
|
|
|
task setupCMake(type: Exec) {
|
|
|
|
// Check if a build properties file exists.
|
|
|
|
def propsFile = rootProject.file("build.properties")
|
|
|
|
|
|
|
|
// If it does, call CMake.
|
|
|
|
if (propsFile.canRead()) {
|
|
|
|
// Read the properties file's contents.
|
|
|
|
def buildProperties = new Properties()
|
|
|
|
buildProperties.load(new FileInputStream(propsFile))
|
|
|
|
|
|
|
|
mkdir('build/' + buildProperties.abi)
|
|
|
|
workingDir 'build/' + buildProperties.abi
|
|
|
|
|
|
|
|
executable 'cmake'
|
|
|
|
|
|
|
|
args "-DANDROID=true",
|
|
|
|
"-DANDROID_NATIVE_API_LEVEL=android-18",
|
|
|
|
"-DCMAKE_TOOLCHAIN_FILE=../../../android.toolchain.cmake",
|
|
|
|
"../../../../..",
|
|
|
|
"-DGIT_EXECUTABLE=" + buildProperties.gitPath,
|
|
|
|
"-DANDROID_NDK=" + buildProperties.ndkPath,
|
|
|
|
"-DANDROID_TOOLCHAIN_NAME=" + buildProperties.toolchain,
|
|
|
|
"-DANDROID_ABI=" + buildProperties.abi
|
|
|
|
} else {
|
|
|
|
executable 'echo'
|
|
|
|
args 'No build.properties found; skipping CMake.'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task compileNative(type: Exec, dependsOn: 'setupCMake') {
|
|
|
|
// Check if a build properties file exists.
|
|
|
|
def propsFile = rootProject.file("build.properties")
|
|
|
|
|
|
|
|
// If it does, call make.
|
|
|
|
if (propsFile.canRead()) {
|
|
|
|
// Read the properties file's contents.
|
|
|
|
def buildProperties = new Properties()
|
|
|
|
buildProperties.load(new FileInputStream(propsFile))
|
|
|
|
|
|
|
|
workingDir 'build/' + buildProperties.abi
|
|
|
|
|
|
|
|
executable 'make'
|
|
|
|
|
|
|
|
args buildProperties.makeArgs
|
|
|
|
} else {
|
|
|
|
executable 'echo'
|
|
|
|
args 'No build.properties found; skipping native build.'
|
|
|
|
}
|
|
|
|
}
|