Compare commits
2 Commits
fb0902652e
...
2bb4a2a293
Author | SHA1 | Date |
---|---|---|
Mehul Ahal | 2bb4a2a293 | |
Mehul Ahal | 94183868e2 |
|
@ -1,3 +1,11 @@
|
||||||
|
plugins {
|
||||||
|
id "com.android.application"
|
||||||
|
id "kotlin-android"
|
||||||
|
id "dev.flutter.flutter-gradle-plugin"
|
||||||
|
id "com.google.gms.google-services"
|
||||||
|
id "com.google.firebase.crashlytics"
|
||||||
|
}
|
||||||
|
|
||||||
def localProperties = new Properties()
|
def localProperties = new Properties()
|
||||||
def localPropertiesFile = rootProject.file('local.properties')
|
def localPropertiesFile = rootProject.file('local.properties')
|
||||||
if (localPropertiesFile.exists()) {
|
if (localPropertiesFile.exists()) {
|
||||||
|
@ -6,9 +14,10 @@ if (localPropertiesFile.exists()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
def keystoreProperties = new Properties()
|
||||||
if (flutterRoot == null) {
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||||
|
@ -21,31 +30,28 @@ if (flutterVersionName == null) {
|
||||||
flutterVersionName = '1.0'
|
flutterVersionName = '1.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
|
||||||
apply plugin: 'kotlin-android'
|
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
// ----- BEGIN flavorDimensions (autogenerated by flutter_flavorizr) -----
|
// ----- BEGIN flavorDimensions (autogenerated by flutter_flavorizr) -----
|
||||||
flavorDimensions "flavor-type"
|
flavorDimensions += "flavor-type"
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
develop {
|
develop {
|
||||||
dimension "flavor-type"
|
dimension "flavor-type"
|
||||||
applicationIdSuffix ".dev"
|
applicationId "{{android_app_id}}.dev"
|
||||||
resValue "string", "app_name", "{{dispay_name}} Dev"
|
resValue "string", "app_name", "{{dispay_name}} dev"
|
||||||
versionNameSuffix ".dev"
|
|
||||||
}
|
}
|
||||||
prod {
|
prod {
|
||||||
dimension "flavor-type"
|
dimension "flavor-type"
|
||||||
|
applicationId "{{android_app_id}}"
|
||||||
resValue "string", "app_name", "{{dispay_name}}"
|
resValue "string", "app_name", "{{dispay_name}}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----- END flavorDimensions (autogenerated by flutter_flavorizr) -----
|
// ----- END flavorDimensions (autogenerated by flutter_flavorizr) -----
|
||||||
|
|
||||||
namespace "{{android_app_id}}"
|
namespace "{{android_app_id}}"
|
||||||
compileSdkVersion flutter.compileSdkVersion
|
compileSdk flutter.compileSdkVersion
|
||||||
ndkVersion flutter.ndkVersion
|
ndkVersion flutter.ndkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
@ -66,21 +72,20 @@ android {
|
||||||
applicationId "{{android_app_id}}"
|
applicationId "{{android_app_id}}"
|
||||||
// You can update the following values to match your application needs.
|
// 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.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion flutter.minSdkVersion
|
minSdkVersion 26
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
multiDexEnabled true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
keyAlias keystoreProperties['keyAlias']
|
keyAlias keystoreProperties['keyAlias']
|
||||||
keyPassword keystoreProperties['keyPassword']
|
keyPassword keystoreProperties['keyPassword']
|
||||||
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||||
storePassword keystoreProperties['storePassword']
|
storePassword keystoreProperties['storePassword']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
|
@ -93,13 +98,12 @@ android {
|
||||||
//Other parameters
|
//Other parameters
|
||||||
// Enables resource shrinking
|
// Enables resource shrinking
|
||||||
shrinkResources = true
|
shrinkResources = true
|
||||||
// zipAlignEnabled true
|
// zipAlignEnabled true
|
||||||
//Enable the proguard
|
//Enable the proguard
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters 'armeabi-v7a','arm64-v8a','x86_64'
|
abiFilters 'arm64-v8a', 'x86_64'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,5 +113,11 @@ flutter {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
// Import the Firebase BoM
|
||||||
}
|
implementation platform('com.google.firebase:firebase-bom:32.8.1')
|
||||||
|
|
||||||
|
// TODO: Add the dependencies for Firebase products you want to use
|
||||||
|
// When using the BoM, don't specify versions in Firebase dependencies
|
||||||
|
implementation 'com.google.firebase:firebase-analytics-ktx'
|
||||||
|
implementation 'com.google.firebase:firebase-crashlytics-ktx'
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
#Flutter Wrapper
|
||||||
|
-keep class io.flutter.app.** { *; }
|
||||||
|
-keep class io.flutter.plugin.** { *; }
|
||||||
|
-keep class io.flutter.util.** { *; }
|
||||||
|
-keep class io.flutter.view.** { *; }
|
||||||
|
-keep class io.flutter.** { *; }
|
||||||
|
-keep class io.flutter.plugins.** { *; }
|
||||||
|
#-keep class io.flutter.plugin.editing.** { *; }
|
||||||
|
|
||||||
|
##Firebase
|
||||||
|
#-keep class com.google.firebase.** { *; }
|
||||||
|
#-keep class com.firebase.** { *; }
|
||||||
|
#-keep class org.apache.** { *; }
|
||||||
|
#-keepnames class com.fasterxml.jackson.** { *; }
|
||||||
|
#-keepnames class javax.servlet.** { *; }
|
||||||
|
#-keepnames class org.ietf.jgss.** { *; }
|
||||||
|
#-dontwarn org.w3c.dom.**
|
||||||
|
#-dontwarn org.joda.time.**
|
||||||
|
#-dontwarn org.shaded.apache.**
|
||||||
|
#-dontwarn org.ietf.jgss.**
|
||||||
|
#-keepattributes Signature
|
||||||
|
#-keepattributes *Annotation*
|
||||||
|
#-keepattributes EnclosingMethod
|
||||||
|
#-keepattributes InnerClasses
|
||||||
|
#-keep class androidx.lifecycle.DefaultLifecycleObserver
|
||||||
|
|
||||||
|
#Crashlytics
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
# in order to provide the most meaningful crash reports, add the following line:
|
||||||
|
-keepattributes SourceFile,LineNumberTable
|
||||||
|
# If you are using custom exceptions, add this line so that custom exception types are skipped during obfuscation:
|
||||||
|
#-keep public class * extends java.lang.Exception
|
||||||
|
-keep class com.crashlytics.** { *; }
|
||||||
|
-dontwarn com.crashlytics.**
|
|
@ -1,7 +0,0 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- The INTERNET permission is required for development. Specifically,
|
|
||||||
the Flutter tool needs it to communicate with the running application
|
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
|
||||||
-->
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
|
||||||
</manifest>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- The INTERNET permission is required for development. Specifically,
|
|
||||||
the Flutter tool needs it to communicate with the running application
|
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
|
||||||
-->
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
|
||||||
</manifest>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- The INTERNET permission is required for development. Specifically,
|
|
||||||
the Flutter tool needs it to communicate with the running application
|
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
|
||||||
-->
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
|
||||||
</manifest>
|
|
|
@ -1,16 +1,3 @@
|
||||||
buildscript {
|
|
||||||
ext.kotlin_version = '1.7.10'
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:8.1.0'
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
@ -28,4 +15,4 @@ subprojects {
|
||||||
|
|
||||||
tasks.register("clean", Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx4G
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.defaults.buildfeatures.buildconfig=true
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
android.nonTransitiveRClass=false
|
android.nonTransitiveRClass=false
|
||||||
android.nonFinalResIds=false
|
android.nonFinalResIds=false
|
|
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
|
||||||
|
|
|
@ -1,11 +1,28 @@
|
||||||
include ':app'
|
pluginManagement {
|
||||||
|
def flutterSdkPath = {
|
||||||
|
def properties = new Properties()
|
||||||
|
file("local.properties").withInputStream { properties.load(it) }
|
||||||
|
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||||
|
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||||
|
return flutterSdkPath
|
||||||
|
}
|
||||||
|
settings.ext.flutterSdkPath = flutterSdkPath()
|
||||||
|
|
||||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
|
||||||
def properties = new Properties()
|
|
||||||
|
|
||||||
assert localPropertiesFile.exists()
|
repositories {
|
||||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
plugins {
|
||||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
id "com.android.application" version "7.4.2" apply false
|
||||||
|
id "org.jetbrains.kotlin.android" version "1.9.20" apply false
|
||||||
|
id "com.google.gms.google-services" version "4.4.1" apply false
|
||||||
|
id "com.google.firebase.crashlytics" version "2.9.9" apply false
|
||||||
|
}
|
||||||
|
|
||||||
|
include ":app"
|
|
@ -1,7 +1,7 @@
|
||||||
name: my_app
|
name: {{app_name}}
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.0.0+1
|
version: 0.0.1
|
||||||
environment:
|
environment:
|
||||||
flutter: '>=3.13.0 <4.0.0'
|
flutter: '>=3.13.0 <4.0.0'
|
||||||
sdk: '>=3.0.0 <4.0.0'
|
sdk: '>=3.0.0 <4.0.0'
|
||||||
|
@ -16,37 +16,40 @@ dependencies:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
# Firebase
|
# Firebase
|
||||||
cloud_firestore: ^4.13.2
|
firebase_analytics: ^10.10.4
|
||||||
firebase_core: ^2.23.0
|
firebase_core: ^2.30.1
|
||||||
firebase_crashlytics: ^3.4.5
|
firebase_crashlytics: ^3.5.4
|
||||||
|
firebase_remote_config: ^4.4.4
|
||||||
|
|
||||||
# Backend
|
# Backend
|
||||||
get_it: ^7.6.4
|
get_it: ^7.7.0
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
|
auto_size_text: ^3.0.0
|
||||||
animated_list_plus: ^0.5.2
|
animated_list_plus: ^0.5.2
|
||||||
cupertino_icons: ^1.0.6
|
cupertino_icons: ^1.0.8
|
||||||
flutter_form_builder: ^9.1.1
|
|
||||||
enough_platform_widgets: ^1.0.0
|
enough_platform_widgets: ^1.0.0
|
||||||
|
flutter_form_builder: ^9.2.1
|
||||||
|
gap: ^3.0.1
|
||||||
|
|
||||||
# Utils
|
# Utils
|
||||||
flutter_screenutil: ^5.9.0
|
flutter_screenutil: ^5.9.0
|
||||||
flutter_svg: ^2.0.9
|
flutter_svg: ^2.0.10+1
|
||||||
form_builder_validators: ^9.1.0
|
form_builder_validators: ^9.1.0
|
||||||
go_router: ^12.1.1
|
go_router: ^14.0.1
|
||||||
intl: ^0.18.1
|
intl: ^0.18.1
|
||||||
intl_utils: ^2.8.5
|
intl_utils: ^2.8.5
|
||||||
|
|
||||||
# Data
|
# Data
|
||||||
envied: ^0.5.2
|
envied: ^0.5.4+1
|
||||||
fpdart: ^1.1.0
|
fpdart: ^1.1.0
|
||||||
hive: ^2.2.3
|
hive: ^2.2.3
|
||||||
hive_flutter: ^1.1.0
|
hive_flutter: ^1.1.0
|
||||||
json_annotation: ^4.8.1
|
json_annotation: ^4.9.0
|
||||||
json_serializable: ^6.7.1
|
json_serializable: ^6.8.0
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
dio: ^5.3.4
|
dio: ^5.4.3+1
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
talker: ^3.1.4
|
talker: ^3.1.4
|
||||||
|
@ -55,7 +58,8 @@ dependencies:
|
||||||
# State management
|
# State management
|
||||||
equatable: ^2.0.5
|
equatable: ^2.0.5
|
||||||
informers: ^0.0.3+1
|
informers: ^0.0.3+1
|
||||||
provider: ^6.1.1
|
provider: ^6.1.2
|
||||||
|
veto: ^0.0.10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,12 +68,13 @@ dependencies:
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
# Generators
|
# Generators
|
||||||
build_runner: ^2.4.6
|
build_runner: ^2.4.9
|
||||||
envied_generator: ^0.5.2
|
envied_generator: ^0.5.4+1
|
||||||
|
hive_generator: ^2.0.1
|
||||||
|
|
||||||
# Analysis
|
# Analysis
|
||||||
analyzer: ^5.13.0
|
analyzer: ^6.4.1
|
||||||
flutter_lints: ^3.0.1
|
flutter_lints: ^3.0.2
|
||||||
very_good_analysis: ^5.1.0
|
very_good_analysis: ^5.1.0
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
@ -77,17 +82,19 @@ dev_dependencies:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
faker: ^2.1.0
|
faker: ^2.1.0
|
||||||
gherkin_unit_test: ^0.0.5
|
gherkin_unit_test: ^0.0.5
|
||||||
mockito: ^5.4.3
|
mockito: ^5.4.4
|
||||||
|
|
||||||
|
|
||||||
# Bundling
|
# Bundling
|
||||||
#dart run dependency_validator
|
#dart run dependency_validator
|
||||||
dependency_validator: ^3.2.3
|
dependency_validator: ^3.2.3
|
||||||
#dart run dart_code_metrics:metrics check-unused-files lib
|
#dart run dart_code_metrics:metrics check-unused-files lib --disable-sunset-warning
|
||||||
# dart_code_metrics: ^5.6.0
|
# dart_code_metrics: ^5.6.0
|
||||||
flutter_flavorizr: ^2.2.1
|
flutter_flavorizr: ^2.2.3
|
||||||
flutter_native_splash: ^2.3.6
|
#dart run flutter_launcher_icons:main -f flutter_launcher_icons*
|
||||||
flutter_launcher_icons: ^0.13.1
|
flutter_launcher_icons: ^0.13.1
|
||||||
|
#dart run flutter_native_splash:create --flavors develop,prod
|
||||||
|
flutter_native_splash: ^2.4.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue