-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
85 lines (80 loc) · 2.89 KB
/
Copy pathbuild.gradle
File metadata and controls
85 lines (80 loc) · 2.89 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
74
75
76
77
78
79
80
81
82
83
84
85
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.versions = [
'kotlin': '1.8.20',
'minSdk': 18,
'compileSdk': 34,
'appCompat': '1.3.0',
'coreKtx': '1.6.0',
'constraintLayout': '2.0.4',
'dokka': '1.8.20',
'androidGradlePlugin': '8.13.2',
'json': '20180130',
'junit': '5.7.2',
'ktlintGradle' : '12.1.0',
'lifecycleExtensions': '2.2.0',
'leakCanary': '2.7',
'mockk': '1.12.0',
'okio': '2.10.0',
'tape': '2.0.0-beta1',
'viewmodelKtx': '2.3.1'
]
ext.deps = [
'android': [
'appCompat': "androidx.appcompat:appcompat:${versions.appCompat}",
'coreKtx': "androidx.core:core-ktx:${versions.coreKtx}",
'constraintLayout': "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}",
'gradlePlugin': "com.android.tools.build:gradle:${versions.androidGradlePlugin}",
'lifecycleExtensions': "androidx.lifecycle:lifecycle-extensions:${versions.lifecycleExtensions}",
'viewmodelKtx': "androidx.lifecycle:lifecycle-viewmodel-ktx:${versions.viewmodelKtx}",
],
'kotlin': [
'gradlePlugin': "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
'ktlintGradle' : "org.jlleitschuh.gradle:ktlint-gradle:${versions.ktlintGradle}",
'stdlib': "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}",
],
'dokka': "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}",
'okio': "com.squareup.okio:okio:${versions.okio}",
'leakCanary': "com.squareup.leakcanary:leakcanary-android:${versions.leakCanary}",
'tape': "com.squareup.tape2:tape:${versions.tape}",
'test': [
'kotlin': [
'common': 'org.jetbrains.kotlin:kotlin-test-common',
'jdk': 'org.jetbrains.kotlin:kotlin-test-junit5',
],
'mockk': "io.mockk:mockk:${versions.mockk}",
'json': "org.json:json:${versions.json}",
'junitApi' : "org.junit.jupiter:junit-jupiter-api:${versions.junit}",
'junitEngine' : "org.junit.jupiter:junit-jupiter-engine:${versions.junit}",
]
]
repositories {
google()
maven {
url = "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath deps.android.gradlePlugin
classpath deps.kotlin.gradlePlugin
classpath deps.kotlin.ktlintGradle
classpath deps.dokka
}
}
allprojects {
repositories {
mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects {
apply plugin: "org.jlleitschuh.gradle.ktlint"
ktlint {
version = "1.2.0"
android = true
outputColorName = "RED"
}
}