Check for macOS Catalina and use appropriate tools

Since RenderScript can no longer be compiled on macOS Catalina
because Catalina cannot run 32bit binaries and Google failed
to provide a 64bit compiler in time. Now, as if that wasn't
bad enough, the new build tools that provide a 64bit compiler
don't work on any other system than macOS unfortunately.

For details on the issue see:
https://issuetracker.google.com/issues/142590626
This commit is contained in:
Markus Fisch
2020-02-20 15:08:06 +01:00
parent 346529469c
commit 3237467503
2 changed files with 23 additions and 6 deletions
+22 -5
View File
@@ -1,9 +1,26 @@
buildscript {
ext.kotlin_version = '1.3.61'
ext.tools_version = '3.5.3'
ext.build_tools_version = '28.0.3'
ext.sdk_version = 29
ext.support_version = '25.3.1'
// Since RenderScript can no longer be compiled on macOS Catalina
// because Catalina cannot run 32bit binaries and Google failed
// to provide a 64bit compiler in time. Now, as if that wasn't
// bad enough, the new build tools that provide a 64bit compiler
// don't work on any other system than macOS unfortunately.
def isCatalina = {
if (System.properties['os.name'] == 'Mac OS X') {
def numbers = System.properties['os.version'].split('\\.')
if (numbers.length > 1) {
return numbers[1].toInteger() >= 15
}
}
return false
}()
ext {
kotlin_version = '1.3.61'
tools_version = isCatalina ? '3.6.0-rc02' : '3.5.3'
build_tools_version = isCatalina ? '29.0.3' : '28.0.3'
sdk_version = 29
support_version = '25.3.1'
}
repositories {
google()
+1 -1
View File
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip