diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4891bf0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI +on: + push: + branches: [versionF] + pull_request: + branches: [versionF] + +jobs: + analyze-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + channel: stable + - run: flutter pub get + - run: flutter analyze + - run: flutter test diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d29021..0ba2ecd 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -9,20 +9,10 @@ # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml +analyzer: + exclude: + - "lib/examples/**" + linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options + avoid_print: true diff --git a/android/app/build.gradle b/android/app/build.gradle index 4d407ad..80469ca 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -47,7 +47,6 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "com.mossapps.locker" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. @@ -69,6 +68,9 @@ android { buildTypes { release { signingConfig = signingConfigs.release + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..a1c74b5 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,12 @@ +# Flutter +-keep class io.flutter.** { *; } +-keep class io.flutter.plugins.** { *; } +-dontwarn io.flutter.embedding.** + +# pointycastle (crypto) +-keep class org.bouncycastle.** { *; } +-dontwarn org.bouncycastle.** + +# Autofill service +-keep class com.mossapps.locker.AutofillService { *; } +-keep class com.mossapps.locker.AutofillSelectionActivity { *; } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b4e19ca..c91c0b7 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -29,7 +29,10 @@ android:label="Latch" android:name="${applicationName}" android:icon="@mipmap/launcher_icon" - android:requestLegacyExternalStorage="true"> + android:requestLegacyExternalStorage="true" + android:allowBackup="false" + android:dataExtractionRules="@xml/data_extraction_rules" + android:networkSecurityConfig="@xml/network_security_config"> + + + + + + + + +