Skip to content
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
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
ANDROID_MAP_API_KEY=
IOS_MAP_API_KEY=
HTTP_ENDPOINT=
WEBSOCKET_ENDPOINT=
1 change: 1 addition & 0 deletions .github/workflows/flutter-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{matrix.platform}}

steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
Expand Down
27 changes: 26 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ apply plugin: 'com.google.gms.google-services'
// END: FlutterFire Configuration
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply from: project(':flutter_config').projectDir.getPath() + "/dotenv.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
Expand All @@ -36,13 +35,28 @@ if (keystorePropertiesFile.exists()) {


android {
namespace "com.ccextractor.beaconmobile"
compileSdkVersion 34
buildToolsVersion '29.0.0'

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17' // Match the Java version
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

buildFeatures {
buildConfig true
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.ccextractor.beaconmobile"
Expand Down Expand Up @@ -79,7 +93,18 @@ flutter {
source '../..'
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

kotlin {
jvmToolchain(17)
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.android.support:multidex:1.0.3"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
}
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.ccextractor.beaconmobile.BuildConfig { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@ package com.ccextractor.beaconmobile

import android.content.res.Configuration
import androidx.annotation.NonNull
import cl.puntito.simple_pip_mode.PipCallbackHelper
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine

class MainActivity : FlutterActivity() {
private var callbackHelper = PipCallbackHelper()

override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
callbackHelper.configureFlutterEngine(flutterEngine)
}

override fun onPictureInPictureModeChanged(active: Boolean, newConfig: Configuration?) {
super.onPictureInPictureModeChanged(active, newConfig)
callbackHelper.onPictureInPictureModeChanged(active)
}
}
16 changes: 13 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.8.20'
ext.kotlin_version = '2.2.0'
repositories {
google()
jcenter()
Expand All @@ -9,7 +9,7 @@ buildscript {
// START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.3.15'
// END: FlutterFire Configuration
classpath 'com.android.tools.build:gradle:7.1.0'
classpath 'com.android.tools.build:gradle:8.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -35,17 +35,27 @@ subprojects {
buildToolsVersion '29.0.0'
}
}

// Fix namespace for geolocator_android
if (project.name == 'geolocator_android') {
project.android {
namespace 'com.baseflow.geolocator'
}
}


}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}

subprojects {
project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=false
kotlin.version=1.8.20
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
Binary file added images/icons/camp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/destination.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/forest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/location-marker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/rain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/wind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 11 additions & 7 deletions lib/config/enviornment_config.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
import 'dart:io';

import 'package:flutter_config/flutter_config.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';

class EnvironmentConfig {
static String? get httpEndpoint => FlutterConfig.get('HTTP_ENDPOINT');
static String? get httpEndpoint => dotenv.env['HTTP_ENDPOINT'];

static String? get websocketEndpoint =>
FlutterConfig.get('WEBSOCKET_ENDPOINT');
static String? get websocketEndpoint => dotenv.env['WEBSOCKET_ENDPOINT'];

static String? get googleMapApi {
if (Platform.isAndroid) {
return FlutterConfig.get('ANDROID_MAP_API_KEY');
return dotenv.env['ANDROID_MAP_API_KEY'];
}
return FlutterConfig.get('IOS_MAP_API_KEY');
return dotenv.env['IOS_MAP_API_KEY'];
}

static String? get geoApifyApiKey => dotenv.env['GEOAPIFY_API_KEY'];

static String? get openWeatherMapApiKey =>
dotenv.env['OPEN_WEATHER_MAP_API_KEY'];

static Future<void> loadEnvVariables() async {
await FlutterConfig.loadEnvVariables();
await dotenv.load(fileName: '.env');
}
}
4 changes: 2 additions & 2 deletions lib/config/graphql_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GraphQLConfig {
WebSocketLink? _webSocketLink;
static final HttpLink httpLink = HttpLink(
EnvironmentConfig.httpEndpoint ??
'https://beacon-backend-25.onrender.com/graphql',
'https://beacon-backend-0kpr.onrender.com/graphql',
);

Future<AuthLink> _loadAuthLink() async {
Expand All @@ -24,7 +24,7 @@ class GraphQLConfig {
await _getToken();
_webSocketLink = WebSocketLink(
EnvironmentConfig.websocketEndpoint ??
'ws://beacon-backend-25.onrender.com/graphql',
'wss://beacon-backend-0kpr.onrender.com/graphql',
config: SocketClientConfig(
autoReconnect: true,
initialPayload: {"Authorization": token},
Expand Down
5 changes: 1 addition & 4 deletions lib/config/local_notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ class LocalNotification {
const AndroidInitializationSettings initializationSettingsAndroid =
AndroidInitializationSettings('app_icon');
final DarwinInitializationSettings initializationSettingsIOS =
DarwinInitializationSettings(
onDidReceiveLocalNotification: (_, __, ___, ____) {}
// as Future<dynamic> Function(int, String?, String?, String?)?
);
DarwinInitializationSettings();
final InitializationSettings initializationSettings =
InitializationSettings(
android: initializationSettingsAndroid,
Expand Down
7 changes: 7 additions & 0 deletions lib/config/router/router.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import 'package:auto_route/auto_route.dart';
import 'package:beacon/domain/entities/group/group_entity.dart';
import 'package:beacon/presentation/auth/verfication_screen.dart';
import 'package:beacon/presentation/home/profile_screen.dart';
import 'package:beacon/presentation/splash/splash_screen.dart';
import 'package:beacon/presentation/home/home_screen.dart';
import 'package:flutter/material.dart';
import 'package:beacon/presentation/auth/auth_screen.dart';
import 'package:beacon/presentation/group/group_screen.dart';
import 'package:beacon/presentation/group/advance_options_screen.dart';
import 'package:beacon/presentation/hike/hike_screen.dart';
import 'package:beacon/domain/entities/beacon/beacon_entity.dart';
part 'router.gr.dart';
Expand All @@ -25,5 +27,10 @@ class AppRouter extends _$AppRouter {
AutoRoute(
page: VerificationScreenRoute.page,
),
AutoRoute(
page: ProfileScreenRoute.page,
),
AutoRoute(
page: AdvancedOptionsScreenRoute.page, path: '/advanced-options'),
];
}
Loading
Loading