Fakultas Ilmu Komputer UI

Commit 0d82d7a6 authored by fazasabira's avatar fazasabira
Browse files

[GREEN] all tests passed

parents 05427f6f 2445b063
Pipeline #32033 passed with stages
in 2 minutes and 58 seconds
{"_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":"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":[]}]}
\ No newline at end of file
stages:
- lint
- test
- sonarqube
- deploy
- show
variables:
APP_NAME: "bisaGo"
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 --machine > tests.output
- flutter test --coverage
- lcov --summary coverage/lcov.info
- genhtml coverage/lcov.info --output=coverage
coverage: '/lines......: \d+\.\d+\%/'
artifacts:
name: mobile-coverage
paths:
- $CI_PROJECT_DIR/coverage
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
only:
- master
- staging
DeployToProduction:
......@@ -35,7 +53,6 @@ DeployToProduction:
refs:
- master
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 /
- 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
......@@ -61,7 +78,6 @@ 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 /
- 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 +103,6 @@ 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 /
- 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
......
......@@ -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,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}"
......
......@@ -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
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
end
generated_key_values
end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
......@@ -17,6 +17,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
A713680F956827CC800E5882 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 608DBD9F25B5A1E158194D12 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
......@@ -37,11 +38,14 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
27B4326A6F124C13099D180A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
608DBD9F25B5A1E158194D12 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
94561A220A1B4EFA7831E0FC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
......@@ -50,6 +54,7 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F7D6823AE5698B88142C285E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -59,12 +64,24 @@
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
A713680F956827CC800E5882 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
829932E47EADAEFD209551C7 /* Pods */ = {
isa = PBXGroup;
children = (
94561A220A1B4EFA7831E0FC /* Pods-Runner.debug.xcconfig */,
F7D6823AE5698B88142C285E /* Pods-Runner.release.xcconfig */,
27B4326A6F124C13099D180A /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
......@@ -84,6 +101,8 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
829932E47EADAEFD209551C7 /* Pods */,
F0491B426155A7C9E1ADB1A7 /* Frameworks */,
);
sourceTree = "<group>";
};
......@@ -118,6 +137,14 @@
name = "Supporting Files";
sourceTree = "<group>";
};
F0491B426155A7C9E1ADB1A7 /* Frameworks */ = {
isa = PBXGroup;
children = (
608DBD9F25B5A1E158194D12 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
......@@ -125,12 +152,15 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
45875E25277A3BB7443A1483 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
A6A877344DE185CEA8904842 /* [CP] Embed Pods Frameworks */,
17BFDE4BCED4D29A440D5CB6 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
......@@ -189,6 +219,21 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
17BFDE4BCED4D29A440D5CB6 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
......@@ -203,6 +248,28 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
45875E25277A3BB7443A1483 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
......@@ -217,6 +284,21 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
A6A877344DE185CEA8904842 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
......
......@@ -4,4 +4,7 @@
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/page/dashboard/dashboard.dart';
class BisaGo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'bisaGo',
theme: ThemeData(
fontFamily: 'Muli',
backgroundColor: Colors.white,
),
home: Dashboard(),
);
}
}
\ No newline at end of file
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/config/styles.dart';
class BisaGoAppBar extends StatelessWidget implements PreferredSizeWidget {
@override
final Size preferredSize = Size.fromHeight(55);
@override
Widget build(BuildContext context) {
return AppBar(
elevation: 15,
centerTitle: true,
backgroundColor: greenPrimary,
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
"bisaGo",
style: TextStyle(
fontSize: 25,
fontFamily: 'Comfortaa',
fontWeight: FontWeight.w800),
),
],
),
);
}
}
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/config/styles.dart';
class BisaGoDrawer extends StatelessWidget {
final List<Map<String, dynamic>> drawerList = [
{'title': 'Beranda', 'icon': Icons.home},
{'title': 'Riwayat Pencarian', 'icon': Icons.history},
{'title': 'Tentang Aplikasi', 'icon': Icons.info},
{'title': 'Log out', 'icon': Icons.keyboard_backspace}
];
@override
Widget build(BuildContext context) {
List<Widget> menus = drawerList.map((menu) {
return _createListTile(
context: context, icon: menu['icon'], title: menu['title']);
}).toList();
List<Widget> drawerItem = [
Container(
height: 130,
child: DrawerHeader(
decoration: BoxDecoration(
color: greenPrimary,
),
child: Row(
children: <Widget>[
FloatingActionButton(
backgroundColor: Colors.white,
elevation: 0,
onPressed: () => {},
),
Padding(
padding: EdgeInsets.all(doubleSpace),
child: Text(
'Nama Orang',
style: TextStyle(
fontSize: 20,
color: Colors.white,
fontFamily: 'Muli',
),
),
),
],
),
),
),
Container(
decoration:
BoxDecoration(border: Border(top: BorderSide(color: Colors.white))),
),
];
menus.forEach((menu) {
drawerItem.add(menu);
});
return Theme(
data: Theme.of(context).copyWith(
canvasColor: greenPrimary,
),
child: Drawer(
child: ListView(padding: EdgeInsets.zero, children: drawerItem),
),
);
}
Widget _createListTile({BuildContext context, IconData icon, String title}) {
return Container(
child: ListTile(
leading: Icon(
icon,
color: Colors.white,
size: 30,
),
title: Text(
title,
style: TextStyle(
fontSize: 20,
color: Colors.white,
fontFamily: 'Muli',
),
),
onTap: () {
Navigator.pop(context);
},
),
decoration: new BoxDecoration(
color: greenPrimary,
border: new Border(
bottom: new BorderSide(color: Colors.white),
),
),
);
}
}
// Frequently used strings are stored here
// No hardcoding string view files. Store here.
final String DEV_BASE_URL = "poipole.herokuapp.com";
final String BASE_URL = "poipole.herokuapp.com";
String KEY = "";
String CSRF = "";
String SESSION_ID = "";
final String devBaseURL = "poipole.herokuapp.com";
final String baseURL = "poipole.herokuapp.com";
String key = "";
String csrf = "";
String sessionID = "";
setKey(String key) {
KEY = key;
key = key;
}
setSessionId(String sessionId) {
SESSION_ID = sessionId;
sessionID = sessionId;
}
\ No newline at end of file
import 'package:flutter/material.dart';
final Color greenPrimary = Color(0xff3A903A);
final Color redPrimary = Color(0xffC60000);
final Color bluePrimary = Color(0xff537AC6);
final double smallSpace = 4.0;
final double regularSpace = 8.0;
final double doubleSpace = 16.0;
final double tripleSpace = 32.0;
final double quartetSpace = 64.0;
final double spaceFourtyEight = 48.0;
final List<BoxShadow> regularShadow = [
BoxShadow(
blurRadius: 4,
color: Colors.black.withOpacity(0.25),
offset: Offset(0, 0))
];
final BorderRadius regularBorderRadius = BorderRadius.circular(10);
final BorderRadius doubleBorderRadius = BorderRadius.circular(20);
......@@ -7,9 +7,9 @@ class ApiFlavor {
static String getBaseUrl() {
if (ApiFlavor.flavor == BuildFlavor.development.toString()) {
return DEV_BASE_URL;
return devBaseURL;
} else {
return BASE_URL;
return baseURL;
}
}
......
Supports Markdown