Adds in missing changes to gradle file and updates dynarmic

This commit is contained in:
James Rowe 2019-07-22 09:24:48 -06:00 committed by xperia64
parent 3961943829
commit af61478822

View File

@ -1,8 +1,15 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
/**
* Use the number of seconds/10 since Jan 1 2016 as the versionCode.
* This lets us upload a new build at most every 10 seconds for the
* next 680 years.
*/
def autoVersion = (int)(((new Date().getTime()/1000) - 1451606400) / 10)
def buildType
android { android {
compileSdkVersion 26 compileSdkVersion 28
buildToolsVersion '28.0.3'
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
@ -13,34 +20,52 @@ android {
// This is important as it will run lint but not abort on error // This is important as it will run lint but not abort on error
// Lint has some overly obnoxious "errors" that should really be warnings // Lint has some overly obnoxious "errors" that should really be warnings
abortOnError false abortOnError false
//Uncomment disable lines for test builds...
//disable 'MissingTranslation'bin
//disable 'ExtraTranslation'
} }
defaultConfig { defaultConfig {
applicationId "org.citra_emu" // TODO If this is ever modified, change application_id in strings.xml
applicationId "org.citra.citra_android"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 26 targetSdkVersion 28
versionCode autoVersion
versionCode(getBuildVersionCode())
versionName "${getVersion()}"
} }
signingConfigs { signingConfigs {
release { //release {
if (project.hasProperty('keystore')) { // storeFile file('')
storeFile file(project.property('keystore')) // storePassword System.getenv('ANDROID_KEYPASS')
storePassword project.property('storepass') // keyAlias = 'key0'
keyAlias project.property('keyalias') // keyPassword System.getenv('ANDROID_KEYPASS')
keyPassword project.property('keypass') //}
} }
}
applicationVariants.all { variant ->
buildType = variant.buildType.name // sets the current build type
} }
// Define build types, which are orthogonal to product flavors. // Define build types, which are orthogonal to product flavors.
buildTypes { buildTypes {
// Signed by release key, allowing for upload to Play Store. // Signed by release key, allowing for upload to Play Store.
release { release {
signingConfig signingConfigs.release signingConfig signingConfigs.debug
}
// builds a release build that doesn't need signing
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
relWithDebInfo {
initWith release
applicationIdSuffix ".debug"
versionNameSuffix '-debug'
signingConfig signingConfigs.debug
minifyEnabled false
testCoverageEnabled false
debuggable true
jniDebuggable true
} }
// Signed by debug key disallowing distribution on Play Store. // Signed by debug key disallowing distribution on Play Store.
@ -49,13 +74,14 @@ android {
// TODO If this is ever modified, change application_id in debug/strings.xml // TODO If this is ever modified, change application_id in debug/strings.xml
applicationIdSuffix ".debug" applicationIdSuffix ".debug"
versionNameSuffix '-debug' versionNameSuffix '-debug'
debuggable true
jniDebuggable true jniDebuggable true
} }
} }
externalNativeBuild { externalNativeBuild {
cmake { cmake {
version getCmakeVersion() version "3.10.2"
path "../../../CMakeLists.txt" path "../../../CMakeLists.txt"
} }
} }
@ -65,20 +91,17 @@ android {
cmake { cmake {
arguments "-DENABLE_QT=0", // Don't use QT arguments "-DENABLE_QT=0", // Don't use QT
"-DENABLE_SDL2=0", // Don't use SDL "-DENABLE_SDL2=0", // Don't use SDL
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work "-DENABLE_WEB_SERVICE=0", // Don't use telemetry
"-DENABLE_CUBEB=0", "-DANDROID_ARM_NEON=true" // cryptopp requires Neon to work
"-DANDROID_STL=c++_shared"
abiFilters "arm64-v8a" abiFilters "arm64-v8a" //, "x86"
targets "citra-android"
} }
} }
} }
} }
ext { ext {
androidSupportVersion = '26.1.0' androidSupportVersion = '28.0.0'
} }
dependencies { dependencies {
@ -90,51 +113,15 @@ dependencies {
// Android TV UI libraries. // Android TV UI libraries.
implementation "com.android.support:leanback-v17:$androidSupportVersion" implementation "com.android.support:leanback-v17:$androidSupportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.0' // For showing the banner as a circle a-la Material Design Guidelines
implementation 'de.hdodenhof:circleimageview:2.1.0'
testImplementation "com.android.support.test:runner:1.0.2" // For loading huge screenshots from the disk.
androidTestImplementation "com.android.support.test:runner:1.0.1" implementation 'com.squareup.picasso:picasso:2.5.2'
}
// Allows FRP-style asynchronous operations in Android.
def getVersion() { implementation 'io.reactivex:rxandroid:1.2.1'
def versionNumber = '0.0' implementation 'com.nononsenseapps:filepicker:4.1.0'
implementation 'org.ini4j:ini4j:0.5.4'
try { implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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
}
def getBuildVersionCode() {
try {
def versionNumber = 'git rev-list --first-parent --count HEAD'.execute([], project.rootDir).text
.trim()
return Integer.valueOf(versionNumber)
} catch (Exception e) {
logger.error('Cannot find git, defaulting to dummy version number')
}
return 0
}
def getCmakeVersion() {
try {
// Tokenized form of the output will be - ["cmake", "version", "M.m.p-rcx"], the version number
// will be at index 2
def version_string = 'cmake -version'.execute([], project.rootDir).text
.trim().tokenize()[2]
return version_string
}
catch(Exception e) {
logger.error('Cannot find Cmake, using default Cmake')
}
return null
} }