Skip to content

Commit

Permalink
Merge pull request #232 from codetoart/master
Browse files Browse the repository at this point in the history
Fix Travis build fail issue
  • Loading branch information
Mahavir Jain committed Jul 2, 2018
2 parents 267109d + edeb5e8 commit f9aa164
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 39 deletions.
25 changes: 16 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
language: android

before_install:
- echo yes | android update sdk --filter extra-android-support --no-ui --force > /dev/null
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null
script:
- ./gradlew build

android:
components:
- android-28
- extra-android-m2repository

licenses:
- android-sdk-license-.+
- android-sdk-preview-license-.+
- android-sdk-license-.+

components:
# https://docs.travis-ci.com/user/languages/android/#Installing-a-newer-SDK-Platform-Tools-revision
- tools
- platform-tools
- tools

# The BuildTools version used by your project
- build-tools-27.0.3

script:
./gradlew build
# The SDK version used to compile your project
- android-28
- extra-android-m2repository
20 changes: 15 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

ext.KOTLIN_VERSION = '1.2.41'
ext.ANDROID_LIB_VERSION = '27.1.1'
ext.R2_STREAMER_VERSION = '0.1.7'
def KOTLIN_VERSION = ext.KOTLIN_VERSION
ext.KOTLIN_VERSION = '1.2.50'

repositories {
google()
Expand Down Expand Up @@ -34,6 +30,20 @@ allprojects {
}
}

ext {
LIBRARY_VERSION = "0.4.0"

VERSION_NAME = "1.0"
VERSION_CODE = 1

ANDROID_MIN_SDK = 14
ANDROID_COMPILE_SDK_VERSION = 28
ANDROID_TARGET_SDK_VERSION = 28
ANDROID_LIB_VERSION = '28.0.0-alpha3'

R2_STREAMER_VERSION = '0.1.7'
}

task clean(type: Delete) {
delete rootProject.buildDir
}
12 changes: 6 additions & 6 deletions folioreader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ext {
siteUrl = 'https://github.com/FolioReader/FolioReader-Android'
gitUrl = 'https://github.com/FolioReader/FolioReader-Android.git'

libraryVersion = '0.4.0'
libraryVersion = LIBRARY_VERSION

developerId = 'mobisystech'
developerName = 'Folio Reader'
Expand All @@ -30,13 +30,13 @@ ext {

android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
compileSdkVersion ANDROID_COMPILE_SDK_VERSION

defaultConfig {
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
versionCode Integer.parseInt(project.VERSION_CODE)
versionName project.VERSION_NAME
minSdkVersion ANDROID_MIN_SDK
targetSdkVersion ANDROID_TARGET_SDK_VERSION
versionCode VERSION_CODE
versionName VERSION_NAME
}

sourceSets {
Expand Down
9 changes: 1 addition & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,4 @@ org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

VERSION_NAME=1.0
VERSION_CODE=1

ANDROID_COMPILE_SDK_VERSION=28
ANDROID_TARGET_SDK_VERSION=28
ANDROID_MIN_SDK=14
# org.gradle.parallel=true
10 changes: 5 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ apply plugin: 'checkstyle'

android {

compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
compileSdkVersion ANDROID_COMPILE_SDK_VERSION

defaultConfig {
applicationId "com.folioreader.android.sample"
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
versionCode Integer.parseInt(project.VERSION_CODE)
versionName project.VERSION_NAME
minSdkVersion ANDROID_MIN_SDK
targetSdkVersion ANDROID_TARGET_SDK_VERSION
versionCode VERSION_CODE
versionName VERSION_NAME
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand Down
12 changes: 6 additions & 6 deletions webViewMarker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
siteUrl = 'https://github.com/FolioReader/FolioReader-Android'
gitUrl = 'https://github.com/FolioReader/FolioReader-Android.git'

libraryVersion = '0.4.0'
libraryVersion = LIBRARY_VERSION

developerId = 'mobisystech'
developerName = 'Folio Reader'
Expand All @@ -25,13 +25,13 @@ ext {
}

android {
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
compileSdkVersion ANDROID_COMPILE_SDK_VERSION

defaultConfig {
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
versionCode Integer.parseInt(project.VERSION_CODE)
versionName project.VERSION_NAME
minSdkVersion ANDROID_MIN_SDK
targetSdkVersion ANDROID_TARGET_SDK_VERSION
versionCode VERSION_CODE
versionName VERSION_NAME
}

buildTypes {
Expand Down

0 comments on commit f9aa164

Please sign in to comment.