Fakultas Ilmu Komputer UI

Commit 501de49c authored by Wulan Mantiri's avatar Wulan Mantiri
Browse files

[CHORES] Fix apk build error

parent a53e6c38
......@@ -34,14 +34,14 @@ sonar-scanner:
-Dsonar.branch.name=$CI_COMMIT_REF_NAME
-Dsonar.projectKey=$SONARQUBE_PROJECT_KEY
build:
android:
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"
......
......@@ -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}") {
......
......@@ -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.** { *; }
......@@ -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;
......
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)
......
import 'react-native-gesture-handler';
import { AppRegistry } from 'react-native';
import App from './src/app';
import { name as appName } from './app.json';
......
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,28 +14,26 @@ const Stack = createStackNavigator();
const App: FC = () => {
return (
<SafeAreaProvider>
<ThemeProvider theme={theme}>
<NavigationContainer>
<Stack.Navigator
initialRouteName={ROUTES.initial}
screenOptions={screenOptions}>
{navigation.map((nav, i) => (
<Stack.Screen
key={`nav${i}`}
name={nav.name}
component={nav.component}
options={{
title: nav.header,
headerShown: Boolean(nav.header),
}}
/>
))}
</Stack.Navigator>
</NavigationContainer>
<Toast config={toastConfig} ref={Toast.setRef} />
</ThemeProvider>
</SafeAreaProvider>
<ThemeProvider theme={theme}>
<NavigationContainer>
<Stack.Navigator
initialRouteName={ROUTES.initial}
screenOptions={screenOptions}>
{navigation.map((nav, i) => (
<Stack.Screen
key={`nav${i}`}
name={nav.name}
component={nav.component}
options={{
title: nav.header,
headerShown: Boolean(nav.header),
}}
/>
))}
</Stack.Navigator>
</NavigationContainer>
<Toast config={toastConfig} ref={Toast.setRef} />
</ThemeProvider>
);
};
......
Markdown is supported
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