forked from Path-Check/safeplaces-dct-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from tripleblindmarket/develop
Merge Latest Develop
- Loading branch information
Showing
51 changed files
with
15,497 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
name: Android and iOS build on MacOS | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
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 install 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
export function convertPointsToString(count){ | ||
|
||
// For testing Manually override count | ||
// count = 3000 | ||
|
||
// Get minutes | ||
let tot_mins = count * 5; | ||
|
||
// Calculate days | ||
var days = (tot_mins / 60/ 24); | ||
var rdays = Math.floor(days); | ||
|
||
// Calculate Hours | ||
var hours = (days - rdays) * 24; | ||
var rhours = Math.floor(hours); | ||
|
||
// Calculate Minutes | ||
var minutes = (hours - rhours) * 60; | ||
var rminutes = Math.round(minutes); | ||
|
||
if(rdays > 0){ | ||
if(rdays > 1){ | ||
if(rhours > 1){ | ||
return rdays + " days, " + rhours + " hours and " + rminutes + " minutes."; | ||
} | ||
else{ | ||
return rdays + " days, " + rhours + " hour and " + rminutes + " minutes."; | ||
} | ||
} | ||
else{ | ||
if(rhours > 1){ | ||
return rdays + " day, " + rhours + " hours and " + rminutes + " minutes."; | ||
} | ||
else{ | ||
return rdays + " day, " + rhours + " hour and " + rminutes + " minutes."; | ||
} | ||
} | ||
} | ||
else if(rhours > 0 ){ | ||
if(rhours > 1){ | ||
return rhours + " hours and " + rminutes + " minutes."; | ||
} | ||
else{ | ||
return rhours + " hour and " + rminutes + " minutes."; | ||
} | ||
} | ||
else{ | ||
return rminutes + " minutes."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.