forked from Shopify/flash-list
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
71 lines (58 loc) · 2.5 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
def _ext = rootProject.ext
def _reactNativeVersion = _ext.has('reactNative') ? _ext.reactNative : '+'
def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 30
def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '30.0.2'
def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 21
def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 30
def _junitVersion = _ext.has('junitVersion') ? _ext.junitVersion : '4.13.2'
def _mockitoVersion = _ext.has('mockitoVersion') ? _ext.mockitoVersion : '3.2.0'
def _androidTestRunnerVersion = _ext.has('androidTestRunnerVersion') ? _ext.androidTestRunnerVersion : '1.1.0'
buildscript {
// buildscript is evaluated before any other task is executed, so this must be defined here
ext._kotlinVersion = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get('kotlinVersion') : '1.5.30'
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${_kotlinVersion}")
}
}
android {
compileSdkVersion _compileSdkVersion
buildToolsVersion _buildToolsVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
debug.java.srcDirs += 'src/debug/kotlin'
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}
defaultConfig {
minSdkVersion _minSdkVersion
targetSdkVersion _targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
abortOnError false
}
testOptions {
unitTests.returnDefaultValues = true
}
}
dependencies {
compileOnly "com.facebook.react:react-native:${_reactNativeVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${_kotlinVersion}"
testImplementation "junit:junit:${_junitVersion}"
testImplementation "org.mockito.kotlin:mockito-kotlin:${_mockitoVersion}"
testImplementation "org.mockito:mockito-inline:${_mockitoVersion}"
testImplementation 'com.google.code.gson:gson:2.8.9'
androidTestImplementation("androidx.test:runner:${_androidTestRunnerVersion}")
androidTestImplementation("androidx.test:rules:${_androidTestRunnerVersion}")
}