Skip to content

Commit

Permalink
Merge pull request #8 from InflationX/jb/travis
Browse files Browse the repository at this point in the history
Add TravisCI config file
  • Loading branch information
jbarr21 authored Mar 18, 2017
2 parents 4e19c93 + 4cfab07 commit e822d31
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 19 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: android

jdk: oraclejdk8

android:
components:
- tools
- android-25
- build-tools-25.0.2
- platform-tools
- extra-android-m2repository

cache:
directories:
- $HOME/.gradle
18 changes: 10 additions & 8 deletions ViewPumpSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
buildToolsVersion "25.0.2"

defaultConfig {
minSdkVersion 14
targetSdkVersion 24
targetSdkVersion 25
versionCode project.ext.versionCodeInt
versionName version
}
Expand All @@ -23,18 +23,20 @@ android {
}

lintOptions {
disable 'AppCompatCustomView'
// we don't need to be indexed by firebase and we don't have a custom icon for our sample app
disable 'GoogleAppIndexingWarning', 'MissingApplicationIcon'
textOutput 'stdout'
textReport System.getenv('CI') == 'true'
}
}

dependencies {
compile project(':viewpump')
compile 'com.android.support:support-v4:25.0.1'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:support-v4:25.3.0'
compile 'com.android.support:appcompat-v7:25.3.0'

compile 'com.jakewharton:butterknife:8.2.1'

// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
}
2 changes: 1 addition & 1 deletion ViewPumpSample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<application
android:name="io.github.inflationx.viewpump.sample.ViewPumpApplication"
android:allowBackup="true"
android:allowBackup="false"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package io.github.inflationx.viewpump.sample;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

@SuppressLint("AppCompatCustomView")
public class CustomTextView extends TextView {

public CustomTextView(Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public InflateResult intercept(Chain chain) {
if (text.toString().startsWith("\n")) {
text = text.toString().substring(1);
}
textView.setText("\n[CustomTextView] " + text);
textView.setText(textView.getContext().getString(R.string.custom_textview_prefixed_text, text));
}
} finally {
if (a != null) {
Expand Down
3 changes: 1 addition & 2 deletions ViewPumpSample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primary_material_light"
android:background="#f5f5f5"
android:minHeight="?attr/actionBarSize"
android:translationZ="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Light"/>

<LinearLayout
Expand Down
4 changes: 0 additions & 4 deletions ViewPumpSample/src/main/res/values/dimens.xml

This file was deleted.

3 changes: 2 additions & 1 deletion ViewPumpSample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ViewPump</string>
<string name="regular_textview">This is a regular TextView</string>
<string name="custom_textview_prefixed_text">\n[CustomTextView] %s</string>
<string name="regular_button">This is a regular Button</string>
<string name="regular_textview">This is a regular TextView</string>
</resources>
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
9 changes: 8 additions & 1 deletion viewpump/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
buildToolsVersion "25.0.2"

defaultConfig {
minSdkVersion 14
Expand All @@ -18,6 +18,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'consumer-proguard-rules.pro'
}
}

lintOptions {
// we don't always want to use the latest version of the support library
disable 'GradleDependency'
textOutput 'stdout'
textReport System.getenv('CI') == 'true'
}
}

dependencies {
Expand Down

0 comments on commit e822d31

Please sign in to comment.