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

Upgrade Dependencies to Run on Flutter >= 3.10 #31

Merged
merged 15 commits into from
Aug 22, 2023
Merged
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BASE_URL_DEV =
BASE_URL_PROD =
BASE_URL_DEV = <your url>
BASE_URL_PROD = ""
2 changes: 1 addition & 1 deletion .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: subosito/flutter-action@v1
with:
channel: "stable"
flutter-version: '3.0.5'
flutter-version: '3.10.5'
- run: |
flutter doctor
flutter pub get
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/firebase-hosting-production-pull-request.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/firebase-hosting-pull-request.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ This document briefly describes some guidance on how you can contribute to this

1. **[lib/main_development.dart](lib/main_development.dart)**: The entry of Project.

## PR

Please PR on the development branch first :smile:

While creating PR, below materials could be helpful:

* [Effective Dart](https://www.dartlang.org/guides/language/effective-dart)
Expand Down
46 changes: 21 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 👨‍💻 Ulas Kelas
[![Generic badge](https://img.shields.io/badge/Flutter-v3.0.5-blue)](https://flutter.dev/docs)
[![Generic badge](https://img.shields.io/badge/Dart-v2.13.4-blue)](https://dart.dev/guides)
[![Generic badge](https://img.shields.io/badge/Flutter-v3.10.5-blue)](https://flutter.dev/docs)
[![Generic badge](https://img.shields.io/badge/Dart-v3.0.6-blue)](https://dart.dev/guides)
[![test](https://github.com/RistekCSUI/ulaskelas-frontend/actions/workflows/config.yml/badge.svg)](https://github.com/RistekCSUI/ulaskelas-frontend/actions/workflows/config.yml)
[![Deploy Web](https://github.com/RistekCSUI/ulaskelas-frontend/actions/workflows/firebase-hosting-merge.yml/badge.svg)](https://github.com/RistekCSUI/ulaskelas-frontend/actions/workflows/firebase-hosting-merge.yml)
[![codecov](https://codecov.io/gh/RistekCSUI/ulaskelas-frontend/branch/main/graph/badge.svg?token=SHFALBJG9U)](https://codecov.io/gh/RistekCSUI/ulaskelas-frontend)
Expand All @@ -12,38 +12,34 @@ Ulas Kelas app

## ⚡️ Getting Started

### 🚚 How to run, drive, and build Apk
### 🚚 How to run

Example how to run release development app
Make sure you have [Backend](https://github.com/ristekoss/ulaskelas-backend) running on your local's

Update .env.example with your local's url, for example:
```
flutter clean
flutter pub get
flutter run -t lib/main_development.dart --release --flavor development
BASE_URL_DEV = localhost:3000
BASE_URL_PROD = ""
```

Example how to build release development app
Add key.properties to /android
```
flutter clean
flutter pub get
flutter build apk -t lib/main_development.dart --release --no-shrink --flavor development --split-per-abi
storePassword=<storePassword>
storePasswordDevelopment=<storePasswordDevelopment>
keyPassword=<keyPassword>
keyPasswordDevelopment=<keyPasswordDevelopment>
keyAlias=<keyAlias>
keyAliasDevelopment=<keyAliasDevelopment>
storeFile=<storeFile>
storeFileDevelopment=<storeFileDevelopment>
```

Example how to build bundle release production app
Example how to run development app
```
flutter clean
flutter pub get
flutter build appbundle -t lib/main_production.dart --release --no-shrink --flavor production
```

Example how to run flutter web app
```
flutter run -t lib/main_development.dart -d chrome
```

Example how to drive automation test on development environment
note that automation test doesn't support release mode
```
flutter drive -t test_driver/app.dart --flavor development
flutter pub run build_runner build --delete-conflicting-outputs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
flutter pub run build_runner build --delete-conflicting-outputs
dart run build_runner build --delete-conflicting-outputs

flutter run -t lib/main_development.dart --flavor development
```

### ⚙️ Supported Flavor
Expand Down Expand Up @@ -112,7 +108,7 @@ examples:
feat: Form Login
ci: refactor analysis job

before push
### before push
1. flutter analyze
2. flutter test

Expand Down
10 changes: 5 additions & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: package:very_good_analysis/analysis_options.2.4.0.yaml
include: package:very_good_analysis/analysis_options.5.0.0.yaml

analyzer:
# We should disable linter for generated code
Expand All @@ -9,13 +9,13 @@ analyzer:
- lib/**/*.freezed.dart
- test/**/*.mocks.dart

strong-mode:
implicit-casts: true
implicit-dynamic: true

errors:
# Allow having TODOs in the code.
todo: ignore
language:
strict-casts: false
strict-inference: false
strict-raw-types: false

# LINTER Preferences
#
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (keystorePropertiesFile.exists()) {
}

android {
compileSdkVersion 31
compileSdkVersion 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
buildscript {
ext.kotlin_version = '1.5.10'
ext.kotlin_version = '1.8.20'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
5 changes: 2 additions & 3 deletions lib/app.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
// Created by Muhamad Fauzi Ridwan on 23/08/21.

import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
import 'package:states_rebuilder/states_rebuilder.dart';
import 'package:ulaskelas/app_wrapper.dart';
import 'package:ulaskelas/core/bases/states/_states.dart';
import 'package:ulaskelas/core/constants/_constants.dart';

FirebaseAnalytics analytics = FirebaseAnalytics();
FirebaseAnalytics analytics = FirebaseAnalytics.instance;

class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
const App({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/app_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'package:ulaskelas/services/versioning/check_version.dart';
import 'core/environment/_environment.dart';

class AppWrapper extends StatefulWidget {
const AppWrapper({Key? key}) : super(key: key);
const AppWrapper({super.key});

@override
_AppWrapperState createState() => _AppWrapperState();
Expand Down
2 changes: 1 addition & 1 deletion lib/authentication_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'core/constants/_constants.dart';
import 'core/theme/_theme.dart';

class AuthenticationPage extends StatelessWidget {
const AuthenticationPage({Key? key}) : super(key: key);
const AuthenticationPage({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/core/bases/states/auth_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class AuthState {
path: '/static.html',
);

final url = '${Endpoints.sso}/?redirect_url=${redirectUri.toString()}';
final url = '${Endpoints.sso}/?redirect_url=$redirectUri';
Logger().w(Uri.parse(url).query);

Logger().w(redirectUri.toString());
Expand Down
Loading
Loading