Skip to content

Commit

Permalink
Build against Android Pie / API 28
Browse files Browse the repository at this point in the history
See official release notes [0].

Fixes #17, #18

[0] https://developer.android.com/about/versions/pie/android-9.0
  • Loading branch information
saschpe committed Oct 9, 2018
1 parent 2dfb334 commit 319c72c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android:
components:
- platform-tools
- tools
- build-tools-27.0.3
- android-27
- build-tools-28.0.3
- android-28
- extra-android-m2repository
- extra-google-m2repository
env:
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ allprojects {
ext {
mockitoVersion = '2.18.3'
robolectricVersion = '3.8'
supportLibraryVersion = '27.1.1'
}

task clean(type: Delete) {
Expand Down
15 changes: 7 additions & 8 deletions customtabs-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
compileSdkVersion 28

defaultConfig {
applicationId 'com.example.saschpe.customtabs'
minSdkVersion 17
targetSdkVersion 27
targetSdkVersion 28
versionCode 170112
versionName '1.1.2'
archivesBaseName = "${applicationId}-${versionName}"
Expand All @@ -34,9 +33,9 @@ android {

dependencies {
implementation project(':customtabs')
implementation "com.android.support:animated-vector-drawable:$rootProject.supportLibraryVersion"
implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation "com.android.support:customtabs:$rootProject.supportLibraryVersion"
implementation "com.android.support:design:$rootProject.supportLibraryVersion"
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:design:28.0.0'
}
9 changes: 4 additions & 5 deletions customtabs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ if (localPropertiesFile.file) {
apply plugin: 'com.android.library'

android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
compileSdkVersion 28

defaultConfig {
minSdkVersion 15
targetSdkVersion 27
targetSdkVersion 28
versionName '1.1.2'
}

Expand All @@ -53,8 +52,8 @@ android {
}

dependencies {
api "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
api "com.android.support:customtabs:$rootProject.supportLibraryVersion"
api 'com.android.support:appcompat-v7:28.0.0'
api 'com.android.support:customtabs:28.0.0'

testImplementation 'junit:junit:4.12'
testImplementation "org.robolectric:robolectric:$rootProject.robolectricVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

@RunWith(RobolectricTestRunner.class)
Expand All @@ -36,7 +36,7 @@ public void getPackageNameToUse_noMockingReturnsNull() {
String packageName = CustomTabsPackageHelper.getPackageNameToUse(RuntimeEnvironment.application);

// Assert
assertEquals(null, packageName);
assertNull(packageName);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
@RunWith(JUnit4.class)
public class KeepAliveServiceTest {
// Arrange
private Intent mockIntent = mock(Intent.class);
private final Intent mockIntent = mock(Intent.class);

@Test
public void onBind_returnsValidBinder() {
Expand Down

0 comments on commit 319c72c

Please sign in to comment.