Browse Source

Gradle: don't use a UNIX shell to read the dav1d version

We can use the gradle/java file classes.
merge-requests/1636/merge
Steve Lhomme 1 year ago
parent
commit
dcf5238e92
  1. 16
      application/vlc-android/build.gradle

16
application/vlc-android/build.gradle

@ -267,15 +267,17 @@ def revision() {
}
def dav1dVersion() {
def code = new ByteArrayOutputStream()
if (file("../../libvlcjni/vlc/contrib/src/dav1d/rules.mak").exists()) {
exec {
commandLine 'bash', '-c', 'grep "DAV1D_VERSION := " ../../libvlcjni/vlc/contrib/src/dav1d/rules.mak | cut -d = -f2'
standardOutput = code
def code = "0.0.0"
File dav1dContribFile = file('../../libvlcjni/vlc/contrib/src/dav1d/rules.mak')
if (dav1dContribFile.exists()) {
dav1dContribFile.readLines().each {
if (it.contains('DAV1D_VERSION := ')) {
code = it.replaceAll("DAV1D_VERSION := ", "")
return
}
}
return code.toString().replaceAll(" ", "")
}
return "0.0.0"
return code
}
/**

Loading…
Cancel
Save