Skip to content

Commit

Permalink
Fix merge issues (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
tremblerz authored Apr 3, 2020
1 parent d8f7c5b commit f4932d4
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 7 deletions.
121 changes: 121 additions & 0 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Android and iOS build on MacOS

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@master

- name: Set XCode Version
run: sudo xcode-select -s /Applications/Xcode_11.app

- name: Installing Homebrew
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

- name: Installing Java 8
run: brew tap adoptopenjdk/openjdk && brew cask install adoptopenjdk/openjdk/adoptopenjdk8

- name: Installing Gradle
run: brew upgrade gradle

- name: Installing Android Studio
run: brew cask install android-sdk

- name: Setting Variables
run: |
export GRADLE_HOME=/usr/local/opt/gradle
export ANDROID_HOME=/usr/local/share/android-sdk
export PATH=$GRADLE_HOME/bin:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
- name: Updating SDK Manager
run: sdkmanager --update

- name: List available packages for Debug
run: sdkmanager --list

- name: Download Buildtools 28.0.3
run: (echo y; echo y; echo y;) | sdkmanager "build-tools;28.0.3"

- name: Download Android 28
run: (echo y; echo y; echo y;) | sdkmanager "platforms;android-28"

- name: Download Android Platform Tools
run: (echo y; echo y; echo y;) | sdkmanager "platform-tools"

- name: Download Support Library Android M2
run: (echo y; echo y; echo y;) | sdkmanager "extras;android;m2repository"

- name: Download Support Library Google M2
run: (echo y; echo y; echo y;) | sdkmanager "extras;google;m2repository"

- name: Download Support Library Solver for ConstraintLayout 1.0.2
run: (echo y; echo y; echo y;) | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"

- name: Download Support Library ConstraintLayout for Android 1.0.2
run: (echo y; echo y; echo y;) | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"

- name: Download Android SDK Command line tools
run: (echo y; echo y; echo y;) | sdkmanager "cmdline-tools;latest"

- name: Download Google Services
run: (echo y; echo y; echo y;) | sdkmanager "extras;google;google_play_services"

- name: Download System Image Default
run: (echo y; echo y; echo y;) | sdkmanager "system-images;android-28;default;x86_64"

- name: Download System Image Google APIs
run: (echo y; echo y; echo y;) | sdkmanager "system-images;android-28;google_apis;x86_64"

- name: List current SDK Install
run: sdkmanager --list

- name: Adding Build tools to Path
run: export PATH=$ANDROID_HOME/build-tools/$(ls -tr $ANDROID_HOME/build-tools/ | tail -1):$PATH

# This is ugly but it is the only thing that seems to work.
- name: Accepting Android license
run: (echo y; echo y; echo y; echo y; echo y; echo y) | $ANDROID_HOME/tools/bin/sdkmanager --licenses

- name: Installing CocoaPods
run: gem install cocoapods

- name: Update Pods
run: pod repo update
working-directory: ./ios

- name: Yarn Install
run: yarn install

- name: Pod Install
run: pod install
working-directory: ./ios

- name: Asset Directory
run: mkdir -p ./android/app/src/main/assets

- name: Building React Native Bundle Android
run: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

- name: Building React Native Bundle iOS
run: npx react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios


# - name: Checking Gradle dependencies
# run: ./gradlew check
# working-directory: ./android

# - name: Android Build
# run: ./gradlew build
# working-directory: ./android

# - name: iOS Build
# run: xcodebuild -workspace PrivateKit.xcworkspace -configuration Release -scheme PrivateKit

1 change: 0 additions & 1 deletion app/Entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import LicencesScreen from './views/Licenses';
import NotificationScreen from './views/Notification';
import Slider from './views/welcomeScreens/Slider';
import { GetStoreData, SetStoreData } from './helpers/General';
import SettingsScreen from './views/Settings';

const Stack = createStackNavigator();

Expand Down
6 changes: 0 additions & 6 deletions app/views/LocationTracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,6 @@ class LocationTracking extends Component {
}}>
<Text style={styles.menuOptionText}>Notifications</Text>
</MenuOption>
<MenuOption
onSelect={() => {
this.settings();
}}>
<Text style={styles.menuOptionText}>Settings</Text>
</MenuOption>
</MenuOptions>
</Menu>
<Text style={styles.headerTitle}>
Expand Down
1 change: 1 addition & 0 deletions app/views/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
FlatList,
Alert,
TextInput,
Dimensions,
} from 'react-native';
import Yaml from 'js-yaml';
import RNFetchBlob from 'rn-fetch-blob';
Expand Down

0 comments on commit f4932d4

Please sign in to comment.