Skip to content

Update dependencies #1449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2025
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions permission_handler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 11.4.0

* Updates dependencies to latest versions.
* Migrates away from deprecated imperative Flutter gradle settings.

## 11.3.1

* Documents the use of the `PERMISSION_LOCAITON_WHENINUSE` macro on iOS.
Expand Down
1 change: 1 addition & 0 deletions permission_handler/example/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
.cxx

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
Expand Down
19 changes: 8 additions & 11 deletions permission_handler/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +11,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,14 +21,11 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
if (project.android.hasProperty("namespace")) {
namespace 'com.baseflow.permissionhandlerexample'
}
compileSdkVersion 33
compileSdkVersion 35

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -38,8 +35,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.baseflow.permissionhandler.example"
minSdkVersion 16
targetSdkVersion 33
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.baseflow.permissionhandler.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.baseflow.permissionhandler.example">
xmlns:tools="http://schemas.android.com/tools">

<uses-feature
android:name="android.hardware.telephony"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.permissionhandlerexample">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- Permissions options for the `contacts` group -->
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>

<!-- Permissions options for the `storage` group -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<!-- Permissions options for the `camera` group -->
<uses-permission android:name="android.permission.CAMERA"/>

<!-- Permissions options for the `sms` group -->
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH"/>
<uses-permission android:name="android.permission.RECEIVE_MMS"/>

<!-- Permissions options for the `phone` group -->
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.ADD_VOICEMAIL"/>
<uses-permission android:name="android.permission.USE_SIP"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
<uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>

<!-- Permissions options for the `calendar` group -->
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />

<!-- Permissions options for the `location` group -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<!-- Permissions options for the `microphone` or `speech` group -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />

<!-- Permissions options for the `sensors` group -->
<uses-permission android:name="android.permission.BODY_SENSORS" />
<uses-permission android:name="android.permission.BODY_SENSORS_BACKGROUND" />

<!-- Permissions options for the `access notification policy` group -->
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
</manifest>
15 changes: 3 additions & 12 deletions permission_handler/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
}
}

allprojects {
repositories {
google()
Expand All @@ -19,9 +8,11 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
29 changes: 19 additions & 10 deletions permission_handler/example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.7.0" apply false
}

include ":app"
4 changes: 2 additions & 2 deletions permission_handler/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PermissionHandlerWidget extends StatefulWidget {
}

@override
_PermissionHandlerWidgetState createState() =>
State<PermissionHandlerWidget> createState() =>
_PermissionHandlerWidgetState();
}

Expand Down Expand Up @@ -92,7 +92,7 @@ class PermissionWidget extends StatefulWidget {
final Permission permission;

@override
_PermissionState createState() => _PermissionState();
State<PermissionWidget> createState() => _PermissionState();
}

class _PermissionState extends State<PermissionWidget> {
Expand Down
10 changes: 4 additions & 6 deletions permission_handler/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ dependencies:
baseflow_plugin_template: ^2.1.1
flutter:
sdk: flutter

dev_dependencies:
flutter_test:
sdk: flutter

permission_handler:
# When depending on this package from a real application you should use:
# permission_handler: ^x.y.z
Expand All @@ -21,7 +16,10 @@ dev_dependencies:
# the parent directory to use the current plugin's version.
path: ../

url_launcher: ^6.1.11
dev_dependencies:
flutter_test:
sdk: flutter
url_launcher: ^6.3.1

flutter:
uses-material-design: true
Expand Down
16 changes: 8 additions & 8 deletions permission_handler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
repository: https://github.com/baseflow/flutter-permission-handler
issue_tracker: https://github.com/Baseflow/flutter-permission-handler/issues
version: 11.3.1
version: 11.4.0


environment:
sdk: ">=2.15.0 <4.0.0"
flutter: ">=2.8.0"
sdk: ^3.5.0
flutter: ">=3.24.0"

flutter:
plugin:
Expand All @@ -25,15 +25,15 @@ dependencies:
flutter:
sdk: flutter
meta: ^1.7.0
permission_handler_android: ^12.0.3
permission_handler_apple: ^9.4.3
permission_handler_android: ^12.1.0
permission_handler_apple: ^9.4.6
permission_handler_html: ^0.1.1
permission_handler_windows: ^0.2.1
permission_handler_platform_interface: ^4.2.0
permission_handler_platform_interface: ^4.3.0

dev_dependencies:
flutter_lints: ^1.0.4
flutter_lints: ^5.0.0
flutter_test:
sdk: flutter
mockito: ^5.0.1
mockito: ^5.4.5
plugin_platform_interface: ^2.0.0