英文:
Any way to upload Flutter local aar maven repository to remote maven repository?
问题
After we use flutter build aar
cmd and get local maven repository. Any way to push these aar to remote maven repository?
我們使用 flutter build aar
命令並獲得本地 Maven 存儲庫後,有沒有辦法將這些 AAR 文件推送到遠程 Maven 存儲庫?
I have tried this cmd
我嘗試過以下命令
find . -name "*.pom" -type f -exec sh -c 'mvn deploy:deploy-file -DpomFile="$0" -Dfile="${0%.pom}.aar"' '{}' \;
But got following error
但是收到以下錯誤
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file (default-cli) on project standalone-pom: The parameters 'file', 'url' for goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file are missing or invalid -> [Help 1]
Any ideas?
有什麼想法?
英文:
After we use flutter build aar
cmd and get local maven repository. Any way to push these aar to remote maven repository?
I have tried this cmd
find . -name "*.pom" -type f -exec sh -c 'mvn deploy:deploy-file -DpomFile="$0" -Dfile="${0%.pom}.aar"' '{}' \;
But got following error
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file (default-cli) on project standalone-pom: The parameters 'file', 'url' for goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file are missing or invalid -> [Help 1]
Any ideas?
答案1
得分: 0
以下是已翻译的内容:
这是我尝试的一种方式。不是创建本地存储库,而是直接上传生成的文件到Maven。
更新位于已安装的flutter_tools
文件内的aar_init_script.gradle,如下所示。
保存文件并运行以下命令:
flutter build aar --build-number [version_name] --no-profile --no-release
示例:
flutter build aar --build-number 1.0.12 --no-profile --no-release
英文:
Here is the one way I have tried. Instead of creating the local repo it will directly upload the generated files to the maven.
Update aar_init_script.gradle located inside the installed flutter_tools file as shown.
Save the file and run the command
flutter build aar --build-number [version_name] --no-profile --no-release
Example:
flutter build aar --build-number 1.0.12 --no-profile --no-release
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论