-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from stepstone-tech/develop
Release 4.2.0
- Loading branch information
Showing
35 changed files
with
1,811 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
buildscript { | ||
ext.gradleAndroidVersion = '3.0.0-beta2' | ||
ext.gradleAndroidVersion = '3.0.0-beta4' | ||
ext.kotlinVersion = '1.1.3-2' | ||
ext.bintrayVersion = '1.4' | ||
ext.mavenGradlePluginVersion = '1.4.1' | ||
ext.bintrayVersion = '1.7.3' | ||
ext.mavenGradlePluginVersion = '2.0' | ||
|
||
repositories { | ||
jcenter() | ||
|
@@ -39,8 +39,9 @@ configure(allprojects) { | |
robolectricVersion = '3.3.1' | ||
assertjVersion = '1.1.1' | ||
|
||
supportTestVersion = '1.0.0' | ||
espressoVersion = '3.0.0' | ||
supportTestVersion = '1.0.1' | ||
espressoVersion = '3.0.1' | ||
testButlerVersion = '1.3.1' | ||
|
||
/* Sample only */ | ||
butterknifeVersion = '8.5.1' | ||
|
@@ -52,3 +53,26 @@ configure(allprojects) { | |
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} | ||
|
||
ext { | ||
bintrayRepo = 'maven' | ||
bintrayName = POM_ARTIFACT_ID | ||
|
||
publishedGroupId = POM_GROUP_ID | ||
libraryName = 'Android Material Stepper' | ||
|
||
libraryDescription = 'This library allows to use Material steppers inside Android applications.' | ||
|
||
siteUrl = 'https://github.com/stepstone-tech/android-material-stepper' | ||
gitUrl = 'https://github.com/stepstone-tech/android-material-stepper.git' | ||
|
||
libraryVersion = POM_VERSION | ||
|
||
developerId = 'zawadz88' | ||
developerName = 'Piotr Zawadzki' | ||
developerEmail = '[email protected]' | ||
|
||
licenseName = 'The Apache Software License, Version 2.0' | ||
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
allLicenses = ["Apache-2.0"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'maven' | ||
|
||
android { | ||
compileSdkVersion project.androidCompileSdkVersion | ||
buildToolsVersion("$androidBuildToolsVersion") | ||
|
||
defaultConfig { | ||
minSdkVersion project.androidMinSdkVersion | ||
targetSdkVersion project.androidTargetSdkVersion | ||
} | ||
|
||
lintOptions { | ||
warningsAsErrors true | ||
} | ||
} | ||
|
||
dependencies { | ||
api project(':material-stepper') | ||
api "com.android.support.test.espresso:espresso-core:$espressoVersion" | ||
} | ||
|
||
gradle.taskGraph.beforeTask { Task task -> | ||
if (task instanceof Javadoc) { | ||
def releaseVariant = android.libraryVariants.find { it.buildType.name == 'release' } | ||
Javadoc javadocTask = (Javadoc) task | ||
javadocTask.source = android.sourceSets.main.java.srcDirs | ||
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar" | ||
javadocTask.classpath = files(releaseVariant.javaCompile.classpath.files) + files(ext.androidJar) | ||
} | ||
} | ||
|
||
ext { | ||
artifact = POM_TEST_ARTIFACT_ID | ||
} | ||
|
||
apply from: '../installv1.gradle' | ||
apply from: '../bintrayv1.gradle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.stepstone.stepper.test" /> |
72 changes: 72 additions & 0 deletions
72
...ial-stepper/src/main/java/com/stepstone/stepper/test/StepperLayoutTabSubtitleMatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package com.stepstone.stepper.test; | ||
|
||
import android.support.annotation.IntRange; | ||
import android.support.annotation.NonNull; | ||
import android.support.test.espresso.matcher.BoundedMatcher; | ||
import android.util.Log; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.TextView; | ||
|
||
import com.stepstone.stepper.StepperLayout; | ||
import com.stepstone.stepper.internal.widget.StepTab; | ||
|
||
import org.hamcrest.Description; | ||
import org.hamcrest.Matcher; | ||
|
||
/** | ||
* Checks the subtitle of a {@link StepTab} at a specified position. | ||
* | ||
* @author Piotr Zawadzki | ||
*/ | ||
public class StepperLayoutTabSubtitleMatcher extends BoundedMatcher<View, StepperLayout> { | ||
|
||
private static final String TAG = "StepperLayoutTabSubtMa"; | ||
|
||
@IntRange(from = 0) | ||
private final int tabPosition; | ||
|
||
@NonNull | ||
private final Matcher<View> subtitleMatcher; | ||
|
||
private StepperLayoutTabSubtitleMatcher(@IntRange(from = 0) int tabPosition, @NonNull Matcher<View> subtitleMatcher) { | ||
super(StepperLayout.class); | ||
this.tabPosition = tabPosition; | ||
this.subtitleMatcher = subtitleMatcher; | ||
} | ||
|
||
@Override | ||
public void describeTo(Description description) { | ||
description | ||
.appendText(" at position: ") | ||
.appendValue(tabPosition) | ||
.appendText(" with message: ") | ||
.appendValue(subtitleMatcher); | ||
} | ||
|
||
@Override | ||
protected boolean matchesSafely(StepperLayout view) { | ||
ViewGroup tabsContainer = (ViewGroup) view.findViewById(com.stepstone.stepper.R.id.ms_stepTabsInnerContainer); | ||
int childCount = tabsContainer.getChildCount(); | ||
|
||
if (childCount == 0) { | ||
Log.e(TAG, "No tabs found!"); | ||
return false; | ||
} | ||
|
||
if (tabPosition < 0 || tabPosition >= childCount) { | ||
Log.e(TAG, "Invalid tab position: " + tabPosition); | ||
return false; | ||
} | ||
|
||
StepTab stepTab = (StepTab) tabsContainer.getChildAt(tabPosition); | ||
TextView subtitleTextView = (TextView) stepTab.findViewById(com.stepstone.stepper.R.id.ms_stepSubtitle); | ||
|
||
return subtitleMatcher.matches(subtitleTextView); | ||
} | ||
|
||
public static Matcher<View> tabAtPositionHasSubtitle(@IntRange(from = 0) int tabPosition, @NonNull Matcher<View> subtitleMatcher) { | ||
return new StepperLayoutTabSubtitleMatcher(tabPosition, subtitleMatcher); | ||
} | ||
|
||
} |
Oops, something went wrong.