@@ -8,6 +8,7 @@ internal enum class OsType(val osName: String) {
8
8
LINUX (" linux" ),
9
9
FREEBSD (" linux" ), // https://github.com/node-gradle/gradle-node-plugin/issues/178
10
10
SUN (" sunos" ),
11
+ AIX (" aix" ),
11
12
}
12
13
13
14
internal fun parsePlatform (type : OsType , arch : String , uname : () -> String ): Platform {
@@ -24,6 +25,7 @@ internal fun parseOsType(type: String): OsType {
24
25
name.contains(" linux" ) -> OsType .LINUX
25
26
name.contains(" freebsd" ) -> OsType .FREEBSD
26
27
name.contains(" sunos" ) -> OsType .SUN
28
+ name.contains(" aix" ) -> OsType .AIX
27
29
else -> error(" Unsupported OS: $name " )
28
30
}
29
31
}
@@ -39,6 +41,7 @@ fun parseOsName(name: String): String {
39
41
name.contains(" linux" ) -> " linux"
40
42
name.contains(" freebsd" ) -> " linux"
41
43
name.contains(" sunos" ) -> " sunos"
44
+ name.contains(" aix" ) -> " aix"
42
45
else -> error(" Unsupported OS: $name " )
43
46
}
44
47
}
@@ -52,6 +55,7 @@ fun parseOsArch(arch: String, uname: Callable<String>): String {
52
55
arch == " arm" || arch.startsWith(" aarch" ) -> uname.call()
53
56
.mapIf({ it == " armv8l" || it == " aarch64" }) { " arm64" }
54
57
.mapIf({ it == " x86_64" }) {" x64" }
58
+ arch == " ppc64" -> " ppc64"
55
59
arch == " ppc64le" -> " ppc64le"
56
60
arch == " s390x" -> " s390x"
57
61
arch.contains(" 64" ) -> " x64"
0 commit comments