Skip to content

Commit 165ad9c

Browse files
Merge pull request #20 from Shreemanarjun/v3
V3
2 parents 39f62c9 + 9d04b20 commit 165ad9c

203 files changed

Lines changed: 13674 additions & 5576 deletions

File tree

Some content is hidden

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

.github/workflows/main.yaml

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,69 @@
11
name: Flutter Workflow
22

33
on:
4-
#push:
54
pull_request:
6-
# Sequence of patterns matched against refs/heads
7-
branches:
5+
branches:
86
- main
97
- master
8+
109
permissions: read-all
10+
1111
jobs:
12-
build:
13-
runs-on: ubuntu-latest
12+
build-and-release:
13+
runs-on: ${{ (github.event.pull_request.head.repo.full_name == github.repository) && 'self-hosted' || 'ubuntu-latest' }}
14+
1415
permissions:
1516
contents: write
17+
1618
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v3
19-
- uses: actions/setup-java@v3
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup Java (Only on GitHub Runners)
22+
if: "!contains(runner.labels, 'self-hosted')"
23+
uses: actions/setup-java@v4
2024
with:
21-
distribution: 'zulu' # See 'Supported distributions' for available options
22-
java-version: '11'
23-
- name: Install Flutter
25+
distribution: 'zulu'
26+
java-version: '17'
27+
28+
- name: Setup Flutter (Only on GitHub Runners)
29+
if: "!contains(runner.labels, 'self-hosted')"
2430
uses: subosito/flutter-action@v2
2531
with:
2632
channel: 'stable'
2733
cache: true
28-
# - name: Install dependencies
29-
# run: flutter pub get
30-
- run: flutter --version
31-
32-
33-
- name: Run unit tests
34-
run: flutter test --coverage
3534

36-
# - name: Run integration tests
37-
# uses: reactivecircus/android-emulator-runner@v1
38-
# with:
39-
# api-level: 29
40-
# script: flutter drive --driver=test_driver/main_test.dart --target integration_test/app_test.dart
41-
- name: create Fat APK
42-
run: flutter build apk --release
43-
44-
- name: create Split APK
45-
run: flutter build apk --split-per-abi
35+
- name: Clean build artifacts
36+
run: flutter clean
4637

47-
- name: Upload Fat APK
48-
uses: actions/upload-artifact@v3
49-
with:
50-
name: release-fat-apk
51-
path: build/app/outputs/apk/release/app-release.apk
38+
- name: Solve dependencies
39+
run: flutter pub get
5240

53-
- name: Upload Split APK
54-
uses: actions/upload-artifact@v3
55-
with:
56-
name: release-split-apk
57-
path: build/app/outputs/flutter-apk/*.apk
41+
- name: Run unit tests
42+
run: flutter test --coverage
43+
44+
- name: Build APKs
45+
run: |
46+
flutter build apk --release
47+
flutter build apk --split-per-abi
5848
5949
- id: read-version
6050
uses: NiklasLehnfeld/flutter-version-number-action@main
6151
with:
6252
file-path: pubspec.yaml
53+
6354
- name: Push to Releases
6455
uses: ncipollo/release-action@v1
6556
with:
66-
artifacts: "build/app/outputs/apk/release/*.apk, build/app/outputs/flutter-apk/*.apk"
57+
artifacts: "build/app/outputs/flutter-apk/*.apk"
6758
tag: v${{ steps.read-version.outputs.version-number }}
68-
token: ${{ secrets.TOKEN }}
59+
token: ${{ secrets.GITHUB_TOKEN }}
6960
generateReleaseNotes: true
70-
- name: Checkout
71-
uses: actions/checkout@v2
72-
with:
73-
fetch-depth: 0
61+
7462
- name: "Build Changelog"
75-
uses: mikepenz/release-changelog-builder-action@v3
63+
uses: mikepenz/release-changelog-builder-action@v4
7664
with:
7765
configuration: ".github/workflows/configs/configuration.json"
7866
ignorePreReleases: "false"
7967
commitMode: "true"
8068
env:
81-
GITHUB_TOKEN: ${{ secrets.TOKEN }}
82-
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.metadata

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "ead455963c12b453cdb2358cad34969c76daf180"
7+
revision: "2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa"
88
channel: "stable"
99

1010
project_type: app
@@ -13,23 +13,26 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
17-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
16+
create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
17+
base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
1818
- platform: android
19-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
20-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
19+
create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
20+
base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
2121
- platform: ios
22-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
23-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
22+
create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
23+
base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
2424
- platform: linux
25-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
26-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
25+
create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
26+
base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
2727
- platform: macos
28-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
29-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
28+
create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
29+
base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
3030
- platform: web
31-
create_revision: ead455963c12b453cdb2358cad34969c76daf180
32-
base_revision: ead455963c12b453cdb2358cad34969c76daf180
31+
create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
32+
base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
33+
- platform: windows
34+
create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
35+
base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
3336

3437
# User provided section
3538

android/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
# See https://flutter.dev/to/reference-keystore
1112
key.properties
1213
**/*.keystore
1314
**/*.jks

android/app/build.gradle

Lines changed: 0 additions & 70 deletions
This file was deleted.

android/app/build.gradle.kts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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")
6+
}
7+
8+
android {
9+
namespace = "com.example.flutter_sharez"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
defaultConfig {
19+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
20+
applicationId = "com.example.flutter_sharez"
21+
// You can update the following values to match your application needs.
22+
// For more information, see: https://flutter.dev/to/review-gradle-config.
23+
minSdk = flutter.minSdkVersion
24+
targetSdk = flutter.targetSdkVersion
25+
versionCode = flutter.versionCode
26+
versionName = flutter.versionName
27+
}
28+
29+
buildTypes {
30+
release {
31+
// TODO: Add your own signing config for the release build.
32+
// Signing with the debug keys for now, so `flutter run --release` works.
33+
signingConfig = signingConfigs.getByName("debug")
34+
isMinifyEnabled = true
35+
isShrinkResources = true
36+
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
37+
}
38+
}
39+
}
40+
41+
flutter {
42+
source = "../.."
43+
}
44+
45+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
46+
compilerOptions {
47+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11)
48+
}
49+
}

android/app/proguard-rules.pro

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Flutter Proguard Rules
2+
-keep class io.flutter.app.** { *; }
3+
-keep class io.flutter.plugin.** { *; }
4+
-keep class io.flutter.util.** { *; }
5+
-keep class io.flutter.view.** { *; }
6+
-keep class io.flutter.** { *; }
7+
-keep class io.flutter.plugins.** { *; }
8+
-keep class com.google.android.gms.internal.** { *; }
9+
-keep class com.google.android.gms.common.internal.safeparcel.SafeParcelable { *; }
10+
-keep class com.google.android.gms.common.api.internal.IStatusCallback { *; }
11+
-keep class com.google.android.gms.common.api.internal.IStatusCallback$Stub { *; }
12+
-keep class com.google.android.gms.common.api.internal.IStatusCallback$Stub$Proxy { *; }
13+
14+
# Google Play Core rules to fix R8 missing class errors
15+
-dontwarn com.google.android.play.core.**
16+
-keep class com.google.android.play.core.splitcompat.SplitCompatApplication { *; }
17+
-keep class com.google.android.play.core.splitinstall.** { *; }
18+
-keep class com.google.android.play.core.tasks.** { *; }
19+
-keep class com.google.android.play.core.** { *; }
20+
21+
# Keep Hive classes
22+
-keep class com.hivedb.** { *; }
23+
-keep class net.hivedb.** { *; }
24+
25+
# Keep rhttp classes
26+
-keep class com.rhttp.** { *; }

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
6-
<uses-permission android:name="android.permission.INTERNET"/>
7-
6+
<uses-permission android:name="android.permission.INTERNET"/>
87
</manifest>

android/app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
<application
33
android:label="flutter_sharez"
44
android:name="${applicationName}"
5-
android:icon="@mipmap/ic_launcher"
6-
android:roundIcon="@mipmap/ic_launcher_rounded"
7-
>
5+
android:icon="@mipmap/ic_launcher">
86
<activity
97
android:name=".MainActivity"
108
android:exported="true"
119
android:launchMode="singleTop"
10+
android:taskAffinity=""
1211
android:theme="@style/LaunchTheme"
1312
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1413
android:hardwareAccelerated="true"
@@ -32,9 +31,19 @@
3231
android:name="flutterEmbedding"
3332
android:value="2" />
3433
</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>
3545
<uses-permission android:name="android.permission.INTERNET"/>
3646
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
3747
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
3848
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
39-
4049
</manifest>

android/app/src/main/kotlin/com/example/flutter_sharez/MainActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package com.example.flutter_sharez
22

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

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

0 commit comments

Comments
 (0)