mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Android: use project directory path when parsing manifest
This commit is contained in:
parent
a8390477b8
commit
67c1bf33ba
@ -149,7 +149,7 @@ if(dynamicFeatures.exists()) {
|
|||||||
apply from: "dynamic_features.gradle"
|
apply from: "dynamic_features.gradle"
|
||||||
}
|
}
|
||||||
|
|
||||||
static int getPlayStoreVersionCode() {
|
int getPlayStoreVersionCode() {
|
||||||
def baseVersion = getManifestAttribute("versionCode").toInteger()
|
def baseVersion = getManifestAttribute("versionCode").toInteger()
|
||||||
def baseTime = 1609632000
|
def baseTime = 1609632000
|
||||||
def halfWeek = 302400
|
def halfWeek = 302400
|
||||||
@ -158,13 +158,13 @@ static int getPlayStoreVersionCode() {
|
|||||||
return baseVersion + increment
|
return baseVersion + increment
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getPlayStoreVersionName() {
|
String getPlayStoreVersionName() {
|
||||||
def versionName = getManifestAttribute("versionName")
|
def versionName = getManifestAttribute("versionName")
|
||||||
return "$versionName (${new Date().format("yyyy-MM-dd")})"
|
return "$versionName (${new Date().format("yyyy-MM-dd")})"
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getManifestAttribute(String attribute) {
|
String getManifestAttribute(String attribute) {
|
||||||
def manifest = new XmlParser().parse("AndroidManifest.xml")
|
def manifest = new XmlParser().parse("${project.projectDir}/AndroidManifest.xml")
|
||||||
return manifest.attributes().find {
|
return manifest.attributes().find {
|
||||||
((String) it.key).contains(attribute)
|
((String) it.key).contains(attribute)
|
||||||
}.value
|
}.value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user