Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 142 additions & 40 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,161 @@ name: Validate and publish

on:
push:
branches:
- 'main'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
branches: [main]
tags: ['v[0-9]+.[0-9]+.[0-9]+*']
pull_request:
branches:
- 'main'
branches: [main]

permissions:
contents: read

jobs:
validate-and-publish:
permissions:
id-token: write
runs-on: macos-latest
validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flutter: ['3.41.0', 'stable']
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ matrix.flutter == 'stable' && '' || matrix.flutter }}
cache: true
- run: flutter --version
- run: flutter pub get
- run: dart format --output=none --set-exit-if-changed .
- run: dart analyze --fatal-infos --fatal-warnings .
- run: flutter test
- name: Test example
run: flutter test
working-directory: example

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
android:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- agp: '8.13.2'
gradle: '8.13'
built-in-kotlin: 'false'
flutter: '3.41.0'
- agp: '9.0.1'
gradle: '9.1.0'
built-in-kotlin: 'false'
flutter: '3.44.1'
- agp: '9.0.1'
gradle: '9.1.0'
built-in-kotlin: 'true'
flutter: 'stable'
- agp: '9.0.1'
gradle: '9.1.0'
built-in-kotlin: 'default'
flutter: 'stable'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- uses: android-actions/setup-android@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ matrix.flutter == 'stable' && '' || matrix.flutter }}
cache: true
- run: sdkmanager 'platforms;android-36' 'build-tools;36.0.0' 'ndk;27.0.12077973'
- name: Configure consumer compatibility matrix
env:
TEST_AGP: ${{ matrix.agp }}
TEST_GRADLE: ${{ matrix.gradle }}
TEST_BUILT_IN_KOTLIN: ${{ matrix.built-in-kotlin }}
run: |
python3 - <<'PY'
import os
from pathlib import Path
android = Path('example/android')
settings = android / 'settings.gradle'
settings.write_text(settings.read_text().replace('8.13.2', os.environ['TEST_AGP']))
wrapper = android / 'gradle/wrapper/gradle-wrapper.properties'
wrapper.write_text(wrapper.read_text().replace('gradle-8.13-all', 'gradle-' + os.environ['TEST_GRADLE'] + '-all'))
kotlin_setting = os.environ['TEST_BUILT_IN_KOTLIN']
built_in = int(os.environ['TEST_AGP'].split('.')[0]) >= 9 and kotlin_setting != 'false'
if os.environ['TEST_AGP'].startswith('9.'):
with (android / 'gradle.properties').open('a') as properties:
if kotlin_setting != 'default':
properties.write('\nandroid.builtInKotlin=' + str(built_in).lower() + '\n')
properties.write('\nandroid.newDsl=false\n')
if built_in:
app = android / 'app/build.gradle'
app.write_text(app.read_text().replace(' id "kotlin-android"\n', '').replace(" kotlinOptions {\n jvmTarget = '11'\n }\n", '') + '\nkotlin { compilerOptions { jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11 } }\n')
PY
- run: flutter pub get
- name: Build Android consumer
run: flutter build apk --debug
working-directory: example
- name: Test native Android intent routing
if: matrix.agp == '8.13.2'
run: ./gradlew :open_settings_plus:testDebugUnitTest
working-directory: example/android

- name: 🔎 Show tool versions
ios:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
integration: [swift-package-manager, cocoapods]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Show tool versions
run: |
flutter --version
dart --version
xcodebuild -version
pod --version

- name: 📦 Install Dependencies
run: flutter pub get

- name: ✨ Check Formatting
run: dart format --set-exit-if-changed .

- name: 🕵️ Analyze
run: dart analyze --fatal-infos --fatal-warnings .

- name: 🧪 Test
run: flutter test

- name: 🍎 Validate iOS example with Swift Package Manager
- name: Select Apple dependency manager
env:
INTEGRATION: ${{ matrix.integration }}
run: |
flutter config --enable-swift-package-manager
flutter pub get
flutter build ios --no-codesign --verbose
if [ "$INTEGRATION" = 'cocoapods' ]; then
# The project's pubspec setting takes precedence over global config.
python3 - <<'PY'
from pathlib import Path
pubspec = Path('example/pubspec.yaml')
pubspec.write_text(pubspec.read_text().replace('enable-swift-package-manager: true', 'enable-swift-package-manager: false'))
PY
flutter config --no-enable-swift-package-manager
else
flutter config --enable-swift-package-manager
fi
- run: flutter pub get
- name: Test native iOS settings routing
if: matrix.integration == 'swift-package-manager'
run: |
flutter precache --ios
bash tool/test_native_ios.sh
- name: Build iOS consumer
run: flutter build ios --no-codesign
working-directory: example

- name: 🎯 Setup Dart for pub.dev publishing
if: startsWith(github.ref, 'refs/tags/v')
uses: dart-lang/setup-dart@v1

- name: 🚀 Publish
if: startsWith(github.ref, 'refs/tags/v')
run: dart pub publish --force
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: [validate, android, ios]
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- uses: dart-lang/setup-dart@v1
- run: flutter pub get
- run: dart pub publish --force
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## Unreleased

- Fix iOS method-channel calls that never completed; report URL launch outcomes.
- Add public iOS notification settings routing and configurable detailed fallback.
- Add `SettingsOpenResult`, `SettingsTarget`, the shared `OpenSettingsPlus.open()`
API and detailed native target opening without removing existing bool APIs.
- Add explicit `currentAppSettings()` and Android `allAppSettings()` names;
deprecate ambiguous aliases while preserving their destinations.
- Route Android intents and panels through the platform interface; support
Activity-aware task placement, Android 10+ panels, app language, exact alarm
access and VPN settings. Correct app-specific intent routing and fallback.
- Add native iOS completion/fallback regression tests and expand Dart coverage.
- Align Android builds with SDK 36, AGP 8.13.2 and Kotlin 2.2.10, with conditional
support for AGP 9 built-in Kotlin. Keep Flutter 3.41/Dart 3.11 lower bounds.
- Validate Android consumer configurations and both Apple dependency managers in
CI; document supported iOS destinations separately from experimental URLs.

## 0.5.1

### 🔧 Bug Fixes
Expand Down
Loading
Loading