Skip to content
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

Update project #85

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@ android/app/google-services.json
android/local_maps.properties

#.env file
.env
*.env

#Firebase options file
lib/firebase_options.dart
39 changes: 37 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,42 @@
# This file should be version controlled and should not be manually edited.

version:
revision: d79295af24c3ed621c33713ecda14ad196fd9c31
channel: stable
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: android
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: ios
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: linux
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: macos
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: web
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: windows
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
17 changes: 0 additions & 17 deletions android/.project

This file was deleted.

6 changes: 3 additions & 3 deletions android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
arguments=
auto.sync=false
arguments=--init-script /var/folders/20/lrk1001d3v34wc_th8z_vgph0000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/20/lrk1001d3v34wc_th8z_vgph0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
auto.sync=true
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/usr/lib/jvm/java-11-openjdk-amd64
java.home=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
Expand Down
123 changes: 52 additions & 71 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,94 +1,75 @@
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.")
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
id "com.google.gms.google-services"
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
// Carregar variáveis do arquivo .env
def dotenvPropertiesFile = rootProject.file('.env')
if (dotenvPropertiesFile.exists()) {
dotenvPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def mapsProperties = new Properties()
def localMapsPropertiesFile = rootProject.file('local_maps.properties')
if (localMapsPropertiesFile.exists()) {
project.logger.info('Load maps properties from local file')
localMapsPropertiesFile.withReader('UTF-8') { reader ->
mapsProperties.load(reader)
}
} else {
project.logger.info('Load maps properties from environment')
try {
mapsProperties['MAPS_API_KEY'] = System.getenv('MAPS_API_KEY')
} catch(NullPointerException e) {
project.logger.warn('Failed to load MAPS_API_KEY from environment.', e)
}
}
def mapsApiKey = mapsProperties.getProperty('MAPS_API_KEY')
if(mapsApiKey == null){
mapsApiKey = ""
project.logger.error('Google Maps Api Key not configured. Set it in `local_maps.properties` or in the environment variable `MAPS_API_KEY`')
// Obter a chave da API do Maps do local.properties ou .env
def mapsApiKey = localProperties.getProperty('MAPS_API_KEY')
if (mapsApiKey == null) {
throw new GradleException("MAPS_API_KEY not found. Please define it in your .env or local.properties file.")
}


apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def flutterVersionCode = localProperties.getProperty('flutter.versionCode', '1')
def flutterVersionName = localProperties.getProperty('flutter.versionName', '1.0')

android {

compileSdkVersion 31
namespace 'com.zenithaerospace.monitor'

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
compileSdkVersion 34
ndkVersion "25.2.9519653"

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
applicationId "com.zenithaerospace.monitor"
minSdkVersion 23
targetSdkVersion 31
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
manifestPlaceholders = [MAPS_API_KEY: mapsApiKey]
}

applicationId "com.zenithaerospace.monitor"
minSdkVersion 21
targetSdkVersion 31
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
manifestPlaceholders = [MAPS_API_KEY: mapsApiKey]
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

flutter {
source '../..'
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:28.4.1')
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.android.support:multidex:1.0.3'
implementation platform('com.google.firebase:firebase-bom:33.1.2')
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.android.support:multidex:1.0.3'
}
48 changes: 0 additions & 48 deletions android/app/google-services.json

This file was deleted.

1 change: 1 addition & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class com.lib.flutter_blue_plus.* { *; }
Loading
Loading