-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
121 lines (103 loc) Β· 3.71 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
apply from: rootProject.file("versions.gradle")
apply from: "${rootProject.projectDir}/tools/lib-version.gradle"
repositories {
google()
jcenter()
mavenCentral()
maven {
url = uri("local-plugin-repository")
}
}
dependencies {
classpath "com.android.tools.build:gradle:$androidToolsGradleVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detekt_version"
// uncomment to test kranberry tests
// classpath "io.github.kranberry-io:runtests:$PUBLISH_VERSION"
}
}
plugins {
id("io.github.gradle-nexus.publish-plugin") version "$nexus_publish_version"
id("org.jetbrains.dokka") version "$dokka_version"
}
apply from: "${rootProject.projectDir}/tools/publish/publish-root.gradle"
allprojects {
repositories {
google()
jcenter()
maven {
url = uri("local-plugin-repository")
}
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply from: rootProject.file("versions.gradle")
apply plugin: "io.gitlab.arturbosch.detekt"
// uncomment to test kranberry tests
//apply plugin: "io.github.kranberry-io.runtests"
apply from: "${rootProject.projectDir}/tools/publish/publish-module.gradle"
// uncomment to test kranberry tests
//kranberryTests {
// packageName = "io.kranberry"
// packageTests = "io.kranberry.wrapper.test"
// androidTestApkOutputPath = "build/outputs/apk/androidTest/release/kranberry-release-androidTest.apk"
// testsRunner = "androidx.test.runner.AndroidJUnitRunner"
//}
android {
testBuildType "release"
compileSdkVersion project.compileApiVersion
defaultConfig {
minSdkVersion minApiVersion
targetSdkVersion targetApiVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
debuggable true
getIsDefault().set(true)
matchingFallbacks = ['debug']
signingConfig signingConfigs.debug
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}
// filter buildType debug
variantFilter { variant ->
def buildType = variant.buildType.name
if (buildType == "debug") {
setIgnore(true)
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.test.ext:junit:$androidXJunitVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinTestVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinTestVersion"
api "androidx.test.espresso:espresso-core:$espressoCoreVersion"
api "androidx.test.ext:junit:$androidXJunitVersion"
api "androidx.test.uiautomator:uiautomator:$uiAutomatorVersion"
api "com.google.code.gson:gson:$gsonVersion"
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$detekt_version"
}
detekt {
buildUponDefaultConfig = true
config = files("tools/detekt/detekt-config.yml")
reports {
html.enabled = true
xml.enabled = true
txt.enabled = true
sarif.enabled = true
}
}
tasks.detekt.jvmTarget = "1.8"