Baseflow / Baseflow/flutter-permission-handler

[Enhancement proposal]: build.gradle properties syntax in Groovy has been deprecated

Open
#1,484 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
2.2k
Forks
970
Avg merge
14h 22m
Merged PRs (30d)
2

Description

### Please check the following before submitting a new issue.

- [x] I have searched the [existing issues](https://github.com/baseflow/flutter-permission-handler/issues).
- [x] I have carefully [read the documentation](https://github.com/baseflow/flutter-permission-handler/blob/main/permission_handler/README.md) and verified I have added the required platform specific configuration.

### Please select affected platform(s)

- [x] Android
- [ ] iOS
- [ ] Windows

### Proposal

When building a new Flutter project which uses flutter-permission-handler there are warnings like this:
Image

These warnings are caused by the change in gradle's Groovy syntax. Please see the new syntax: [Groovy "space assignment" syntax](https://docs.gradle.org/current/userguide/upgrading_version_8.html#groovy_space_assignment_syntax)

The solution in my case was to manually edit the build.gradle from /home/user_name/.pub-cache/hosted/pub.dev/permission_handler_android-13.0.1/android/build.gradle and fill the missing "=". See below:

```
group = 'com.baseflow.permissionhandler'
version = '1.0'

buildscript {
repositories {
google()
mavenCentral()
}

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

rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}

apply plugin: 'com.android.library'

android {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace = 'com.baseflow.permissionhandler'
}
compileSdkVersion = 35

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

defaultConfig {
minSdkVersion = 19
}
}
```

### Pitch

The issue is not critical but it would be nice not to have useless warnings when building a project.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.