GP-1106: Fixing issue with gradle string comparisons

This commit is contained in:
Ryan Kurtz 2021-09-01 07:37:58 -04:00
parent 86e579d910
commit 96683a8dce

View File

@ -31,7 +31,7 @@ project.ext.PLATFORMS = [
* Returns the local platform name.
*********************************************************************************/
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
ext.currentPlatformName = null
ext.currentPlatformName = findProperty("currentPlatformName")
ext.getCurrentPlatformName = {
if (currentPlatformName) {
@ -75,7 +75,7 @@ ext.getCurrentPlatformName = {
throw new GradleException("Unrecognized platform architecture: $arch" )
}
currentPlatformName = "${os}_${arch}"
currentPlatformName = "${os}_${arch}".toString() // convert GStringImpl to String so .equals() works as expected
println "OS: " + osJvm + (osJvm != osGradle ? " (gradle: " + osGradle + ")" : "")
println "Arch: " + archJvm + (archJvm != archGradle ? " (gradle: " + archGradle + ")" : "")