Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into release/2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
noamtamim committed May 9, 2017
2 parents 2bc495b + 85e7a64 commit c4b11e5
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ before_script:
- echo $android_sdk_license > $ANDROID_HOME/licenses/android-sdk-license
script:
- ./gradlew dtglib:build dtgapp:build
before_deploy:
- mv dtglib/build/intermediates/bundles/release/classes.jar dtglib-$TRAVIS_TAG.jar
after_success:
- ./travis-push-to-bintray.sh
deploy:
provider: releases
draft: false
skip_cleanup: true
file:
- dtglib-$TRAVIS_TAG.jar
- dtglib/build/outputs/aar/dtglib-release.aar
- dtgapp/build/outputs/apk/dtgapp-debug.apk
on:
tags: true
api-key: $GH_TOKEN
Expand Down
4 changes: 4 additions & 0 deletions dtglib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ android {
}
}

tasks.withType(Javadoc) {
options.addBooleanOption('Xdoclint:none', true)
}

dependencies {
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
Expand Down
41 changes: 41 additions & 0 deletions travis-push-to-bintray.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

# Required env vars:
# TRAVIS_TAG: current tag (e.g. v0.1.2)
# BINTRAY_USER, BINTRAY_KEY

# Run locally:
# TRAVIS_TAG=v0.1.2 BINTRAY_USER=username BINTRAY_KEY=fjkhsdfka3289r82rkfe ./travis-push-to-bintray.sh


DRY_RUN=false

# Only allow tags
if [ -z "$TRAVIS_TAG" ]; then
echo "Not a Travis tag build; will perform a dry-run."
TRAVIS_TAG=v0.0.0
DRY_RUN=true
fi

# Strip the "v" prefix
TAG_VERSION_NAME=${TRAVIS_TAG:1}

# Only allow proper "digits.digits.digits" versions.
if [[ ! $TAG_VERSION_NAME =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Not a proper version string; will perform a dry-run."
DRY_RUN=true
fi

# Check that defined library version matches the tag.
if ! grep -q "ext.dtglibVersion = '$TAG_VERSION_NAME'" version.gradle
then
echo "Library version name in build.gradle does not match tag name; will perform a dry-run."
DRY_RUN=true
fi


# Assuming a successful playkit:build, create javadoc jar, sources jar, pom
./gradlew dtglib:publishMavenPublicationToMavenLocal -x mavenAndroidJavadocs

# Upload
./gradlew dtglib:bintrayUpload -PdryRun=$DRY_RUN -PbintrayUser=$BINTRAY_USER -PbintrayKey=$BINTRAY_KEY

0 comments on commit c4b11e5

Please sign in to comment.