forked from wordpress-mobile/WordPress-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
73 lines (58 loc) · 1.7 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
buildscript {
ext.kotlin_version = '1.2.50'
ext.arch_components_version = '1.1.1'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.automattic.android:fetchstyle:1.1'
}
}
apply plugin: 'com.automattic.android.fetchstyle'
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
allprojects {
apply plugin: 'checkstyle'
repositories {
google()
jcenter()
maven { url "https://dl.bintray.com/wordpress-mobile/maven" }
}
task checkstyle(type: Checkstyle) {
source 'src'
classpath = files()
}
checkstyle {
toolVersion = '8.3'
configFile file("${project.rootDir}/config/checkstyle.xml")
}
}
subprojects {
project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
} else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
}
}
configurations {
ktlint
}
dependencies {
ktlint 'com.github.shyiko:ktlint:0.21.0'
}
task ktlint(type: JavaExec) {
main = "com.github.shyiko.ktlint.Main"
classpath = configurations.ktlint
args "src/**/*.kt"
}
task ktlintFormat(type: JavaExec) {
main = "com.github.shyiko.ktlint.Main"
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
}
}
ext {
fluxCVersion = '51fee5847ca60895772eb5e5e4ca64a275cac543'
}