@@ -8,6 +8,7 @@ internal enum class OsType(val osName: String) {
88 LINUX (" linux" ),
99 FREEBSD (" linux" ), // https://github.com/node-gradle/gradle-node-plugin/issues/178
1010 SUN (" sunos" ),
11+ AIX (" aix" ),
1112}
1213
1314internal fun parsePlatform (type : OsType , arch : String , uname : () -> String ): Platform {
@@ -24,6 +25,7 @@ internal fun parseOsType(type: String): OsType {
2425 name.contains(" linux" ) -> OsType .LINUX
2526 name.contains(" freebsd" ) -> OsType .FREEBSD
2627 name.contains(" sunos" ) -> OsType .SUN
28+ name.contains(" aix" ) -> OsType .AIX
2729 else -> error(" Unsupported OS: $name " )
2830 }
2931}
@@ -39,6 +41,7 @@ fun parseOsName(name: String): String {
3941 name.contains(" linux" ) -> " linux"
4042 name.contains(" freebsd" ) -> " linux"
4143 name.contains(" sunos" ) -> " sunos"
44+ name.contains(" aix" ) -> " aix"
4245 else -> error(" Unsupported OS: $name " )
4346 }
4447}
@@ -52,6 +55,7 @@ fun parseOsArch(arch: String, uname: Callable<String>): String {
5255 arch == " arm" || arch.startsWith(" aarch" ) -> uname.call()
5356 .mapIf({ it == " armv8l" || it == " aarch64" }) { " arm64" }
5457 .mapIf({ it == " x86_64" }) {" x64" }
58+ arch == " ppc64" -> " ppc64"
5559 arch == " ppc64le" -> " ppc64le"
5660 arch == " s390x" -> " s390x"
5761 arch.contains(" 64" ) -> " x64"
0 commit comments