-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
204 additions
and
57 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,40 @@ | ||
language: android | ||
android: | ||
components: | ||
- tools | ||
- platform-tools | ||
- tools | ||
|
||
# The BuildTools version used by your project | ||
- build-tools-26.0.1 | ||
|
||
# The SDK version used to compile your project | ||
- android-26 | ||
|
||
- extra-android-m2repository | ||
|
||
cache: | ||
directories: | ||
- $HOME/.gradle/caches/ | ||
- $HOME/.gradle/wrapper/ | ||
- $HOME/.android/build-cache | ||
|
||
before_cache: | ||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | ||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | ||
|
||
script: | ||
- . ./ci/prepare_env.sh | ||
- ./ci/build_debug.sh | ||
|
||
deploy: | ||
provider: releases | ||
api_key: "${GITHUB_API_KEY}" | ||
file_glob: true | ||
file: app/build/outputs/apk/*/*.apk | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
|
||
after_deploy: | ||
- ./ci/notify_slack.sh |
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
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,11 @@ | ||
ext { | ||
javaTypes = [ | ||
NULL: "null", | ||
TRUE: "true", | ||
FALSE: "false", | ||
BOOLEAN: "boolean", | ||
STRING: "String", | ||
INT: "int", | ||
LONG: "long" | ||
] | ||
} |
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,33 @@ | ||
ext { | ||
|
||
versions = [ | ||
// Plug-Ins | ||
android_tools : '3.0.0-beta2', | ||
google_services : '3.1.0', | ||
kotlin : '1.1.4', | ||
|
||
// Runtime dependencies | ||
android_support : '26.0.2', | ||
architecture_components: '1.0.0-alpha9', | ||
dagger : '2.11', | ||
floating_action_button : '1.6.4', | ||
geth : '1.6.6', | ||
koptional : '1.2.0', | ||
material_progressbar : '1.4.1', | ||
moshi : '1.4.0', | ||
okhttp : '3.8.1', | ||
okio : '1.13.0', | ||
retrofit : '2.3.0', | ||
room : '1.0.0-alpha8', | ||
rxandroid : '2.0.1', | ||
rxjava : '2.1.2', | ||
rxkotlin : '2.1.0', | ||
timber : '4.5.1', | ||
zxing : '3.3.0', | ||
|
||
// Test dependencies | ||
espresso : '3.0.0', | ||
junit : '4.12', | ||
mockito : '2.8.47', | ||
] | ||
} |
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,35 @@ | ||
static def getKey(String name, String defaultValue = null) { | ||
def value = null | ||
try { | ||
Properties properties = new Properties() | ||
properties.load(new FileInputStream("project_keys")) | ||
value = properties.getProperty(name) | ||
} catch (Exception ignored) { | ||
// noop | ||
} | ||
if (value == null) { | ||
value = System.getenv(name) | ||
} | ||
if (value == null) { | ||
return defaultValue | ||
} | ||
return value | ||
} | ||
|
||
def getInt(String name, int defaultValue) { | ||
def envValue = getKey(name) | ||
if (envValue == null) { | ||
return defaultValue | ||
} | ||
return Integer.parseInt(envValue) | ||
} | ||
|
||
static def asString(String input) { | ||
return input == null ? null : "\"" + input + "\"" | ||
} | ||
|
||
ext { | ||
getKey = this.&getKey | ||
getInt = this.&getInt | ||
asString = this.&asString | ||
} |
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,5 @@ | ||
#!/bin/bash | ||
# fail if any commands fails | ||
set -e | ||
|
||
./gradlew clean assembleDebug |
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,10 @@ | ||
#!/bin/bash | ||
# fail if any commands fails | ||
set -e | ||
|
||
repo_url="$(git config --get remote.origin.url)" | ||
release_path="/releases/tag/${TRAVIS_TAG}" | ||
release_url="${repo_url/.git/$release_path}" | ||
curl -X POST -H 'Content-type: application/json' \ | ||
--data "{\"text\":\"<${release_url}|Version ${APP_VERSION_NAME}> for ${TRAVIS_REPO_SLUG} is out!\"}" \ | ||
https://hooks.slack.com/services/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 |
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,12 @@ | ||
#!/bin/bash | ||
# fail if any commands fails | ||
set -e | ||
|
||
git branch | ||
|
||
# write your script here | ||
export APP_VERSION_CODE=$TRAVIS_BUILD_NUMBER | ||
# strip the first char as that should always be "v" (as tags should be in the format "vX.X.X") | ||
description="$(git describe --tags)" | ||
export APP_VERSION_NAME=${description:1} | ||
export APP_RELEASE_NOTES=$TRAVIS_COMMIT_MESSAGE |
Binary file not shown.