Skip to content

Commit e822d31

Browse files
authored
Merge pull request #8 from InflationX/jb/travis
Add TravisCI config file
2 parents 4e19c93 + 4cfab07 commit e822d31

10 files changed

Lines changed: 41 additions & 19 deletions

File tree

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: android
2+
3+
jdk: oraclejdk8
4+
5+
android:
6+
components:
7+
- tools
8+
- android-25
9+
- build-tools-25.0.2
10+
- platform-tools
11+
- extra-android-m2repository
12+
13+
cache:
14+
directories:
15+
- $HOME/.gradle

ViewPumpSample/build.gradle

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 25
5-
buildToolsVersion "25.0.1"
5+
buildToolsVersion "25.0.2"
66

77
defaultConfig {
88
minSdkVersion 14
9-
targetSdkVersion 24
9+
targetSdkVersion 25
1010
versionCode project.ext.versionCodeInt
1111
versionName version
1212
}
@@ -23,18 +23,20 @@ android {
2323
}
2424

2525
lintOptions {
26-
disable 'AppCompatCustomView'
26+
// we don't need to be indexed by firebase and we don't have a custom icon for our sample app
27+
disable 'GoogleAppIndexingWarning', 'MissingApplicationIcon'
28+
textOutput 'stdout'
29+
textReport System.getenv('CI') == 'true'
2730
}
2831
}
2932

3033
dependencies {
3134
compile project(':viewpump')
32-
compile 'com.android.support:support-v4:25.0.1'
33-
compile 'com.android.support:appcompat-v7:25.0.1'
35+
compile 'com.android.support:support-v4:25.3.0'
36+
compile 'com.android.support:appcompat-v7:25.3.0'
3437

3538
compile 'com.jakewharton:butterknife:8.2.1'
3639

37-
// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
38-
debugCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
39-
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
40+
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
41+
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
4042
}

ViewPumpSample/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<application
77
android:name="io.github.inflationx.viewpump.sample.ViewPumpApplication"
8-
android:allowBackup="true"
8+
android:allowBackup="false"
99
android:label="@string/app_name"
1010
android:theme="@style/AppTheme">
1111
<activity

ViewPumpSample/src/main/java/io/github/inflationx/viewpump/sample/CustomTextView.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package io.github.inflationx.viewpump.sample;
22

3+
import android.annotation.SuppressLint;
34
import android.content.Context;
45
import android.util.AttributeSet;
56
import android.widget.TextView;
67

8+
@SuppressLint("AppCompatCustomView")
79
public class CustomTextView extends TextView {
810

911
public CustomTextView(Context context) {

ViewPumpSample/src/main/java/io/github/inflationx/viewpump/sample/TextUpdatingInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public InflateResult intercept(Chain chain) {
2525
if (text.toString().startsWith("\n")) {
2626
text = text.toString().substring(1);
2727
}
28-
textView.setText("\n[CustomTextView] " + text);
28+
textView.setText(textView.getContext().getString(R.string.custom_textview_prefixed_text, text));
2929
}
3030
} finally {
3131
if (a != null) {

ViewPumpSample/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
android:id="@+id/toolbar"
1111
android:layout_width="match_parent"
1212
android:layout_height="wrap_content"
13-
android:background="@color/primary_material_light"
13+
android:background="#f5f5f5"
1414
android:minHeight="?attr/actionBarSize"
15-
android:translationZ="4dp"
1615
android:theme="@style/ThemeOverlay.AppCompat.Light"/>
1716

1817
<LinearLayout

ViewPumpSample/src/main/res/values/dimens.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<string name="app_name">ViewPump</string>
4-
<string name="regular_textview">This is a regular TextView</string>
4+
<string name="custom_textview_prefixed_text">\n[CustomTextView] %s</string>
55
<string name="regular_button">This is a regular Button</string>
6+
<string name="regular_textview">This is a regular TextView</string>
67
</resources>

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip

viewpump/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 25
5-
buildToolsVersion "25.0.1"
5+
buildToolsVersion "25.0.2"
66

77
defaultConfig {
88
minSdkVersion 14
@@ -18,6 +18,13 @@ android {
1818
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'consumer-proguard-rules.pro'
1919
}
2020
}
21+
22+
lintOptions {
23+
// we don't always want to use the latest version of the support library
24+
disable 'GradleDependency'
25+
textOutput 'stdout'
26+
textReport System.getenv('CI') == 'true'
27+
}
2128
}
2229

2330
dependencies {

0 commit comments

Comments
 (0)