@@ -16,6 +16,8 @@ static def get_platform() {
1616 os_arch = ' x86_64'
1717 } else if (os_arch == ' i386' ) {
1818 os_arch = ' x86'
19+ } else if (os_arch == ' aarch64' || os_arch == ' arm64' ) {
20+ os_arch = ' arm64'
1921 }
2022
2123 if (OperatingSystem . current(). isWindows()) {
@@ -48,24 +50,43 @@ static def get_platform_path(platform) {
4850 } else if (platform == " windows-x86" ) {
4951 return " windows/x86"
5052 } else if (platform == " windows-x86_64" ) {
51- return " windows/x86-64"
53+ return " osx/x86-64"
54+ } else if (platform == " osx-arm64" ) {
55+ return " osx/arm64"
5256 } else {
5357 return " "
5458 }
5559}
5660
5761ext. platform = get_platform()
62+ if (project. hasProperty(' forcealternatemacbuild' )) {
63+ if (ext. platform == " osx-arm64" ) {
64+ ext. platform = " osx-x86_64"
65+ } else if (ext. platform == " osx-x86_64" ) {
66+ ext. platform = " osx-arm64"
67+ }
68+ }
5869ext. platform_path = get_platform_path(ext. platform)
5970ext. platform_classifier = ext. platform. replaceFirst(' -' , ' ' ). replace(' _' , ' -' )
6071
6172// Get the number of processors available to build.
6273ext. processors = Runtime . runtime. availableProcessors()
6374
6475ext. openssl_dir = file(" openssl" )
65- ext. openssl_install = file(" install-openssl" )
76+ ext. openssl_build_dir = file(" build/$platform_path /openssl" )
77+ ext. openssl_install = file(" build/$platform_path /install-openssl" )
6678
6779ext. libssh_dir = file(" libssh-mirror" )
68- ext. libssh_build = file(" build-libssh" )
80+ ext. libssh_build = file(" build/$platform_path /libssh" )
81+
82+ task clean {
83+ doLast {
84+ rootDir. eachDir {dir ->
85+ if (dir. name. startsWith(" build" ) || dir. name. startsWith(" install" ))
86+ delete dir
87+ }
88+ }
89+ }
6990
7091apply from : " openssl.gradle"
7192apply from : " libssh.gradle"
@@ -82,17 +103,12 @@ ext.addTaskToCopyAllOutputs = { task ->
82103 copyAllOutputs. from task. archivePath
83104}
84105
85- task clean {
86- doLast {
87- rootDir. eachDir {dir ->
88- if (dir. name. startsWith(" build" ) || dir. name. startsWith(" install" ))
89- delete dir
90- }
91- }
92- }
93-
94106task build {
95107 dependsOn copyAllOutputs
96108}
97109
98- apply from : " publish.gradle"
110+ apply from : " publish.gradle"
111+
112+ wrapper {
113+ gradleVersion = ' 7.5-rc-2'
114+ }
0 commit comments