Skip to content

Feature/update dependencies #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.10.6"
"flutter": "3.24.0"
}
3 changes: 1 addition & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ analyzer:
missing_required_param: error
missing_return: error
todo: ignore
sdk_version_async_exported_from_core: ignore
language:
strict-casts: true
strict-raw-types: false
exclude:
- '**.g.dart'
- '**.config.dart'
- '**.get_x_navigator.dart'
- '**.navigator.dart'
- '**.mocks.dart'
- 'lib/util/license.dart'
- 'test/coverage_helper_test.dart'
Expand Down
29 changes: 12 additions & 17 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
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 localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -20,13 +23,9 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
buildToolsVersion "30.0.0"
compileSdkVersion 33
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -39,8 +38,8 @@ android {

defaultConfig {
applicationId "com.icapps.fluttertemplate"
minSdkVersion 19
targetSdkVersion 33
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down Expand Up @@ -101,11 +100,7 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
}
46 changes: 46 additions & 0 deletions android/app/src/dev/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"project_info": {
"project_number": "1069057990956",
"project_id": "flutter-template-test-icapps",
"storage_bucket": "flutter-template-test-icapps.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1069057990956:android:81b51da181c6cb72874c89",
"android_client_info": {
"package_name": "com.icapps.fluttertemplate.debug"
}
},
"oauth_client": [
{
"client_id": "1069057990956-gbsuui1psb4pglp7np7pn00m1kmlct5l.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDEfgZmT70q2hzVES52LqrJ_1Cuyk1FqiY"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1069057990956-gbsuui1psb4pglp7np7pn00m1kmlct5l.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "1069057990956-9s44un9t9pr80akbt9rmol22bjej1s17.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.icapps.fluttertemplate.dev"
}
}
]
}
}
}
],
"configuration_version": "1"
}
15 changes: 0 additions & 15 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.0'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
}
}

allprojects {
repositories {
google()
Expand Down
32 changes: 22 additions & 10 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
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
}()

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
repositories {
google()
jcenter()
gradlePluginPortal()
}
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
id "com.google.gms.google-services"version "4.3.8" apply false
id "com.google.firebase.crashlytics" version "2.9.9" apply false
}

include ":app"
24 changes: 15 additions & 9 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
global_options:
flutter_navigation_generator:flutter_navigator_builder:
runs_before:
- mockito|mockBuilder

targets:
$default:
builders:
flutter_navigation_generator:flutter_route_builder:
generate_for:
include:
- lib/screen/**.dart
flutter_navigation_generator:flutter_navigator_builder:
generate_for:
include:
- lib/navigator/main_navigator.dart
drift_dev:
generate_for:
include:
- lib/database/**.dart
- lib/model/database/**.dart
# Should be removed in the future
retrofit_generator|retrofit:
enabled: true
Expand All @@ -24,12 +38,4 @@ targets:
injectable_generator:injectable_config_builder:
generate_for:
include:
- lib/di/injectable.dart
flutter_navigation_generator:flutter_route_builder:
generate_for:
include:
- lib/screen/**.dart
flutter_navigation_generator:flutter_navigator_builder:
generate_for:
include:
- lib/navigator/main_navigator.dart
- lib/di/injectable.dart
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Loading
Loading