diff --git a/src/main/groovy/com/moowork/gradle/node/util/PlatformHelper.groovy b/src/main/groovy/com/moowork/gradle/node/util/PlatformHelper.groovy index 981ae12..fc7bf5a 100644 --- a/src/main/groovy/com/moowork/gradle/node/util/PlatformHelper.groovy +++ b/src/main/groovy/com/moowork/gradle/node/util/PlatformHelper.groovy @@ -50,12 +50,22 @@ class PlatformHelper return "sunos" } + if ( name.contains( "aix" ) ) + { + return "aix" + } + throw new IllegalArgumentException( "Unsupported OS: " + name ) } public String getOsArch() { final String arch = property( "os.arch" ).toLowerCase() + // Adding support for AIX on on ppc64 + if ( arch.contains( "ppc64" ) ) + { + return "ppc64" + } if ( arch.contains( "64" ) ) { return "x64" diff --git a/src/test/groovy/com/moowork/gradle/node/util/PlatformHelperTest.groovy b/src/test/groovy/com/moowork/gradle/node/util/PlatformHelperTest.groovy index 2bb37d3..a0f4350 100644 --- a/src/test/groovy/com/moowork/gradle/node/util/PlatformHelperTest.groovy +++ b/src/test/groovy/com/moowork/gradle/node/util/PlatformHelperTest.groovy @@ -38,6 +38,7 @@ class PlatformHelperTest 'Linux' | 'x86_64' | 'linux' | 'x64' | false 'SunOS' | 'x86' | 'sunos' | 'x86' | false 'SunOS' | 'x86_64' | 'sunos' | 'x64' | false + 'AIX' | 'ppc64' | 'aix' | 'ppc64' | false } def "throw exception if unsupported os"()