Skip to content

Commit

Permalink
refactor: Inline gradle vars, update robolectric to 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PLNech committed Nov 22, 2018
1 parent 2e46cb8 commit c959051
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 22 deletions.
17 changes: 5 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
}
ext.with {
COMPILE_SDK_VERSION = 27
BUILD_TOOLS_VERSION = '28.0.3'
MIN_SDK_VERSION = 14
TARGET_SDK_VERSION = 27

VERSION = '1.13.0'
VERSION_CODE = 1

GROUP = 'com.algolia'
BASENAME = 'instantsearch-android'
CODENAME = GROUP + ":" + BASENAME
Expand Down Expand Up @@ -52,13 +45,13 @@ subprojects {
apply plugin: 'maven-publish'

android {
compileSdkVersion COMPILE_SDK_VERSION
buildToolsVersion BUILD_TOOLS_VERSION
compileSdkVersion 28
buildToolsVersion '28.0.3'

defaultConfig {
minSdkVersion MIN_SDK_VERSION
targetSdkVersion TARGET_SDK_VERSION
versionCode VERSION_CODE
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName VERSION
consumerProguardFiles "proguard-rules.pro"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
package com.algolia.instantsearch;

import com.algolia.instantsearch.core.BuildConfig;

import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
@Config(constants = BuildConfig.class)
public abstract class InstantSearchTest {
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
# 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
android.databinding.enableV2=true
android.databinding.enableV2=true

# Enable the use of toolchain-processed resources in Robolectric tests (robolectric.org/migrating/)
android.enableUnitTestBinaryResources=true
2 changes: 1 addition & 1 deletion libraries.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ext {
"constraint_layout": 'com.android.support.constraint:constraint-layout:1.1.2',
// Testing
"junit" : "junit:junit:4.12",
"robolectric" : "org.robolectric:robolectric:3.8",
"robolectric" : "org.robolectric:robolectric:4.0",
"mockito" : "org.mockito:mockito-core:1.10.19"
]
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
package com.algolia.instantsearch;

import com.algolia.instantsearch.core.BuildConfig;

import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
@Config(constants = BuildConfig.class)
public abstract class InstantSearchTest {
}

0 comments on commit c959051

Please sign in to comment.