Merge pull request #5114 from timmutton/android-build-files

Android build files
This commit is contained in:
Markus Wick 2017-05-04 10:01:00 +02:00 committed by GitHub
commit 5849604625
3 changed files with 32 additions and 15 deletions

View File

@ -23,8 +23,7 @@ android {
// TODO This should be set to the Buildbot build number for release builds, and be "1" for debug builds. // TODO This should be set to the Buildbot build number for release builds, and be "1" for debug builds.
versionCode 13 versionCode 13
// TODO This should be set to the string currently provided by NativeLibrary.GetVersionString(). versionName "${getVersion()}"
versionName "0.13"
} }
signingConfigs { signingConfigs {
@ -69,16 +68,28 @@ android {
} }
} }
} }
applicationVariants.all { variant ->
variant.outputs.each { output ->
def name = output.outputFile.name.replace(variant.buildType.name, "${variant.versionName}")
name = name.replace("app", "dolphin")
output.outputFile = new File(output.outputFile.parent, name)
}
}
}
ext {
androidSupportVersion = '25.3.0'
} }
dependencies { dependencies {
compile 'com.android.support:support-v13:25.3.0' compile "com.android.support:support-v13:$androidSupportVersion"
compile 'com.android.support:cardview-v7:25.3.0' compile "com.android.support:cardview-v7:$androidSupportVersion"
compile 'com.android.support:recyclerview-v7:25.3.0' compile "com.android.support:recyclerview-v7:$androidSupportVersion"
compile 'com.android.support:design:25.3.0' compile "com.android.support:design:$androidSupportVersion"
// Android TV UI libraries. // Android TV UI libraries.
compile 'com.android.support:leanback-v17:25.3.0' compile "com.android.support:leanback-v17:$androidSupportVersion"
// For showing the banner as a circle a-la Material Design Guidelines // For showing the banner as a circle a-la Material Design Guidelines
compile 'de.hdodenhof:circleimageview:2.1.0' compile 'de.hdodenhof:circleimageview:2.1.0'
@ -89,3 +100,17 @@ dependencies {
// Allows FRP-style asynchronous operations in Android. // Allows FRP-style asynchronous operations in Android.
compile 'io.reactivex:rxandroid:1.2.1' compile 'io.reactivex:rxandroid:1.2.1'
} }
def getVersion() {
def versionNumber = '0.0'
try {
versionNumber = 'git describe --always --long'.execute([], project.rootDir).text
.trim()
.replaceAll(/(-0)?-[^-]+$/, "")
} catch (Exception e) {
logger.error('Cannot find git, defaulting to dummy version number')
}
return versionNumber
}

View File

@ -239,8 +239,5 @@
<string name="header_wiimote_general">General</string> <string name="header_wiimote_general">General</string>
<string name="header_controllers">Controllers</string> <string name="header_controllers">Controllers</string>
<!-- Package Names-->
<string name="application_id">org.dolphinemu.dolphinemu</string>
<string name="write_permission_needed">You need to allow write access to external storage for the emulator to work</string> <string name="write_permission_needed">You need to allow write access to external storage for the emulator to work</string>
</resources> </resources>

View File

@ -1,14 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
repositories { repositories {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.0' classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
} }
} }