Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2021
Kelas D
PT Gizi Sehat - Dietela
Dietela Mobile
Commits
501de49c
Commit
501de49c
authored
Mar 30, 2021
by
Wulan Mantiri
Browse files
[CHORES] Fix apk build error
parent
a53e6c38
Changes
7
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
501de49c
...
...
@@ -34,14 +34,14 @@ sonar-scanner:
-Dsonar.branch.name=$CI_COMMIT_REF_NAME
-Dsonar.projectKey=$SONARQUBE_PROJECT_KEY
buil
d
:
androi
d
:
stage
:
build
before_script
:
-
yarn install
-
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
script
:
-
cd android
-
chmod +x gradlew && ./gradlew assembleRelease
-
chmod +x gradlew && ./gradlew
clean && ./gradlew
assembleRelease
-
cd .. && cp android/app/build/outputs/apk/release/app-release.apk $CI_PROJECT_NAME-$CI_COMMIT_REF_NAME.apk
artifacts
:
name
:
"
$CI_PROJECT_NAME-$CI_COMMIT_REF_NAME"
...
...
android/app/build.gradle
View file @
501de49c
...
...
@@ -78,7 +78,8 @@ import com.android.build.OutputFile
*/
project
.
ext
.
react
=
[
enableHermes:
false
,
// clean and rebuild if changing
entryFile:
"index.js"
,
enableHermes:
true
,
// clean and rebuild if changing
]
apply
from:
"../../node_modules/react-native/react.gradle"
...
...
@@ -186,6 +187,7 @@ dependencies {
//noinspection GradleDynamicVersion
implementation
"com.facebook.react:react-native:+"
// From node_modules
implementation
"androidx.appcompat:appcompat:1.1.0"
implementation
"androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation
(
"com.facebook.flipper:flipper:${FLIPPER_VERSION}"
)
{
...
...
android/app/proguard-rules.pro
View file @
501de49c
...
...
@@ -8,3 +8,6 @@
#
http
://
developer
.
android
.
com
/
guide
/
developing
/
tools
/
proguard
.
html
#
Add
any
project
specific
keep
options
here
:
-
keep
class
com
.
facebook
.
hermes
.
unicode
.
**
{
*
;
}
-
keep
class
com
.
facebook
.
jni
.
**
{
*
;
}
android/app/src/main/java/com/dietela_mobile/MainApplication.java
View file @
501de49c
...
...
@@ -5,7 +5,6 @@ import android.content.Context;
import
com.facebook.react.PackageList
;
import
com.facebook.react.ReactApplication
;
import
com.reactnativecommunity.asyncstorage.AsyncStoragePackage
;
import
com.th3rdwave.safeareacontext.SafeAreaContextPackage
;
import
com.oblador.vectoricons.VectorIconsPackage
;
import
com.facebook.react.ReactInstanceManager
;
import
com.facebook.react.ReactNativeHost
;
...
...
android/settings.gradle
View file @
501de49c
rootProject
.
name
=
'dietela_mobile'
include
':@react-native-community_async-storage'
project
(
':@react-native-community_async-storage'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/@react-native-community/async-storage/android'
)
include
':react-native-safe-area-context'
project
(
':react-native-safe-area-context'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/react-native-safe-area-context/android'
)
include
':react-native-vector-icons'
project
(
':react-native-vector-icons'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/react-native-vector-icons/android'
)
apply
from:
file
(
"../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"
);
applyNativeModulesSettingsGradle
(
settings
)
...
...
index.js
View file @
501de49c
import
'
react-native-gesture-handler
'
;
import
{
AppRegistry
}
from
'
react-native
'
;
import
App
from
'
./src/app
'
;
import
{
name
as
appName
}
from
'
./app.json
'
;
...
...
src/app/index.tsx
View file @
501de49c
import
'
react-native-gesture-handler
'
;
import
React
,
{
FC
}
from
'
react
'
;
import
{
NavigationContainer
}
from
'
@react-navigation/native
'
;
import
{
createStackNavigator
}
from
'
@react-navigation/stack
'
;
import
{
ThemeProvider
}
from
'
react-native-elements
'
;
import
{
SafeAreaProvider
}
from
'
react-native-safe-area-context
'
;
import
Toast
from
'
react-native-toast-message
'
;
import
*
as
ROUTES
from
'
constants/routes
'
;
...
...
@@ -16,7 +14,6 @@ const Stack = createStackNavigator();
const
App
:
FC
=
()
=>
{
return
(
<
SafeAreaProvider
>
<
ThemeProvider
theme
=
{
theme
}
>
<
NavigationContainer
>
<
Stack
.
Navigator
...
...
@@ -37,7 +34,6 @@ const App: FC = () => {
</
NavigationContainer
>
<
Toast
config
=
{
toastConfig
}
ref
=
{
Toast
.
setRef
}
/>
</
ThemeProvider
>
</
SafeAreaProvider
>
);
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment