File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed 
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,8 @@ install_android_sdk() {
554554    #  FIXME: we will be removing the "-0.1" suffix
555555    local  android_sdk_suffix=" -0.1" 
556556
557-     local  android_sdk_bundle_name=" ${ANDROID_SDK_TAG} _android${android_sdk_suffix} .artifactbundle" 
557+     local  android_sdk_name=" ${ANDROID_SDK_TAG} _android${android_sdk_suffix} " 
558+     local  android_sdk_bundle_name=" ${android_sdk_name} .artifactbundle" 
558559    #  FIXME: next SDK will remove the "_" from the name 
559560    local  android_sdk_bundle_dir=" ${android_sdk_bundle_name// _android/ -android} " 
560561    local  android_sdk_filename=" ${android_sdk_bundle_name} .tar.gz" 
@@ -569,7 +570,16 @@ install_android_sdk() {
569570    fi 
570571
571572    #  now setup the link to the local ANDROID_NDK_HOME
572-     cd  ~ /Library/org.swift.swiftpm ||  cd  " ${XDG_CONFIG_HOME:- $HOME } " ||  cd  ~ /.local/swiftpm ||  cd  ~ /.swiftpm
573+     swift sdk configure " ${android_sdk_name} " 
574+     cd  ~ /Library/org.swift.swiftpm ||  cd  ~ /.local/swiftpm ||  cd  ~ /.swiftpm
575+ 
576+     if  [[ !  -d  " ${ANDROID_NDK_HOME} " ;  then 
577+         #  download and install the Android NDK
578+         local  android_ndk_version=r27d
579+         curl --retry=3 -fsSLO https://dl.google.com/android/repository/android-ndk-" ${android_ndk_version} " " $( uname -s) " 
580+         unzip -q android-ndk-" ${android_ndk_version} " * .zip
581+         export  ANDROID_NDK_HOME=" ${PWD} " " ${android_ndk_version} " 
582+     fi 
573583    ./swift-sdks/" ${android_sdk_bundle_dir} " 
574584    cd  -
575585}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments