Fakultas Ilmu Komputer UI

Commit 2a5478a8 authored by Agnes Handoko's avatar Agnes Handoko
Browse files

Merge branch 'dev-agnes' into 'PBI-7-informasi_layanan_khusus_disabilitas'

Menyelesaikan PBI-7 Informasi Sekolah dengan Dukungan Disabilitas

See merge request !41
parents 8716b357 23def66f
Pipeline #41045 passed with stages
in 8 minutes and 55 seconds
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"path_provider","dependencies":[]}]}
\ No newline at end of file
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"google_maps_flutter","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"sqflite","dependencies":[]}]}
\ No newline at end of file
......@@ -287,3 +287,7 @@ modules.xml
.venv/
# End of https://www.gitignore.io/api/linux,django,python,pycharm+all
tests.output
.flutter-plugins-dependencies
stages:
- lint
- test
- sonarqube
- deploy
- show
variables:
APP_NAME: "bisaGo"
before_script:
- export PATH=$PATH:/sdk/android-sdk-linux/platform-tools/
- echo flutter.sdk=/sdk/flutter > android/local.properties
- flutter pub get
image: michael09/flutter:latest
Lint:
stage: lint
script:
- flutter analyze
Test:
stage: test
image: jro7/flutter_lcov
script:
- echo Testing $APP_NAME
- flutter doctor -v
- flutter test --coverage
- flutter test --machine > tests.output
- lcov --summary coverage/lcov.info
- genhtml coverage/lcov.info --output=coverage
coverage: '/lines......: \d+\.\d+\%/'
artifacts:
name: mobile-coverage
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/coverage
- coverage/lcov.info
- tests.output
Sonarqube:
dependencies:
- Test
stage: sonarqube
before_script:
- export PATH=$PATH:/sdk/flutter/bin/cache/dart-sdk/bin
- flutter pub get
script:
- sonar-scanner -Dsonar.login=$SONARQUBE_TOKEN -Dsonar.branch.name=$CI_COMMIT_REF_NAME -Dsonar.projectKey=$SONARQUBE_PROJECT_KEY -X
DeployToProduction:
......@@ -61,7 +81,7 @@ DeployToStaging:
refs:
- staging
before_script:
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.7-stable.tar.xz && tar xf flutter.tar.xz -C /
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.8-stable.tar.xz && tar xf flutter.tar.xz -C /
- export PATH=$PATH:/flutter/bin
- apt-get update && apt-get install gnupg -y
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt-get install -y nodejs
......@@ -87,7 +107,7 @@ DeployToDevelopment:
refs:
- /^US-.*$/
before_script:
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.7-stable.tar.xz && tar xf flutter.tar.xz -C /
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.8-stable.tar.xz && tar xf flutter.tar.xz -C /
- export PATH=$PATH:/flutter/bin
- apt-get update && apt-get install gnupg -y
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt-get install -y nodejs
......@@ -100,18 +120,4 @@ DeployToDevelopment:
- appcenter login --token=$APPCENTER_API_TOKEN
- appcenter distribute release -f build/app/outputs/apk/release/app-release.apk --app $APPCENTER_APP_NAME_DEV --group $APPCENTER_GROUP_TARGET
environment:
name: development
ShowCoverage:
image: alpine
stage: show
dependencies:
- Test
script:
- mkdir -p mobile-coverage/
- mv coverage/* mobile-coverage/
artifacts:
paths:
- $CI_PROJECT_DIR/mobile-coverage/
\ No newline at end of file
name: development
\ No newline at end of file
# PPLapangan Tembak & PoiPoLe - DTB Layanan Siswa Disabilitas (Front End)
# PPLapangan Tembak & PoiPoLe - DTB Layanan Siswa Disabilitas (Front End) - bisaGo
Code Coverage
--------------
[![coverage report](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/dtb-beasiswa-miskin-dan-disabilitas/pplapangan-tembak-dtb-layanan-siswa-disabilitas/badges/staging/coverage.svg)](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/dtb-beasiswa-miskin-dan-disabilitas/pplapangan-tembak-dtb-layanan-siswa-disabilitas/commits/staging)
[![coverage report](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/dtb-beasiswa-miskin-dan-disabilitas/pplapangan-tembak-dtb-layanan-siswa-disabilitas/badges/staging/coverage.svg?job=Test)](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/dtb-beasiswa-miskin-dan-disabilitas/pplapangan-tembak-dtb-layanan-siswa-disabilitas/commits/staging)
>bisaGo is a mobile application made with Flutter and Django REST API to gather information from users about disability friendly facilities.
## Developers
PPLapanganTembak
1. [Adzkia Aisyah Afrah Hardian](https://gitlab.cs.ui.ac.id/adzkia.aisyah)
2. [Agnes Handoko](https://gitlab.cs.ui.ac.id/agneshandoko)
3. [Fakhira Devina](https://gitlab.cs.ui.ac.id/hiradevina)
4. [Faza Siti Sabira Prakoso](https://gitlab.cs.ui.ac.id/fazasabirappl)
5. [Firriyal bin Yahya](https://gitlab.cs.ui.ac.id/feriyalbinyahya)
PoiPoLeGan
1. [Bimo Iman Smartadi](https://gitlab.cs.ui.ac.id/bimo.iman)
2. [Bayukanta Iqbal Gunawan](https://gitlab.cs.ui.ac.id/Bayukanta)
3. [Dzaky Noor Hasyim](https://gitlab.cs.ui.ac.id/NoorHasyim)
4. [Muhammad Abdurrahman](https://gitlab.cs.ui.ac.id/muhammad.abdurrahman71)
5. [Usman Sidiq](https://gitlab.cs.ui.ac.id/usman.sidiq71)
## Table of Content
* Install
* Running Development Mode
## Install
The front end side uses Flutter, for installing please head to the [official documentation of Flutter](https://flutter.dev/docs/get-started/install)
Make sure you already installed everything to work with Flutter with command:
```bash
flutter doctor -v
```
Install all the package dependencies in `pubspec.yaml`
```bash
flutter pub get
```
Get your [Maps API Key](https://developers.google.com/maps/documentation/android-sdk/get-api-key) and put the key on `android/local.properties`
```bash
MAPS_API_KEY=Bu***************
```
## Running Development Mode
Run the app using the development flavor
```bash
flutter run -t lib/main_dev.dart
```
## Building Models with JsonSerializable
Jadi abis get dari API, jsonnya di map ke models biar rapih.
1. Tulis ada field apa aja dari jsonnya (bisa liat contoh yang di models/lokasi.dart)
2. bagian 'part of {nama models}.g.dart' itu harus ditulis di model yg mau dibuat. di awal emang merah, tapi biarin aja
3. kalo semua field udah di tulis, run
```bash
flutter pub run build_runner build
```
4. nanti akan ke build file {nama models}.g.dart, yang di nomor 2 merah harusnya udah gak merah lagi
## Passing Data with BLoC
Udah ada contohnya di /bloc (implementasi di screen nya ada di page/pencarian/pencarian.dart)
Bisa baca [disini]https://itnext.io/flutter-handling-your-network-api-calls-like-a-boss-936eef296547 sebagai panduannya
\ No newline at end of file
include: package:pedantic/analysis_options.yaml
analyzer:
exclude:
- "**/*.g.dart"
\ No newline at end of file
......@@ -21,9 +21,13 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def localPropertyApiToken = localProperties.getProperty("MAPS_API_KEY")
def systemEnvApiToken = System.getenv('MAPS_API_KEY')
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def MAPS_API_KEY = localPropertyApiToken != null ? localPropertyApiToken : systemEnvApiToken
android {
compileSdkVersion 28
......@@ -44,12 +48,13 @@ android {
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [MAPS_API_KEY: MAPS_API_KEY]
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
// Signing with the debug keys for now, so flutter run --release works.
signingConfig signingConfigs.debug
}
}
......@@ -64,4 +69,4 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
}
\ No newline at end of file
......@@ -4,4 +4,5 @@
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>
......@@ -8,7 +8,7 @@
<application
android:name="io.flutter.app.FlutterApplication"
android:label="ppl_disabilitas"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/launcher_icon">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
......@@ -26,5 +26,7 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="${MAPS_API_KEY}"/>
</application>
</manifest>
......@@ -8,6 +8,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
}
}
......@@ -17,7 +18,6 @@ allprojects {
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
......@@ -28,4 +28,4 @@ subprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}
}
\ No newline at end of file
......@@ -2,3 +2,6 @@ org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M
......@@ -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-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment