Skip to content

Commit

Permalink
Merge pull request #656 from RADAR-base/release-0.7.0
Browse files Browse the repository at this point in the history
Release 0.7.0-alpha
  • Loading branch information
mpgxvii authored Aug 30, 2019
2 parents 27925f5 + 84e08bd commit 109234e
Show file tree
Hide file tree
Showing 151 changed files with 6,864 additions and 5,590 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ plugins/ios.json
www/*
$RECYCLE.BIN/
google-services.json
GoogleService-info.plist
secrets.tar

.DS_Store
Expand Down
61 changes: 15 additions & 46 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,18 @@
env:
global:
- JAVA_HOME=/usr/lib/jvm/java-8-oracle
- APP_VERSION=$TRAVIS_TAG
- PACKAGE_NAME=org.phidatalab.radar_armt
- PROJECT_NAME=RADAR-base/RADAR-Questionnaire
- PACKAGE_NAME_ANDROID=org.phidatalab.radar_armt
- KEYSTORE_PATH=radar-armt-release-key.keystore
- KEYSTORE_ALIAS=alias_name
- PLAYSTORE_SERVICE_KEY=service-api.json
- PLAYSTORE_TRACK=alpha
matrix:
secure: m8xkdQA8dhCgufxe1URYqeTuN55E5XzU22DmAJIpMvDhU3v7UfIYzTYCRJWBHxCHvi8rF3oh7ajfthVr763ZyJUSLuZ1kg1y1VTqAMedAdqr6LvGCOayBK7wxgHRPCNsIyHijxDChHB90mrPIbu6BkLMH4D94m+O1ishEoifMxwGEVp80/ftKfhkbXdyG8WBrgLLfGwTlK0xqprOAJGUelkYXCq7jZGzN3cf5kkAze+cEWa/2PAKdBlMmnLKuh6YEGzbRYNtQEr7QChCGizXVkoAuEv+OShSHwzhy7f4juSDQRyWDW92REJu+fO3vs+iuBG6BD7TzWb7HsqUzbmrnirnFYfMv/U/PYEnIaa9q91dqpqVaI2ZQ+1dHX66VppYaE4PbfMTXPls7qZfvGX94MtC2K5TQdJUCKNPZhWESJTS2UgwVfTAzMVpJvjd9vOfiiVcFo6qw4Lo04kv44M2p8Ivd7BIf0w2LsNayPnNb6kffcYUnchGruHiPPduKJXOTVE2R7MxlXjq6epIS7Onr4QNapmHf3HY/qWKTsLBSVkrngELOvQ9bwY3cChulXGMN7bXGrpPjkrYS8uaDb0k+qKftEM/MSKlLnsTAcdbPIj2aQF2L/mzP6d7MvaZJGziIIj4Ex6dnD2MhZXwXM4G43R8/7ZedlkKkF5OswtdBQE=
dist: trusty
sudo: required
language: android
android:
components:
- tools
- platform-tools
- tools
- build-tools-28.0.3
- android-28
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
addons:
apt:
sources:
- sourceline: deb https://dl.yarnpkg.com/debian/ stable main
key_url: https://dl.yarnpkg.com/debian/pubkey.gpg
- sourceline: deb http://dl.google.com/linux/chrome/deb/ stable main
key_url: https://dl-ssl.google.com/linux/linux_signing_key.pub
packages:
- yarn
- jq
- gradle
- google-chrome-stable
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
- extra
cache:
yarn: true
directories:
Expand All @@ -45,32 +23,23 @@ cache:
- $HOME/.gradle/native
- $HOME/.gradle/wrapper
before_install:
- touch ~/.android/repositories.cfg
- echo y | sdkmanager --update
- openssl aes-256-cbc -K $encrypted_b7f1c4c89cb5_key -iv $encrypted_b7f1c4c89cb5_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
install:
- nvm install 11
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3
- export PATH="$HOME/.yarn/bin:$PATH"
- openssl aes-256-cbc -K $encrypted_b7f1c4c89cb5_key -iv $encrypted_b7f1c4c89cb5_iv
-in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
- gem install fastlane
- yarn global add cordova
- yarn global add ionic
- gem install bundler --pre
- bundle install
- yarn global add ionic cordova
before_script:
- mkdir www
- cp secret.ts src/assets/data/secret.ts
script:
- cordova prepare
- yarn install
- yarn run lint
- yarn run lint:css
- if [[ $TRAVIS_BRANCH != $TRAVIS_TAG ]]; then yarn build ; fi
- if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then cordova prepare;
yarn install;
ionic cordova build --release android;
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -storepass $storepass -keystore radar-armt-release-key.keystore $HOME/build/$PROJECT_NAME/platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk alias_name;
$ANDROID_HOME/build-tools/28.0.3/zipalign -v 4 $HOME/build/$PROJECT_NAME/platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk $HOME/build/$PROJECT_NAME/platforms/android/app/build/outputs/apk/release/radar-armt-app-$APP_VERSION.apk;
fastlane supply --apk $HOME/build/$PROJECT_NAME/platforms/android/app/build/outputs/apk/release/radar-armt-app-$APP_VERSION.apk --track alpha --json_key service-api.json --package_name $PACKAGE_NAME
; fi
- if [[ $TRAVIS_BRANCH != $TRAVIS_TAG ]]; then fastlane android build_debug ; fi
- if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then fastlane android deploy keystore_path:$KEYSTORE_PATH keystore_password:$storepass keystore_alias:$KEYSTORE_ALIAS package_name:$PACKAGE_NAME_ANDROID track:$PLAYSTORE_TRACK json_key:$PLAYSTORE_SERVICE_KEY ; fi
#
# DOCUMENTATION:

Expand Down
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

source "https://rubygems.org"

gem 'fastlane'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
163 changes: 163 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.3)
babosa (1.0.2)
claide (1.0.2)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
declarative (0.0.10)
declarative-option (0.1.0)
digest-crc (0.4.1)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.4)
emoji_regex (1.0.1)
excon (0.64.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.5)
fastlane (2.126.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
excon (>= 0.45.0, < 1.0.0)
faraday (~> 0.9)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 0.9)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.21.2, < 0.24.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
jwt (~> 2.1.0)
mini_magick (~> 4.5.1)
multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.2.2, < 2.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.8.1, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-cordova (2.2.1)
fastlane-plugin-ionic (0.1.0)
gh_inspector (1.1.3)
google-api-client (0.23.9)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
httpclient (>= 2.8.1, < 3.0)
mime-types (~> 3.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
google-cloud-core (1.3.0)
google-cloud-env (~> 1.0)
google-cloud-env (1.2.0)
faraday (~> 0.11)
google-cloud-storage (1.16.0)
digest-crc (~> 0.4)
google-api-client (~> 0.23)
google-cloud-core (~> 1.2)
googleauth (>= 0.6.2, < 0.10.0)
googleauth (0.6.7)
faraday (~> 0.12)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.7)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
json (2.2.0)
jwt (2.1.0)
memoist (0.16.0)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mini_magick (4.5.1)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
naturally (2.2.0)
os (1.0.1)
plist (3.5.0)
public_suffix (2.0.5)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
rubyzip (1.2.3)
security (0.1.3)
signet (0.11.0)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.5)
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tty-cursor (0.7.0)
tty-screen (0.7.0)
tty-spinner (0.9.1)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)
unicode-display_width (1.6.0)
word_wrap (1.0.0)
xcodeproj (1.10.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
ruby

DEPENDENCIES
fastlane
fastlane-plugin-cordova
fastlane-plugin-ionic

BUNDLED WITH
2.0.2
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,38 @@ Run the app in an Android emulator:
$ ionic cordova emulate android
```

## Firebase remote config

Certain values can be overriden using Firebase Remote Config. Specifically, the following variables are supported:

| Parameter | Description | Default value |
|---------------------------|------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| `oauth_client_id` | Client ID to connect to the ManagementPortal with | `aRMT` |
| `oauth_client_secret` | Client secret to connect to the ManagementPortal with | Value set in `secret.ts` |
| `oauth_refresh_seconds` | After how many seconds to refresh the OAuth token | `1800` (=30 minutes) |
| `protocol_base_url` | Base URL where the protocol definitions are located. | <https://api.github.com/repos/RADAR-base/RADAR-aRMT-protocols/contents> |
| `protocol_branch` | Github branch where the protocol definitions should be read from | `master` |
| `protocol_path` | Path inside a project name that should be read for a protocol | `protocol.json` |
| `kafka_specification_url` | URL of the Kafka topic specification | <https://api.github.com/repos/RADAR-base/radar-schemas/contents/specifications/active/aRMT_1.4.3.yml?ref=master> |

## Other Config Options

Create a file in `src/assets/data/secret.ts` and add the following configuration -
Copy `src/assets/data/secret.ts.template` to `src/assets/data/secret.ts` and add the following configuration -

```ts
// The client credentials for OAuth authorisation with the Management Portal
export const DefaultSourceProducerAndSecretExport: string =
'<aRMT-client>:<aRMT-secret>'
// The client secret for OAuth authorisation with the Management Portal
export const DefaultSourceProducerAndSecretExport: string = 'aRMT:<aRMT-secret>'
```

Also if using FCM pull notifications instead of the local ones, please specify the FCM sender id (as mentioned in FCM settings) in `src/assets/data/defaultConfig.ts`. Don't forget to add the app's `google-services.json` (Android) or `GoogleService-Info.plist` (iOS) file to the root of your project.
In `src/assets/data/defaultConfig.ts` the following settings can be changed:

If using FCM pull notifications instead of the local ones, please specify the FCM sender id (as mentioned in FCM settings) in `src/assets/data/defaultConfig.ts`. Don't forget to add the app's `google-services.json` (Android) or `GoogleService-Info.plist` (iOS) file to the root of your project.

```ts
export const FCMPluginProjectSenderId: string = 'your-sender-id'
```

Also change the Default endpoint of where the RADAR-base platform is hosted.
The Default endpoint of where the RADAR-base platform is hosted.

```ts
export const DefaultEndPoint: string =
Expand All @@ -92,17 +107,14 @@ export const DefaultEndPoint: string =
Also change the Default Github source details where the questionnaire scheduling protocols and questionnaire schemas are hosted.

```ts
// The owner or organisation of the repositories where the protocols and schemas are located
export const DefaultOrganisation = 'YOUR-ORGANISATION'

// The name of the repository where the protocols are located
export const DefaultProtocolRepo = 'RADAR-aRMT-protocols'
// The Github repository where the protocols are located
export const DefaultProtocolGithubRepo = 'RADAR-Base/RADAR-aRMT-protocols'

// The name of the branch in the protocol repository
export const DefaultProtocolBranch = 'master'

// The name of the repository where the questionnaire schemas are located
export const DefaultSchemaRepo = 'RADAR-Schemas'
export const DefaultSchemaGithubRepo = 'RADAR-Base/RADAR-Schemas'

// The name of the branch in the schema repository
export const DefaultSchemaBranch = 'master'
Expand Down
Loading

0 comments on commit 109234e

Please sign in to comment.