Last active
May 7, 2020 14:16
-
-
Save jaysonss/73362b1a151e0ef20e43e461ae326673 to your computer and use it in GitHub Desktop.
上传download.flutter.io的依赖到私有JFrog Artifactory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####需要提供Engine_Version: ${Flutter_Path}/bin/internal/engine.version | |
cpu=(armeabi_v7a arm64_v8a x86 x86_64) | |
buildType=(debug profile release) | |
#配置翻墙代理,用于下载资源 | |
export http_proxy=http://127.0.0.1:8001 | |
export https_proxy=http://127.0.0.1:8001 | |
#上传到maven私服 | |
function uploadToNexus(){ | |
mvn -X deploy:deploy-file -DgroupId=io.flutter -DartifactId="$1" -Dversion="1.0.0-${Engine_Revision}" -Dpackaging=jar -Dfile="$1-1.0.0-${Engine_Revision}.jar" -Durl=${REPOSITORY_URL} -DrepositoryId=${REPOSITORY_ID} | |
} | |
for((i=0;i<${#cpu[@]};i++)) do | |
for((j=0;j<${#buildType[@]};j++)) do | |
#屏蔽x86除debug以外的类型 | |
if [ ${cpu[i]} == "x86" ] && [ ${buildType[j]} != "debug" ];then | |
echo "x86 just has debug type" | |
continue | |
fi | |
#屏蔽x86_64除debug以外的类型 | |
if [ ${cpu[i]} == "x86_64" ] && [ ${buildType[j]} != "debug" ];then | |
echo "x86_64 just has debug type" | |
continue | |
fi | |
##下载flutter依赖 | |
wget -O "./${cpu[i]}_${buildType[j]}-1.0.0-${Engine_Revision}.jar" "http://download.flutter.io/io/flutter/${cpu[i]}_${buildType[j]}/1.0.0-${Engine_Revision}/${cpu[i]}_${buildType[j]}-1.0.0-${Engine_Revision}.jar" | |
##上传依赖到Nexus | |
uploadToNexus "${cpu[i]}_${buildType[j]}" | |
done; | |
done; | |
for((j=0;j<${#buildType[@]};j++)) do | |
##下载flutter_embedding依赖 | |
wget -O "./flutter_embedding_${buildType[j]}-1.0.0-${Engine_Revision}.jar" "http://download.flutter.io/io/flutter/flutter_embedding_${buildType[j]}/1.0.0-${Engine_Revision}/flutter_embedding_${buildType[j]}-1.0.0-${Engine_Revision}.jar" | |
##上传依赖到Nexus | |
uploadToNexus "flutter_embedding_${buildType[j]}" | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment