Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Commit

Permalink
Merge pull request #57 from mobify/preview-configurations
Browse files Browse the repository at this point in the history
[HYB-968]: Update android gradle with new astro config
  • Loading branch information
lizcross authored Dec 5, 2016
2 parents 5b21141 + 22472e3 commit 4d64376
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
5 changes: 2 additions & 3 deletions android/velo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ android {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {}
}
}

Expand All @@ -29,6 +28,6 @@ preBuild.dependsOn buildJS
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
releaseCompile project(path: ':astro', configuration: 'release')
debugCompile project(path: ':astro', configuration: 'debug')
releaseCompile project(path: ':astro', configuration: 'previewDisabledRelease')
debugCompile project(path: ':astro', configuration: 'previewDisabledDebug')
}
24 changes: 7 additions & 17 deletions app/build-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@

set -e

echo "Setting up path variables and finding node"
MYPATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
ROOT=$MYPATH/..
EXTRA_NPM_ARGS="--no-progress --no-spin"
EXTRA_GRUNT_ARGS=""

function findNode() {
return $(which npm 1>/dev/null 2>&1)
}

if [ "$1" == "--no-color" ]; then
EXTRA_NPM_ARGS="--no-color $EXTRA_NPM_ARGS"
EXTRA_GRUNT_ARGS="--no-color $EXTRA_GRUNT_ARGS"
fi

pushd "$MYPATH"

# Force supporting Homebrew installations of npm.
export PATH=$PATH:/usr/local/bin

if ! findNode; then
echo "Cannot find 'npm'. Trying via nvm..."
# Find node with nvm
Expand All @@ -39,20 +32,17 @@ if ! findNode; then
fi
fi

if ! findNode; then
# Force supporting Homebrew installations of npm.
export PATH=$PATH:/usr/local/bin
fi
# Force supporting Homebrew installations of npm.
export PATH=$PATH:/usr/local/bin

if ! findNode; then
echo "Cannot find 'npm'. Aborting. Add your npm path to \`user-env.sh\` and retry."
exit 1
fi

# Build app.js.
pushd $ROOT
npm install $EXTRA_NPM_ARGS

echo "Building app.js"
pushd $MYPATH
$MYPATH/node_modules/grunt-cli/bin/grunt $EXTRA_GRUNT_ARGS build
$MYPATH/node_modules/.bin/grunt $EXTRA_GRUNT_ARGS build
popd

echo "SUCCESS: build app.js"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"author": "Mobify",
"dependencies": {
"astro-sdk": "0.17.3",
"astro-sdk": "~0.17.0",
"bluebird": "~2.9.24"
},
"devDependencies": {
Expand Down

0 comments on commit 4d64376

Please sign in to comment.