fix android build issue

This commit is contained in:
Hiddify
2024-09-03 22:49:35 +02:00
parent b4e372c98c
commit a644b7fe5c
3 changed files with 22 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
.ONESHELL: # .ONESHELL:
include dependencies.properties include dependencies.properties
MKDIR := mkdir -p MKDIR := mkdir -p
RM := rm -rf RM := rm -rf
@@ -223,32 +223,33 @@ release: # Create a new tag for release.
@echo "previous version was $$(git describe --tags $$(git rev-list --tags --max-count=1))" @echo "previous version was $$(git describe --tags $$(git rev-list --tags --max-count=1))"
@echo "WARNING: This operation will creates version tag and push to github" @echo "WARNING: This operation will creates version tag and push to github"
@bash -c '\ @if [ "$$(curl -o /dev/null -I -s -w "%{http_code}" https://github.com/hiddify/hiddify-core/releases/download/v$(core.version)/hiddify-core-linux-amd64.tar.gz)" = "404" ]; then \
[ "404" == $$(curl -o /dev/null -I -s -w "%{http_code}" https://github.com/hiddify/hiddify-core/releases/download/v$(core.version)/hiddify-core-linux-amd64.tar.gz) ]&&{ echo "Core v$(core.version) not Found"; exit 1 ; } || \ echo "Core v$(core.version) not Found"; \
cversion_string=`grep -e "^version:" pubspec.yaml | cut -d: -f2-`;\ exit 3; \
fi
bash -c '\
cversion_string=$$(grep -e "^version:" pubspec.yaml | cut -d: -f2-); \
cstr_version=`echo "$${cversion_string}" | sed -n "s/[ ]*\\([0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\\)+.*/\\1/p"`; \ cstr_version=`echo "$${cversion_string}" | sed -n "s/[ ]*\\([0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\\)+.*/\\1/p"`; \
[ "$$cversion_string" == "" ] && { echo "getting old version error"; exit 1 ; } ||\ [ "$$cversion_string" == "" ] && { echo "getting old version error"; exit 1 ; }; \
cbuild_number=`echo "$${cversion_string}" | sed -n "s/.*+\\([0-9]\\+\\)/\\1/p"`; \ cbuild_number=`echo "$${cversion_string}" | sed -n "s/.*+\\([0-9]\\+\\)/\\1/p"`; \
echo "Current Version Name:$${cstr_version} Build Number:$${cbuild_number}";\ echo "Current Version Name:$${cstr_version} Build Number:$${cbuild_number}"; \
read -p "new Version? (provide the next x.y.z semver) : " TAG && \ read -p "new Version? (provide the next x.y.z semver) : " TAG && \
echo $$TAG &&\ echo $$TAG && \
[[ "$$TAG" =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(\.dev)?$$ ]] || { echo "Incorrect tag. e.g., 1.2.3 or 1.2.3.dev"; exit 1; } && \ [[ "$$TAG" =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(\.dev)?$$ ]] || { echo "Incorrect tag. e.g., 1.2.3 or 1.2.3.dev"; exit 1; } && \
IFS="." read -r -a VERSION_ARRAY <<< "$$TAG" && \ IFS="." read -r -a VERSION_ARRAY <<< "$$TAG" && \
VERSION_STR="$${VERSION_ARRAY[0]}.$${VERSION_ARRAY[1]}.$${VERSION_ARRAY[2]}" && \ VERSION_STR="$${VERSION_ARRAY[0]}.$${VERSION_ARRAY[1]}.$${VERSION_ARRAY[2]}" && \
BUILD_NUMBER=$$(( $${VERSION_ARRAY[0]} * 10000 + $${VERSION_ARRAY[1]} * 100 + $${VERSION_ARRAY[2]} )) && \ BUILD_NUMBER=$$(( $${VERSION_ARRAY[0]} * 10000 + $${VERSION_ARRAY[1]} * 100 + $${VERSION_ARRAY[2]} )) && \
echo "version: $${VERSION_STR}+$${BUILD_NUMBER}" && \ echo "version: $${VERSION_STR}+$${BUILD_NUMBER}" && \
sed -i "s/^version: .*/version: $${VERSION_STR}\+$${BUILD_NUMBER}/g" pubspec.yaml && \ sed -i "" "s/^version: .*/version: $${VERSION_STR}\+$${BUILD_NUMBER}/g" pubspec.yaml && \
sed -i "s/^msix_version: .*/msix_version: $${VERSION_ARRAY[0]}.$${VERSION_ARRAY[1]}.$${VERSION_ARRAY[2]}.0/g" windows/packaging/msix/make_config.yaml && \ sed -i "" "s/^msix_version: .*/msix_version: $${VERSION_ARRAY[0]}.$${VERSION_ARRAY[1]}.$${VERSION_ARRAY[2]}.0/g" windows/packaging/msix/make_config.yaml && \
sed -i "s/CURRENT_PROJECT_VERSION = $${cbuild_number}/CURRENT_PROJECT_VERSION = $${BUILD_NUMBER}/g" ios/Runner.xcodeproj/project.pbxproj && \ sed -i "" "s/CURRENT_PROJECT_VERSION = $${cbuild_number}/CURRENT_PROJECT_VERSION = $${BUILD_NUMBER}/g" ios/Runner.xcodeproj/project.pbxproj && \
sed -i "s/MARKETING_VERSION = $${cstr_version}/MARKETING_VERSION = $${VERSION_STR}/g" ios/Runner.xcodeproj/project.pbxproj && \ sed -i "" "s/MARKETING_VERSION = $${cstr_version}/MARKETING_VERSION = $${VERSION_STR}/g" ios/Runner.xcodeproj/project.pbxproj && \
git tag $${TAG} > /dev/null && \ git tag $${TAG} > /dev/null && \
gitchangelog > HISTORY.md || { git tag -d $${TAG}; echo "Please run pip install gitchangelog pystache mustache markdown"; exit 2; } && \ gitchangelog > HISTORY.md || { git tag -d $${TAG}; echo "Please run pip install gitchangelog pystache mustache markdown"; exit 2; } && \
git tag -d $${TAG} > /dev/null && \ git tag -d $${TAG} > /dev/null && \
git add ios/Runner.xcodeproj/project.pbxproj pubspec.yaml windows/packaging/msix/make_config.yaml HISTORY.md && \ git add ios/Runner.xcodeproj/project.pbxproj pubspec.yaml windows/packaging/msix/make_config.yaml HISTORY.md && \
git commit -m "release: version $${TAG}" && \ git commit -m "release: version $${TAG}" && \
echo "creating git tag : v$${TAG}" && \ echo "creating git tag : v$${TAG}" && \
git push && \ git push && \
git tag v$${TAG} && \ git tag v$${TAG} && \
git push -u origin HEAD --tags && \ git push -u origin HEAD --tags && \

View File

@@ -487,10 +487,11 @@ packages:
flutter_easy_permission: flutter_easy_permission:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_easy_permission path: "."
sha256: "05eb1b561c894adef28b3ae38d8087fc2635f1047c5e18cf2698fb42b6ccc132" ref: HEAD
url: "https://pub.dev" resolved-ref: da0cf67a7c0a2d8ad257084956ce6d32a98f8ccc
source: hosted url: "https://github.com/MichaelStH/flutter_easy_permission/"
source: git
version: "1.1.2" version: "1.1.2"
flutter_gen_core: flutter_gen_core:
dependency: transitive dependency: transitive

View File

@@ -87,7 +87,9 @@ dependencies:
timezone_to_country: ^2.1.0 timezone_to_country: ^2.1.0
json_path: ^0.7.1 json_path: ^0.7.1
# permission_handler: ^11.3.0 # is not compatible with windows # permission_handler: ^11.3.0 # is not compatible with windows
flutter_easy_permission: ^1.1.2 flutter_easy_permission:
git:
url: https://github.com/MichaelStH/flutter_easy_permission/
in_app_review: ^2.0.9 in_app_review: ^2.0.9
# circle_flags: ^4.0.2 # circle_flags: ^4.0.2
circle_flags: circle_flags: