-
Notifications
You must be signed in to change notification settings - Fork 937
Expand file tree
/
Copy pathbuild.gradle
More file actions
73 lines (62 loc) · 2.38 KB
/
build.gradle
File metadata and controls
73 lines (62 loc) · 2.38 KB
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
72
73
group 'com.flutter_webview_plugin'
version '1.0-SNAPSHOT'
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of flutter_webview_plugin will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
apply plugin: 'com.android.library'
android {
// compileSdkVersion 28
compileSdkVersion 30
defaultConfig {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// NOTE(jeffmikels): When targetSdkVersion or minSdkVersion is not set or < 4, gradle adds
// additional scary permissions such as WRITE_EXTERNAL_STORAGE and READ_PHONE_STATE.
minSdkVersion 16
targetSdkVersion 30
}
lintOptions {
disable 'InvalidPackage'
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
testImplementation 'androidx.test:core:1.2.0'
// When running unit tests for project, gradle needs to have flutter.jar in path
// since there's no FLUTTER_HOME variable, we need to pass flutterPath from console with command:
// ./gradlew test -DflutterPath=/Users/rafal.wachol/Utils/flutter
//
// while develop you can set path to this jar explicitly so IDE won't complain
if(System.getProperty('flutterPath')) {
testImplementation files(System.getProperty('flutterPath') + '/bin/cache/artifacts/engine/android-x64/flutter.jar')
}
testImplementation 'org.mockito:mockito-inline:2.28.2'
}