Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 26 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
FLUTTER_MINIMUM_VERSION: 3.44.0
JAVA_VERSION: 17
JAVA_DISTRIBUTION: corretto
PACKAGE_PATH: ./package

jobs:
flutter-tests:
Expand All @@ -37,13 +38,15 @@ jobs:
run: dart format . --set-exit-if-changed

- name: Run tests
run: flutter test ./test/* --coverage
run: |
cd ${{ env.PACKAGE_PATH }}
flutter test ./test/* --coverage

- name: Upload coverage report as artifact
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v4
with:
name: flutter-coverage
path: coverage/lcov.info
path: ${{ env.PACKAGE_PATH }}/coverage/lcov.info

flutter-minimum-version-tests:
runs-on: ubuntu-latest
Expand All @@ -63,7 +66,9 @@ jobs:
run: dart analyze . --fatal-infos

- name: Run tests
run: flutter test ./test/*
run: |
cd ${{ env.PACKAGE_PATH }}
flutter test ./test/*

ios-tests:
runs-on: macos-latest
Expand All @@ -80,9 +85,8 @@ jobs:
brew install xcresultparser
flutter config --enable-swift-package-manager
flutter pub get
cd example/ios
cd ${{ env.PACKAGE_PATH }}/example/ios
flutter build ios --config-only
cd ../..

- name: Get latest iOS simulator info
id: ios-simulator
Expand All @@ -96,23 +100,23 @@ jobs:

- name: Run tests
run: |
xcodebuild test -workspace ./example/ios/Runner.xcworkspace \
xcodebuild test -workspace ${{ env.PACKAGE_PATH }}/example/ios/Runner.xcworkspace \
-scheme EventideTests \
-destination "platform=iOS Simulator,name=${{ steps.ios-simulator.outputs.iphone_name }},OS=${{ steps.ios-simulator.outputs.ios_version }},arch=arm64" \
-resultBundlePath build/reports/EventideTests.xcresult \
-resultBundlePath ${{ env.PACKAGE_PATH }}/example/ios/build/reports/EventideTests.xcresult \
-quiet

- name: Prepare coverage xml file
run: |
xcresultparser \
--output-format cobertura \
build/reports/EventideTests.xcresult > build/reports/ios-coverage.xml
${{ env.PACKAGE_PATH }}/example/ios/build/reports/EventideTests.xcresult > ${{ env.PACKAGE_PATH }}/example/ios/build/reports/ios-coverage.xml

- name: Upload coverage report as artifact
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v4
with:
name: ios-coverage
path: build/reports/ios-coverage.xml
path: ${{ env.PACKAGE_PATH }}/example/ios/build/reports/ios-coverage.xml

android-tests:
runs-on: ubuntu-latest
Expand All @@ -135,13 +139,13 @@ jobs:

- name: Build and test
run: |
./example/android/gradlew testDebugUnitTest -p ./example/android/
${{ env.PACKAGE_PATH }}/example/android/gradlew testDebugUnitTest -p ${{ env.PACKAGE_PATH }}/example/android/

- name: Upload coverage report as artifact
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v4
with:
name: android-coverage
path: android/build/reports/jacocoTestReport.xml
path: ${{ env.PACKAGE_PATH }}/android/build/reports/jacocoTestReport.xml

ios-build-spm:
runs-on: macos-latest
Expand All @@ -157,12 +161,12 @@ jobs:
run: |
flutter config --enable-swift-package-manager
flutter pub get
cd example
cd ${{ env.PACKAGE_PATH }}/example
flutter build ios --config-only --no-codesign

- name: Build iOS framework with SPM
run: |
cd example
cd ${{ env.PACKAGE_PATH }}/example
flutter build ios --simulator

android-build:
Expand All @@ -180,7 +184,7 @@ jobs:

- name: Build Android APK
run: |
cd example
cd ${{ env.PACKAGE_PATH }}/example
flutter build apk --debug

more-complex-examples-build:
Expand All @@ -200,7 +204,7 @@ jobs:

- name: Build ${{ matrix.app }} APK
run: |
cd example/more-complex/${{ matrix.app }}
cd examples/${{ matrix.app }}
flutter build apk --debug

upload-coverage:
Expand All @@ -213,25 +217,26 @@ jobs:
if: needs.flutter-tests.result == 'success'
with:
name: flutter-coverage
path: coverage
path: ${{ env.PACKAGE_PATH }}/coverage

- name: Download ios coverage report
uses: actions/download-artifact@v4
if: needs.ios-tests.result == 'success'
with:
name: ios-coverage
path: build/reports
path: ${{ env.PACKAGE_PATH }}/build/reports

- name: Download android coverage report
uses: actions/download-artifact@v4
if: needs.android-tests.result == 'success'
with:
name: android-coverage
path: android/build/reports/
path: ${{ env.PACKAGE_PATH }}/android/build/reports/

- name: Prepare coverage files list
id: coverage-files
run: |
cd ${{ env.PACKAGE_PATH }}
files=""
if [ -f "coverage/lcov.info" ]; then
files="$files,coverage/lcov.info"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.4.1
* **Move eventide source code** in a dedicated package subfolder to fix workspace issues

## 2.4.0
* **Upgrade to AGP 9.3.2 & Gradle 9.7.1** on Android (internal build tooling upgrade, no public API changes).
* **Bump Flutter minimum version to 3.44.0**
Expand Down
2 changes: 0 additions & 2 deletions example/more-complex/write-only/ios/Flutter/Debug.xcconfig

This file was deleted.

2 changes: 0 additions & 2 deletions example/more-complex/write-only/ios/Flutter/Release.xcconfig

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
43 changes: 43 additions & 0 deletions examples/full-permission/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '15.0'

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

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:eventide/eventide.dart';
import 'package:eventide_example_full_permission/calendar/logic/calendar_cubit.dart';
import 'package:eventide_example_full_permission/calendar/ui/components/calendar_form.dart';
import '../../logic/calendar_cubit.dart';
import 'calendar_form.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:value_state/value_state.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:calendar_view/calendar_view.dart';
import 'package:eventide/eventide.dart';
import 'package:eventide_example_full_permission/calendar/logic/calendar_cubit.dart';
import 'package:eventide_example_full_permission/calendar/ui/components/custom_drawer.dart';
import 'package:eventide_example_full_permission/event_details/ui/views/event_details_screen.dart';
import 'package:eventide_example_full_permission/calendar/ui/components/event_form.dart';
import '../../logic/calendar_cubit.dart';
import '../components/custom_drawer.dart';
import '../../../event_details/ui/views/event_details_screen.dart';
import '../components/event_form.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:value_state/value_state.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import 'dart:io';
import 'dart:math';

import 'package:eventide/eventide.dart';
import 'package:eventide_example_full_permission/calendar/ui/components/event_form.dart';
import 'package:eventide_example_full_permission/event_details/logic/event_details_cubit.dart';
import 'package:eventide_example_full_permission/event_details/ui/components/attendee_form.dart';
import '../../../calendar/ui/components/event_form.dart';
import '../../logic/event_details_cubit.dart';
import '../components/attendee_form.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:value_state/value_state.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:eventide/eventide.dart';
import 'package:eventide_example_full_permission/calendar/logic/calendar_cubit.dart';
import 'package:eventide_example_full_permission/calendar/ui/views/calendar_screen.dart';
import 'calendar/logic/calendar_cubit.dart';
import 'calendar/ui/views/calendar_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:provider/provider.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
sdk: flutter

eventide:
path: ../../../
path: ../../package
cupertino_icons: ^1.0.6
flutter_bloc: ^9.1.0
equatable: ^2.0.7
Expand Down
43 changes: 43 additions & 0 deletions examples/native-only/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '15.0'

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

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
timezone: ^0.10.1

eventide:
path: ../../../
path: ../../package
cupertino_icons: ^1.0.6

dev_dependencies:
Expand Down
43 changes: 43 additions & 0 deletions examples/write-only/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '15.0'

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

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:eventide/eventide.dart';
import 'package:eventide_example_write_only/event_form.dart';
import 'event_form.dart';
import 'package:flutter/material.dart';
import 'package:timezone/data/latest.dart' as tz;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
sdk: flutter

eventide:
path: ../../../
path: ../../package
cupertino_icons: ^1.0.6
timezone: ^0.10.0

Expand Down
3 changes: 1 addition & 2 deletions .pubignore → package/.pubignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ testing/
pubspec.lock
lefthook.yaml

example/more-complex/**
pigeons/**
test/**
android/src/test/**
example/ios/EventideTests/**
example/.github/**
example/.github/**
Loading
Loading