Skip to content

Commit 645873a

Browse files
authored
Merge pull request #5 from hivedb/update_to_nnbd
Upgrade packages & nnbd
2 parents b95f45b + db9fe2d commit 645873a

File tree

78 files changed

+2260
-297
lines changed

Some content is hidden

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

78 files changed

+2260
-297
lines changed

.flutter-plugins-dependencies

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/","dependencies":[]},{"name":"shared_preferences","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.6/","dependencies":[]},{"name":"sqflite","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.0+3/","dependencies":[]},{"name":"sqlite3_flutter_libs","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3_flutter_libs-0.5.0/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/","dependencies":[]},{"name":"shared_preferences","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.6/","dependencies":[]},{"name":"sqflite","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.0+3/","dependencies":[]},{"name":"sqlite3_flutter_libs","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3_flutter_libs-0.5.0/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.0/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-2.0.0/","dependencies":[]},{"name":"sqflite","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.0+3/","dependencies":[]},{"name":"sqlite3_flutter_libs","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3_flutter_libs-0.5.0/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.0.0/","dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_linux-2.0.0/","dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.1/","dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_windows-2.0.0/","dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/Users/misir/Workspace/tools/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-2.0.0/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]},{"name":"sqlite3_flutter_libs","dependencies":[]}],"date_created":"2021-06-20 16:24:34.979554","version":"2.2.1"}

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# hive_benchmark
2+
3+
A new Flutter project.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13+
14+
For help getting started with Flutter, view our
15+
[online documentation](https://flutter.dev/docs), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.

android/.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties

android/app/build.gradle

+6-8
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ if (flutterVersionName == null) {
2222
}
2323

2424
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
2526
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2627

2728
android {
28-
compileSdkVersion 28
29+
compileSdkVersion 30
2930

30-
lintOptions {
31-
disable 'InvalidPackage'
31+
sourceSets {
32+
main.java.srcDirs += 'src/main/kotlin'
3233
}
3334

3435
defaultConfig {
3536
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3637
applicationId "com.example.hive_benchmark"
3738
minSdkVersion 16
38-
targetSdkVersion 28
39+
targetSdkVersion 30
3940
versionCode flutterVersionCode.toInteger()
4041
versionName flutterVersionName
41-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
4242
}
4343

4444
buildTypes {
@@ -55,7 +55,5 @@ flutter {
5555
}
5656

5757
dependencies {
58-
testImplementation 'junit:junit:4.12'
59-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
60-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
58+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
6159
}
+23-15
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.example.hive_benchmark">
3-
4-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
5-
calls FlutterMain.startInitialization(this); in its onCreate method.
6-
In most cases you can leave this as-is, but you if you want to provide
7-
additional functionality it is fine to subclass or reimplement
8-
FlutterApplication and put your custom class here. -->
9-
<application
10-
android:name="io.flutter.app.FlutterApplication"
3+
<application
114
android:label="hive_benchmark"
125
android:icon="@mipmap/ic_launcher">
136
<activity
147
android:name=".MainActivity"
158
android:launchMode="singleTop"
169
android:theme="@style/LaunchTheme"
17-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
10+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1811
android:hardwareAccelerated="true"
1912
android:windowSoftInputMode="adjustResize">
20-
<!-- This keeps the window background of the activity showing
21-
until Flutter renders its first frame. It can be removed if
22-
there is no splash screen (such as the default splash screen
23-
defined in @style/LaunchTheme). -->
13+
<!-- Specifies an Android theme to apply to this Activity as soon as
14+
the Android process has started. This theme is visible to the user
15+
while the Flutter UI initializes. After that, this theme continues
16+
to determine the Window background behind the Flutter UI. -->
2417
<meta-data
25-
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
26-
android:value="true" />
18+
android:name="io.flutter.embedding.android.NormalTheme"
19+
android:resource="@style/NormalTheme"
20+
/>
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+
/>
2730
<intent-filter>
2831
<action android:name="android.intent.action.MAIN"/>
2932
<category android:name="android.intent.category.LAUNCHER"/>
3033
</intent-filter>
3134
</activity>
35+
<!-- Don't delete the meta-data below.
36+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
37+
<meta-data
38+
android:name="flutterEmbedding"
39+
android:value="2" />
3240
</application>
3341
</manifest>

android/app/src/main/java/com/example/hive_benchmark/MainActivity.java

-13
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.example.hive_benchmark
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
Flutter draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>
+11-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
45
<!-- Show a splash screen on the activity. Automatically removed when
56
Flutter draws its first frame -->
67
<item name="android:windowBackground">@drawable/launch_background</item>
78
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
818
</resources>

android/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
buildscript {
2+
ext.kotlin_version = '1.3.50'
23
repositories {
34
google()
45
jcenter()
56
}
67

78
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.2.1'
9+
classpath 'com.android.tools.build:gradle:4.1.0'
10+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
911
}
1012
}
1113

@@ -19,8 +21,6 @@ allprojects {
1921
rootProject.buildDir = '../build'
2022
subprojects {
2123
project.buildDir = "${rootProject.buildDir}/${project.name}"
22-
}
23-
subprojects {
2424
project.evaluationDependsOn(':app')
2525
}
2626

android/gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2+
android.useAndroidX=true
3+
android.enableJetifier=true

android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

android/settings.gradle

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
include ':app'
22

3-
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
3+
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4+
def properties = new Properties()
45

5-
def plugins = new Properties()
6-
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7-
if (pluginsFile.exists()) {
8-
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9-
}
6+
assert localPropertiesFile.exists()
7+
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
108

11-
plugins.each { name, path ->
12-
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13-
include ":$name"
14-
project(":$name").projectDir = pluginDirectory
15-
}
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"

ios/.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
*.mode1v3
2+
*.mode2v3
3+
*.moved-aside
4+
*.pbxuser
5+
*.perspectivev3
6+
**/*sync/
7+
.sconsign.dblite
8+
.tags*
9+
**/.vagrant/
10+
**/DerivedData/
11+
Icon?
12+
**/Pods/
13+
**/.symlinks/
14+
profile
15+
xcuserdata
16+
**/.generated/
17+
Flutter/App.framework
18+
Flutter/Flutter.framework
19+
Flutter/Flutter.podspec
20+
Flutter/Generated.xcconfig
21+
Flutter/ephemeral/
22+
Flutter/app.flx
23+
Flutter/app.zip
24+
Flutter/flutter_assets/
25+
Flutter/flutter_export_environment.sh
26+
ServiceDefinitions.json
27+
Runner/GeneratedPluginRegistrant.*
28+
29+
# Exceptions to above rules.
30+
!default.mode1v3
31+
!default.mode2v3
32+
!default.pbxuser
33+
!default.perspectivev3

ios/Flutter/Debug.xcconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"

ios/Flutter/Release.xcconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
# This is a generated file; do not edit or check into version control.
3+
export "FLUTTER_ROOT=/Users/misir/Workspace/tools/flutter"
4+
export "FLUTTER_APPLICATION_PATH=/Users/misir/Workspace/repos/github.com/hivedb/hive_benchmark"
5+
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
6+
export "FLUTTER_TARGET=lib/main.dart"
7+
export "FLUTTER_BUILD_DIR=build"
8+
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
9+
export "FLUTTER_BUILD_NAME=1.0.0"
10+
export "FLUTTER_BUILD_NUMBER=1"
11+
export "DART_OBFUSCATION=false"
12+
export "TRACK_WIDGET_CREATION=false"
13+
export "TREE_SHAKE_ICONS=false"
14+
export "PACKAGE_CONFIG=.packages"

ios/Podfile

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Uncomment this line to define a global platform for your project
2+
# platform :ios, '9.0'
3+
4+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15+
unless File.exist?(generated_xcode_build_settings_path)
16+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17+
end
18+
19+
File.foreach(generated_xcode_build_settings_path) do |line|
20+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
21+
return matches[1].strip if matches
22+
end
23+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24+
end
25+
26+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
28+
flutter_ios_podfile_setup
29+
30+
target 'Runner' do
31+
use_frameworks!
32+
use_modular_headers!
33+
34+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35+
end
36+
37+
post_install do |installer|
38+
installer.pods_project.targets.each do |target|
39+
flutter_additional_ios_build_settings(target)
40+
end
41+
end

0 commit comments

Comments
 (0)