-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
90 lines (79 loc) · 2.59 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
import com.android.build.gradle.AppPlugin
import com.android.build.gradle.LibraryPlugin
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
buildscript {
ext.buildConfig = [
minSdk : 21,
targetSdk : 30,
compileSdk: 30,
buildTools: '30.0.3'
]
ext.versions = [
androidGradlePlugin: '7.0.0-alpha14',
androidLint : '30.0.0-alpha14',
detekt : '1.16.0',
mavenPublishPlugin : '0.14.2',
kotlin : '1.4.32',
androidx : [
core : '1.6.0-alpha01',
annotation: '1.3.0-alpha01',
appCompat : '1.3.0-rc01',
activity : '1.3.0-alpha06',
compose : '1.0.0-beta04'
],
junit : '4.13.1'
]
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
classpath "com.android.tools.build:gradle:${versions.androidGradlePlugin}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${versions.detekt}"
classpath "com.vanniktech:gradle-maven-publish-plugin:${versions.mavenPublishPlugin}"
}
}
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
plugins.withType(AppPlugin).configureEach { plugin ->
extensions.getByName("android").compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
plugins.withType(LibraryPlugin).configureEach { plugin ->
extensions.getByName("android").compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
tasks.withType(KotlinCompile).configureEach { task ->
task.kotlinOptions {
jvmTarget = "11"
freeCompilerArgs += [
"-Xallow-jvm-ir-dependencies",
"-Xskip-prerelease-check",
"-progressive",
'-Xopt-in=kotlin.RequiresOptIn',
]
}
}
tasks.withType(Test).configureEach {
maxParallelForks Runtime.runtime.availableProcessors() * 2
testLogging {
events 'passed', 'skipped', 'failed'
}
}
}
subprojects {
apply from: "$project.rootDir/gradle/detekt.gradle"
}
task clean(type: Delete) {
delete rootProject.buildDir
}