Skip to content

Commit

Permalink
Testing travis
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGrzybkowski committed Feb 24, 2017
1 parent d5d6aef commit 3ee38c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ android:
- extra-android-m2repository
deploy:
provider: script
script: ./script.sh
script: ./gradlew publishApkRelease
on:
tags: true
Binary file added app/app-release.apk
Binary file not shown.
33 changes: 3 additions & 30 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.triplet.play'

def gitVersionName = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags'
standardOutput = stdout
}
return stdout.toString().trim()
}
catch (ignored) {
return null;
}
}

def gitVersionCode = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--first-parent', '--count', 'origin/master'
standardOutput = stdout
}
return Integer.parseInt(stdout.toString().trim()) * 10
}
catch (ignored) {
return -1;
}
}
apply plugin: "com.gladed.androidgitversion"

android {
compileSdkVersion 25
Expand All @@ -38,8 +11,8 @@ android {
applicationId "com.adamg.hnreader"
minSdkVersion 16
targetSdkVersion 25
versionCode gitVersionCode()
versionName gitVersionName()
versionCode androidGitVersion.code()
versionName androidGitVersion.name()
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ buildscript {
ext.kotlin_version = '1.0.6'
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.triplet.gradle:play-publisher:1.1.5'
classpath 'gradle.plugin.com.gladed.gradle.androidgitversion:gradle-android-git-version:0.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
8 changes: 0 additions & 8 deletions script.sh

This file was deleted.

0 comments on commit 3ee38c8

Please sign in to comment.