Skip to content

Commit cee7cfd

Browse files
committed
fix build
1 parent 475c1fd commit cee7cfd

File tree

11 files changed

+91
-38
lines changed

11 files changed

+91
-38
lines changed

.github/workflows/dart.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v2
17-
- uses: actions/setup-java@v1
17+
- uses: actions/setup-java@v2
1818
with:
19-
java-version: '12.x'
20-
- uses: subosito/flutter-action@v1
19+
distribution: 'zulu'
20+
java-version: '11'
21+
- uses: subosito/flutter-action@v2
2122
with:
2223
flutter-version: '2.10.3'
2324
channel: 'stable'
25+
- name: fix
26+
run: flutter clean
2427
- name: Install dependencies
2528
run: flutter pub get
2629
- name: Codegen

analysis_options.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

android/app/build.gradle

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,25 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 31
29+
compileSdkVersion flutter.compileSdkVersion
3030

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
31+
compileOptions {
32+
sourceCompatibility JavaVersion.VERSION_1_8
33+
targetCompatibility JavaVersion.VERSION_1_8
34+
}
35+
36+
kotlinOptions {
37+
jvmTarget = '1.8'
3338
}
3439

35-
lintOptions {
36-
disable 'InvalidPackage'
40+
sourceSets {
41+
main.java.srcDirs += 'src/main/kotlin'
3742
}
3843

3944
defaultConfig {
40-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4145
applicationId "habrapp.habr_app"
42-
minSdkVersion 16
43-
targetSdkVersion 28
46+
minSdkVersion flutter.minSdkVersion
47+
targetSdkVersion flutter.targetSdkVersion
4448
versionCode flutterVersionCode.toInteger()
4549
versionName flutterVersionName
4650
}
Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="habrapp.habr_app">
3-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
4-
calls FlutterMain.startInitialization(this); in its onCreate method.
5-
In most cases you can leave this as-is, but you if you want to provide
6-
additional functionality it is fine to subclass or reimplement
7-
FlutterApplication and put your custom class here. -->
83
<uses-permission android:name="android.permission.INTERNET"/>
94
<application
10-
115
android:name="${applicationName}"
126
android:label="habr_app"
137
android:icon="@mipmap/ic_launcher">
148
<activity
159
android:name=".MainActivity"
10+
android:exported="true"
1611
android:launchMode="singleTop"
1712
android:theme="@style/LaunchTheme"
1813
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
@@ -26,15 +21,6 @@
2621
android:name="io.flutter.embedding.android.NormalTheme"
2722
android:resource="@style/NormalTheme"
2823
/>
29-
<!-- Displays an Android View that continues showing the launch screen
30-
Drawable until Flutter paints its first frame, then this splash
31-
screen fades out. A splash screen is useful to avoid any visual
32-
gap between the end of Android's launch screen and the painting of
33-
Flutter's first frame. -->
34-
<meta-data
35-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
36-
android:resource="@drawable/launch_background"
37-
/>
3824
<intent-filter>
3925
<action android:name="android.intent.action.MAIN"/>
4026
<category android:name="android.intent.category.LAUNCHER"/>
@@ -46,4 +32,4 @@
4632
android:name="flutterEmbedding"
4733
android:value="2" />
4834
</application>
49-
</manifest>
35+
</manifest>
Lines changed: 12 additions & 0 deletions
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>
Lines changed: 18 additions & 0 deletions
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>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<!-- Theme applied to the Android Window while the process is starting -->
4-
<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">
55
<!-- Show a splash screen on the activity. Automatically removed when
66
Flutter draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
@@ -10,9 +10,9 @@
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
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:color/white</item>
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
1717
</style>
1818
</resources>

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.50'
2+
ext.kotlin_version = '1.6.10'
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.0'
9+
classpath 'com.android.tools.build:gradle:4.1.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
1313

1414
allprojects {
1515
repositories {
1616
google()
17-
jcenter()
17+
mavenCentral()
1818
}
1919
}
2020

android/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
android.enableR8=true
32
android.useAndroidX=true
43
android.enableJetifier=true

0 commit comments

Comments
 (0)