Add CircleCI 2
This commit is contained in:
parent
b1f82be0c9
commit
fb983384ab
|
@ -105,13 +105,13 @@ android {
|
|||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
if (project.hasProperty('KEYSTORE')) {
|
||||
storeFile file(KEYSTORE)
|
||||
storePassword KEYSTORE_PASSWORD
|
||||
keyAlias KEY_ALIAS
|
||||
keyPassword KEY_PASSWORD
|
||||
}
|
||||
}
|
||||
if (project.hasProperty('KEYSTORE')) {
|
||||
storeFile file(KEYSTORE)
|
||||
storePassword KEYSTORE_PASSWORD
|
||||
keyAlias KEY_ALIAS
|
||||
keyPassword KEY_PASSWORD
|
||||
}
|
||||
}
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 134 B |
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
Binary file not shown.
After Width: | Height: | Size: 100 B |
Binary file not shown.
After Width: | Height: | Size: 134 B |
Binary file not shown.
After Width: | Height: | Size: 167 B |
Binary file not shown.
After Width: | Height: | Size: 207 B |
|
@ -1,6 +1,3 @@
|
|||
import 'babel-polyfill';
|
||||
import 'regenerator-runtime/runtime';
|
||||
|
||||
import { createStore, applyMiddleware } from 'redux';
|
||||
import createSagaMiddleware from 'redux-saga';
|
||||
import logger from 'redux-logger';
|
||||
|
|
120
circle.yml
120
circle.yml
|
@ -1,57 +1,69 @@
|
|||
machine:
|
||||
node:
|
||||
version: 8
|
||||
environment:
|
||||
YARN_VERSION: 0.18.1
|
||||
# Needed for Android SDK installation bash script (see below)
|
||||
PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
|
||||
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
|
||||
dependencies:
|
||||
pre:
|
||||
# Install YARN
|
||||
- node -v
|
||||
- echo $KEYSTORE_BASE64 | base64 --decode > ./android/app/rocketchat-rn.keystore
|
||||
- echo -e "KEYSTORE=$KEYSTORE" >> ./android/gradle.properties
|
||||
- echo -e "KEYSTORE_PASSWORD=$KEYSTORE_PASSWORD" >> ./android/gradle.properties
|
||||
- echo -e "KEY_ALIAS=$KEY_ALIAS" >> ./android/gradle.properties
|
||||
- echo -e "KEY_PASSWORD=$KEYSTORE_PASSWORD" >> ./android/gradle.properties
|
||||
defaults: &defaults
|
||||
working_directory: ~/repo
|
||||
|
||||
override:
|
||||
# The Android Gradle build will need the Android signing keystore keys setup
|
||||
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-23.0.3,build-tools-25.0.2,build-tools-26.0.1,android-23,extra-google-m2repository,extra-google-google_play_services,extra-android-m2repository
|
||||
- echo y | $ANDROID_HOME/tools/bin/sdkmanager --update
|
||||
- echo y | $ANDROID_HOME/tools/bin/sdkmanager --licenses
|
||||
# Install node modules
|
||||
- yarn
|
||||
# - ./node_modules/.bin/react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
|
||||
# - cd android && ./gradlew assembleRelease
|
||||
# - mv ./android/app/build/outputs/ $CIRCLE_ARTIFACTS
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/android:api-26-alpha
|
||||
|
||||
cache_directories:
|
||||
# Let's speed up the next build by cacheing installed dependencies
|
||||
- ~/.yarn
|
||||
- ~/.cache/yarn
|
||||
- vendor/bundle
|
||||
- node_modules
|
||||
- ~/Library/Caches/CocoaPods
|
||||
- /usr/local/android-sdk-linux/platforms/android-25
|
||||
- /usr/local/android-sdk-linux/build-tools/25.0.0
|
||||
- /usr/local/android-sdk-linux/extras/android/m2repository
|
||||
environment:
|
||||
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"
|
||||
JVM_OPTS: -Xmx2048m
|
||||
TERM: dumb
|
||||
BASH_ENV: "~/.nvm/nvm.sh"
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
deployment:
|
||||
production: # just a label; label names are completely up to you
|
||||
branch: master
|
||||
commands:
|
||||
- ./gradlew assembleRelease
|
||||
-Dorg.gradle.project.track=production
|
||||
beta:
|
||||
branch: develop
|
||||
commands:
|
||||
- ./gradlew assembleRelease
|
||||
-Dorg.gradle.project.track=beta
|
||||
alpha:
|
||||
branch: circle-ci
|
||||
commands:
|
||||
- cd android && ./gradlew assembleRelease
|
||||
- mv ./android/app/build/outputs/ $CIRCLE_ARTIFACTS
|
||||
# -Dorg.gradle.project.track=alpha
|
||||
- run:
|
||||
name: Install Node 8
|
||||
command: |
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
|
||||
source ~/.nvm/nvm.sh
|
||||
nvm install 8
|
||||
npm install
|
||||
|
||||
- run:
|
||||
name: Install NPM modules
|
||||
command: |
|
||||
npm install
|
||||
|
||||
- run:
|
||||
name: Build Android App
|
||||
command: |
|
||||
cd android
|
||||
# ./gradlew androidDependencies
|
||||
|
||||
echo $KEYSTORE_BASE64 | base64 --decode > ./app/$KEYSTORE
|
||||
echo -e "KEYSTORE=$KEYSTORE" > ./gradle.properties
|
||||
echo -e "KEYSTORE_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties
|
||||
echo -e "KEY_ALIAS=$KEY_ALIAS" >> ./gradle.properties
|
||||
echo -e "KEY_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties
|
||||
|
||||
./gradlew assembleRelease
|
||||
|
||||
mkdir -p /tmp/build
|
||||
|
||||
mv app/build /tmp/
|
||||
|
||||
- store_artifacts:
|
||||
path: /tmp/build
|
||||
|
||||
- save_cache:
|
||||
key: node-modules-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ./node_modules
|
||||
|
||||
- save_cache:
|
||||
key: meteor-{{ checksum ".circleci/config.yml" }}-{{ checksum ".meteor/release" }}
|
||||
paths:
|
||||
- /usr/local/android-sdk-linux/platforms/android-25
|
||||
- /usr/local/android-sdk-linux/build-tools/25.0.0
|
||||
- /usr/local/android-sdk-linux/extras/android/m2repository
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-and-test:
|
||||
jobs:
|
||||
- build
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// import 'babel-polyfill';
|
||||
// import 'regenerator-runtime/runtime';
|
||||
import 'babel-polyfill';
|
||||
import 'regenerator-runtime/runtime';
|
||||
import { AppRegistry } from 'react-native';
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// import 'babel-polyfill';
|
||||
// import 'regenerator-runtime/runtime';
|
||||
import 'babel-polyfill';
|
||||
import 'regenerator-runtime/runtime';
|
||||
import { AppRegistry } from 'react-native';
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue