Skip to content

Commit ca56157

Browse files
authored
build: bump up dependencies
Closes #165
1 parent dfc3fc5 commit ca56157

File tree

93 files changed

+2129
-362
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2129
-362
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Dart Package Versioning](https://dart.dev/tools/pub
77

88
## [Unreleased]
99

10+
- Bump up dependencies.
11+
- Stricter linting rules.
12+
- Example app tested and running on multiple platforms: Android, IOS, Web and MacOS.
13+
1014
## [1.1.0] - 2022-06-20
1115

1216
### Added

analysis_options.yaml

+9-15
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
include: package:lint/analysis_options_package.yaml
1+
include: package:lint/package.yaml
2+
23
analyzer:
3-
strong-mode:
4-
# A value of false ensures that the type inference engine never implicitly casts
5-
# from dynamic to a more specific type.
6-
implicit-casts: false
7-
# A value of false ensures that the type inference engine never chooses the
8-
# dynamic type when it can’t determine a static type.
9-
implicit-dynamic: false
4+
exclude:
5+
- '**.freezed.dart'
6+
- '**.g.dart'
107
linter:
118
rules:
12-
always_use_package_imports: false
139
# Make constructors the first thing in every class
10+
sort_unnamed_constructors_first: true
1411
sort_constructors_first: true
12+
avoid_catches_without_on_clauses: true
13+
avoid_equals_and_hash_code_on_mutable_classes: true
14+
cancel_subscriptions: true
1515
# Good packages document everything
1616
public_member_api_docs: true
17-
# Always await.
18-
unawaited_futures: true
19-
always_declare_return_types: true
20-
cancel_subscriptions: true
21-
close_sinks: true
22-
only_throw_errors: true
2317
package_api_docs: true

example/.metadata

+37-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: b22742018b3edf16c6cadd7b76d9db5e7f9064b5
8-
channel: beta
7+
revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
8+
channel: "stable"
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
17+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
18+
- platform: android
19+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
20+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
21+
- platform: ios
22+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
23+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
24+
- platform: linux
25+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
26+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
27+
- platform: macos
28+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
29+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
30+
- platform: web
31+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
32+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
33+
- platform: windows
34+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
35+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/analysis_options.yaml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
include: package:lint/analysis_options_package.yaml
1+
analyzer:
2+
exclude:
3+
- '**.freezed.dart'
4+
- '**.g.dart'
25
linter:
36
rules:
47
# Make constructors the first thing in every class
8+
sort_unnamed_constructors_first: true
59
sort_constructors_first: true
10+
avoid_catches_without_on_clauses: true
11+
avoid_equals_and_hash_code_on_mutable_classes: true
12+
cancel_subscriptions: true
613
# Good packages document everything
714
public_member_api_docs: true
8-
# It's a good practice to expose the ability to provide a key when creating public widgets.
9-
use_key_in_widget_constructors: true
10-
15+
package_api_docs: true

example/android/.classpath

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="/Users/rafamizes/Library/Android/sdk/sources/android-28/"/>
4+
<classpathentry kind="lib" path="."/>
5+
</classpath>

example/android/app/build.gradle

+26-39
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,44 @@
1-
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
3-
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
5-
localProperties.load(reader)
6-
}
7-
}
8-
9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15-
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
17-
}
18-
19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
226
}
237

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
288
android {
29-
compileSdkVersion 30
9+
namespace = "dev.dartoos.example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
16+
}
3017

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_1_8
3320
}
3421

3522
defaultConfig {
36-
applicationId "dev.dartoos.example"
37-
minSdkVersion 16
38-
targetSdkVersion 30
39-
versionCode flutterVersionCode.toInteger()
40-
versionName flutterVersionName
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "dev.dartoos.example"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
4131
}
4232

4333
buildTypes {
4434
release {
35+
// TODO: Add your own signing config for the release build.
4536
// Signing with the debug keys for now, so `flutter run --release` works.
46-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
4738
}
4839
}
4940
}
5041

5142
flutter {
52-
source '../..'
53-
}
54-
55-
dependencies {
56-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
43+
source = "../.."
5744
}

example/android/app/src/debug/AndroidManifest.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="dev.dartoos.example">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="dev.dartoos.example">
3-
<application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
43
android:label="example"
4+
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
66
<activity
77
android:name=".MainActivity"
8+
android:exported="true"
89
android:launchMode="singleTop"
10+
android:taskAffinity=""
911
android:theme="@style/LaunchTheme"
1012
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1113
android:hardwareAccelerated="true"
@@ -18,15 +20,6 @@
1820
android:name="io.flutter.embedding.android.NormalTheme"
1921
android:resource="@style/NormalTheme"
2022
/>
21-
<!-- Displays an Android View that continues showing the launch screen
22-
Drawable until Flutter paints its first frame, then this splash
23-
screen fades out. A splash screen is useful to avoid any visual
24-
gap between the end of Android's launch screen and the painting of
25-
Flutter's first frame. -->
26-
<meta-data
27-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
28-
android:resource="@drawable/launch_background"
29-
/>
3023
<intent-filter>
3124
<action android:name="android.intent.action.MAIN"/>
3225
<category android:name="android.intent.category.LAUNCHER"/>
@@ -38,4 +31,15 @@
3831
android:name="flutterEmbedding"
3932
android:value="2" />
4033
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
4145
</manifest>

example/android/app/src/main/kotlin/dev/dartoos/android_test/MainActivity.kt renamed to example/android/app/src/main/kotlin/dev/dartoos/example/MainActivity.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package dev.dartoos.example
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity() {
6-
}
5+
class MainActivity: FlutterActivity()

example/android/build.gradle

+6-17
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,18 @@
1-
buildscript {
2-
ext.kotlin_version = '1.3.50'
3-
repositories {
4-
google()
5-
jcenter()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
17-
jcenter()
4+
mavenCentral()
185
}
196
}
207

21-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
229
subprojects {
2310
project.buildDir = "${rootProject.buildDir}/${project.name}"
24-
project.evaluationDependsOn(':app')
11+
}
12+
subprojects {
13+
project.evaluationDependsOn(":app")
2514
}
2615

27-
task clean(type: Delete) {
16+
tasks.register("clean", Delete) {
2817
delete rootProject.buildDir
2918
}

example/android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

example/android/settings.gradle

+22-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
29

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
818

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version "7.3.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23+
}
24+
25+
include ":app"

example/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>8.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

0 commit comments

Comments
 (0)