Skip to content
Snippets Groups Projects
Makefile 1.39 KiB
Newer Older
  • Learn to ignore specific revisions
  • flavor=development
    entryPoint=main-dev.dart
    iosBundleName=Vereign-dev
    iosScheme=development
    iosConfiguration=Release-development
    
    
    
    ifeq ($(target), development)
    
        flavor=production
        entryPoint=main.dart
        iosBundleName=Vereign
        iosScheme=production
        iosConfiguration=Release-production
    
    endif
    
    .PHONY: all build-ios build-android
    
    all: build-ios build-android
    
    run:
    	flutter run --flavor ${flavor} -t lib/${entryPoint}
    
    
    Markin Igor's avatar
    Markin Igor committed
    build-ios: flutter-build-ios archive-ios export-ios ## Builds ios bundle and uploads it to the AppStore
    
    
    build-android: ## Builds android bundle
    	flutter build apk --flavor ${flavor} -t lib/${entryPoint}
    
    Markin Igor's avatar
    Markin Igor committed
    	# For PlayMarket
    	# flutter build appbundle --target-platform android-arm,android-arm64
    
    
    
    flutter-build-ios: ## Performs flutter build
    	flutter build ios --flavor $(flavor) -t lib/$(entryPoint)
    
    archive-ios: ## Creates .xarchive from fullter build
    	xcodebuild \
            -workspace ios/Runner.xcworkspace \
            -scheme ${iosScheme} \
            -sdk iphoneos \
            -configuration ${iosConfiguration} \
            archive -archivePath \
            build/ios/$(iosBundleName).xcarchive
    
    export-ios: ## Exports ipa and uploads it to AppStore
    	xcodebuild \
            -exportArchive \
            -archivePath build/ios/${iosBundleName}.xcarchive \
            -exportOptionsPlist ios/exportOptions-dev.plist \
            -exportPath build/ios/${iosBundleName}
    
    clean: ## Removes build directory
    	flutter clean