Skip to content

Commit 9ab8108

Browse files
13rac1claude
andcommitted
build: simplify iOS and Android build configuration
Removes flavor complexity from both platforms. Previously, both iOS and Android required --flavor flags for all builds. Now standard Debug/Release build types handle dev/production differentiation automatically. Changes: - Remove Android productFlavors, use applicationIdSuffix on debug buildType - Remove iOS custom build configurations (Debug-dev, Release-production, etc.) - Use standard Debug/Profile/Release configurations for iOS - Create Debug.xcconfig with dev bundle ID and display name - Update Release.xcconfig and Profile.xcconfig with production settings - Remove default-flavor from pubspec.yaml - Update Makefile, GitHub Actions, and Fastlane (remove --flavor flags) - Fix deprecated flutter format -> dart format in Makefile - Fix deprecated Swift syntax in AppDelegate.swift - Set iOS minimum deployment target to 14.0 Benefits: - `flutter run` just works on both platforms (no flags needed) - Debug builds = dev (bundle ID with .dev suffix) - Release builds = production (standard bundle ID) - Side-by-side installation still works via different bundle IDs - Simpler build system, easier for contributors to understand Usage: flutter run # debug/dev build flutter run --release # release/production build flutter build apk # release APK flutter build ios # release iOS 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent aa49157 commit 9ab8108

18 files changed

Lines changed: 351 additions & 219 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@ jobs:
100100
sed -i "s/^version: .*/version: ${NEW_VERSION}/" pubspec.yaml
101101
102102
echo "Updated version to ${NEW_VERSION}"
103-
- run: flutter build appbundle --flavor production
104-
- run: flutter build apk --flavor production
103+
- run: flutter build appbundle
104+
- run: flutter build apk
105105

106106
- name: Upload build artifacts
107107
uses: actions/upload-artifact@v4
108108
with:
109109
name: app-release-bundle
110110
path: |
111-
build/app/outputs/bundle/productionRelease/app-production-release.aab
112-
build/app/outputs/flutter-apk/app-production-release.apk
111+
build/app/outputs/bundle/release/app-release.aab
112+
build/app/outputs/flutter-apk/app-release.apk
113113
114114
- name: Deploy to Google Play Beta
115115
if: github.event_name == 'push'

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
cache: true
2929
- run: flutter --version
3030
- run: flutter pub get
31-
- run: flutter build apk --debug --flavor unsigned
31+
- run: flutter build apk --debug
3232

3333
- name: Upload build artifacts
3434
uses: actions/upload-artifact@v4

.metadata

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "300451adae589accbece3490f4396f10bdf15e6e"
7+
revision: "f6ff1529fd6d8af5f706051d9251ac9231c83407"
88
channel: "stable"
99

1010
project_type: app
@@ -13,11 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
17-
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
18-
- platform: web
19-
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
20-
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
16+
create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
17+
base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
18+
- platform: ios
19+
create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
20+
base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
2121

2222
# User provided section
2323

Makefile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,28 @@ build-all: build-release build-debug build-profile
1616

1717
.PHONY: build-release
1818
build-release:
19-
$(FLUTTER) build apk --release --build-number=$(VERSION) --flavor main
19+
$(FLUTTER) build apk --release --build-number=$(VERSION)
2020

2121
.PHONY: build-debug
2222
build-debug:
23-
$(FLUTTER) build apk --debug --build-number=$(VERSION) --flavor unsigned
23+
$(FLUTTER) build apk --debug --build-number=$(VERSION)
2424

2525
.PHONY: build-profile
2626
build-profile:
27-
$(FLUTTER) build apk --profile --build-number=$(VERSION) --flavor unsigned
27+
$(FLUTTER) build apk --profile --build-number=$(VERSION)
2828

2929
.PHONY: build-ios
3030
build-ios:
3131
$(FLUTTER) build ios --release --build-number=$(VERSION) --no-codesign
3232

33+
.PHONY: build-ios-debug
34+
build-ios-debug:
35+
$(FLUTTER) build ios --debug --build-number=$(VERSION) --no-codesign
36+
3337
.PHONY: format
3438
format:
35-
$(FLUTTER) format lib
39+
dart format lib
3640

3741
.PHONY: format-check
3842
format-check:
39-
@diff=$$(flutter format -n lib); \
40-
if [ -n "$$diff" ]; then \
41-
echo "The following files are not formatted correctly:"; \
42-
echo "$${diff}"; \
43-
echo "Please run 'make format' and commit the result."; \
44-
exit 1; \
45-
fi;
43+
dart format --set-exit-if-changed .

android/app/build.gradle

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,32 +68,13 @@ android {
6868
}
6969
}
7070

71-
productFlavors {
72-
unsigned {
73-
signingConfig signingConfigs.debug
74-
applicationIdSuffix ".unsigned"
75-
}
76-
production {
77-
signingConfig signingConfigs.release
78-
}
79-
}
80-
81-
flavorDimensions "deploy"
82-
83-
android.applicationVariants.all { variant ->
84-
if (variant.flavorName == "fdroid") {
85-
variant.outputs.all { output ->
86-
output.outputFileName = "app-fdroid-release.apk"
87-
}
88-
}
89-
}
90-
9171
buildTypes {
9272
release {
9373
signingConfig signingConfigs.release
9474
}
9575
debug {
96-
//signingConfig signingConfigs.debug
76+
applicationIdSuffix ".dev"
77+
signingConfig signingConfigs.debug
9778
}
9879
}
9980
lint {

android/fastlane/Fastfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@ platform :android do
2020
lane :build do
2121
gradle(
2222
task: 'clean assemble bundle',
23-
build_type: 'Release',
24-
flavor: 'production'
23+
build_type: 'Release'
2524
)
2625
end
2726

2827
desc "Deploy a new beta version to Google Play"
2928
lane :beta do
3029
upload_to_play_store(
3130
track: 'beta',
32-
aab: '../build/app/outputs/bundle/productionRelease/app-production-release.aab',
31+
aab: '../build/app/outputs/bundle/release/app-release.aab',
3332
skip_upload_apk: true,
3433
skip_upload_metadata: true,
3534
skip_upload_screenshots: true,
@@ -41,7 +40,7 @@ platform :android do
4140
lane :production_appbundle do
4241
upload_to_play_store(
4342
track: 'production',
44-
aab: '../build/app/outputs/bundle/productionRelease/app-production-release.aab',
43+
aab: '../build/app/outputs/bundle/release/app-release.aab',
4544
skip_upload_apk: true,
4645
skip_upload_metadata: true,
4746
skip_upload_screenshots: true,

ios/Flutter/Debug.xcconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
22
#include "Generated.xcconfig"
3+
PRODUCT_BUNDLE_IDENTIFIER=io.vikunja.flutteringVikunja.dev
4+
APP_DISPLAY_NAME=Vikunja (Dev)

ios/Flutter/Profile.xcconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
2+
#include "Generated.xcconfig"
3+
PRODUCT_BUNDLE_IDENTIFIER=io.vikunja.flutteringVikunja
4+
APP_DISPLAY_NAME=Vikunja

ios/Flutter/Release.xcconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
22
#include "Generated.xcconfig"
3+
PRODUCT_BUNDLE_IDENTIFIER=io.vikunja.flutteringVikunja
4+
APP_DISPLAY_NAME=Vikunja

ios/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '13.0'
1+
# Minimum iOS version for workmanager_apple and other plugins
2+
platform :ios, '14.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

0 commit comments

Comments
 (0)