Skip to content

Commit

Permalink
Merge pull request #1 from libscode/development
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
DeVoresyah committed Feb 26, 2020
2 parents 8fc2a5c + a800111 commit 7db27da
Show file tree
Hide file tree
Showing 14,188 changed files with 2,650,928 additions and 1,789 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions App/Containers/AboutScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class AboutScreen extends Component {
headerStyle: headerStyles.default,
headerTitleStyle: headerStyles.title,
headerTitle: "About Me",
headerLeft: <ArrowBack onPress={() => navigation.goBack() } />,
headerRight: <View />
headerTitleAlign: "center",
headerLeft: () => <ArrowBack onPress={() => navigation.goBack() } />,
}
}

Expand Down Expand Up @@ -223,7 +223,7 @@ class AboutScreen extends Component {

<Content style={{backgroundColor:Colors.muted}}>
<View style={styles.headerWrapper}>
<Image source={{ uri: 'https://i.imgur.com/r4S8tpr.jpg' }} style={styles.avatar} />
<Image source={{ uri: 'https://api.adorable.io/avatars/250/OpenCV.png' }} style={styles.avatar} />
<Text style={styles.nameLabel}>Your Name</Text>
</View>

Expand Down
1 change: 1 addition & 0 deletions App/Containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, { Component } from 'react'
import { Provider } from 'react-redux'
import RootContainer from './RootContainer'
import createStore from '../Redux'
import 'react-native-gesture-handler'

// create our store
const store = createStore()
Expand Down
4 changes: 2 additions & 2 deletions App/Containers/HomeScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Colors } from '../Themes'

class HomeScreen extends Component {
static navigationOptions = ({ navigation }) => ({
header: null
headerShown: false
})

constructor (props) {
Expand Down Expand Up @@ -133,7 +133,7 @@ class HomeScreen extends Component {
</TouchableOpacity>
</View>

<Image source={{ uri: 'https://i.imgur.com/r4S8tpr.jpg' }} style={styles.avatar} />
<Image source={{ uri: 'https://api.adorable.io/avatars/250/OpenCV.png' }} style={styles.avatar} />
</View>

<View style={{flex:1}}>
Expand Down
3 changes: 1 addition & 2 deletions App/Containers/SkillScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class SkillScreen extends Component {
headerStyle: headerStyles.default,
headerTitleStyle: headerStyles.title,
headerTitle: "",
headerLeft: <ArrowBack onPress={() => navigation.goBack() } />,
headerRight: <View />
headerLeft: () => <ArrowBack onPress={() => navigation.goBack() } />,
}
}

Expand Down
13 changes: 9 additions & 4 deletions App/Navigation/Styles/NavigationStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ export default StyleSheet.create({
default: {
borderBottomWidth: 0,
elevation: 0,
backgroundColor: Colors.primary
shadowOpacity: 0,
backgroundColor: Colors.primary,
},
title: {
fontFamily: Fonts.type.medium,
color: Colors.black,
textAlign: 'center',
alignSelf: 'center',
flex: 1,
// textAlign: 'center',
// alignItems: 'center',
// alignContent: 'center',
// justifyContent: 'center',
// alignSelf: 'center',
// flex: 1,
// flexDirection: 'row',
fontSize: 17,
},
})
2 changes: 1 addition & 1 deletion App/Themes/Fonts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const type = {
hello: 'SueEllenFrancisco-Regular',
hello: 'SueEllenFrancisco',
light: 'Montserrat-Light',
regular: 'Montserrat-Regular',
medium: 'Montserrat-Medium',
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 DeVoresyah ArEst
Copyright (c) 2019 OpenCV Project

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ open terminal and change directory to your desired folder, then:
$ git clone git@github.com:libscode/OpenCV.git YourAppName
$ cd YourAppName
$ yarn install
$ yarn run rm-git && npm run androidx
$ cd ios && pod install
```
## Run Your App
```
$ npx react-native run-android
$ npx react-native run-ios
```
## License
The code is available at [GitHub][home] under the [MIT license][license-url].
Expand Down
79 changes: 58 additions & 21 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import com.android.build.OutputFile
* // the entry file for bundle generation
* entryFile: "index.android.js",
*
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
* bundleCommand: "ram-bundle",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
Expand Down Expand Up @@ -73,7 +76,8 @@ import com.android.build.OutputFile
*/

project.ext.react = [
entryFile: "index.js"
entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"
Expand All @@ -86,13 +90,35 @@ apply from: "../../node_modules/react-native/react.gradle"
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = true
def enableSeparateBuildPerCPUArchitecture = false

/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false

/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'

/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);

android {
compileSdkVersion rootProject.ext.compileSdkVersion

Expand All @@ -108,54 +134,63 @@ android {
versionCode 1
versionName "1.0"
}
signingConfigs {
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk true // If true, also generate a universal APK
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}

}
}
}

dependencies {
implementation project(':react-native-svg')
implementation project(':react-native-i18n')
implementation project(':react-native-vector-icons')
implementation project(':react-native-gesture-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'

if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}

// Run this once to be able to run the application with BUCK
Expand All @@ -164,3 +199,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
Binary file added android/app/debug.keystore
Binary file not shown.
7 changes: 0 additions & 7 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,3 @@
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Empty file modified android/app/src/main/assets/fonts/AntDesign.ttf
100644 → 100755
Empty file.
Empty file modified android/app/src/main/assets/fonts/Entypo.ttf
100644 → 100755
Empty file.
Empty file modified android/app/src/main/assets/fonts/EvilIcons.ttf
100644 → 100755
Empty file.
Binary file modified android/app/src/main/assets/fonts/Feather.ttf
Binary file not shown.
Empty file modified android/app/src/main/assets/fonts/FontAwesome.ttf
100644 → 100755
Empty file.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf
100644 → 100755
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf
100644 → 100755
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf
100644 → 100755
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Fontisto.ttf
Binary file not shown.
Empty file modified android/app/src/main/assets/fonts/Foundation.ttf
100644 → 100755
Empty file.
Empty file modified android/app/src/main/assets/fonts/Ionicons.ttf
100644 → 100755
Empty file.
Binary file modified android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf
100644 → 100755
Binary file not shown.
Empty file modified android/app/src/main/assets/fonts/MaterialIcons.ttf
100644 → 100755
Empty file.
Binary file modified android/app/src/main/assets/fonts/Octicons.ttf
100644 → 100755
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Roboto.ttf
Binary file not shown.
Binary file not shown.
Empty file modified android/app/src/main/assets/fonts/SimpleLineIcons.ttf
100644 → 100755
Empty file.
Empty file modified android/app/src/main/assets/fonts/Zocial.ttf
100644 → 100755
Empty file.
Binary file not shown.
16 changes: 8 additions & 8 deletions android/app/src/main/java/com/opencv/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ protected ReactRootView createRootView() {
};
}

/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "OpenCV";
}
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "OpenCV";
}
}
77 changes: 49 additions & 28 deletions android/app/src/main/java/com/opencv/MainApplication.java
Original file line number Diff line number Diff line change
@@ -1,44 +1,38 @@
package com.opencv;

import android.app.Application;

import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.horcrux.svg.SvgPackage;
import com.AlexanderZaytsev.RNI18n.RNI18nPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}

@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new SvgPackage(),
new RNI18nPackage(),
new VectorIconsPackage(),
new RNGestureHandlerPackage()
);
}
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}

@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
protected String getJSMainModuleName() {
return "index";
}
};

@Override
public ReactNativeHost getReactNativeHost() {
Expand All @@ -49,5 +43,32 @@ public ReactNativeHost getReactNativeHost() {
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this); // Remove this line if you don't want Flipper enabled
}

/**
* Loads Flipper in React Native templates.
*
* @param context
*/
private static void initializeFlipper(Context context) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
}
Loading

0 comments on commit 7db27da

Please sign in to comment.