forked from wordpress-mobile/WordPress-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (87 loc) · 2.72 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
buildscript {
ext.kotlin_version = '1.3.11'
ext.kotlin_coroutines_version = '1.1.0'
ext.arch_components_version = '1.1.1'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.automattic.android:fetchstyle:1.1'
}
}
plugins {
id 'com.gradle.build-scan' version '1.16'
}
apply plugin: 'com.automattic.android.fetchstyle'
project.ext.buildGutenbergFromSource = project.properties.getOrDefault('wp.BUILD_GUTENBERG_FROM_SOURCE', false).toBoolean()
allprojects {
apply plugin: 'checkstyle'
repositories {
google()
jcenter()
maven { url "https://dl.bintray.com/wordpress-mobile/maven" }
if (rootProject.ext.buildGutenbergFromSource) {
// nested RN libraries need the RN maven repo defined from outside so, do it here when building from source
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/libs/gutenberg-mobile/node_modules/react-native/android"
}
maven {
// Local Maven repo containing AARs with JSC library built for Android
url "$rootDir/libs/gutenberg-mobile/node_modules/jsc-android/dist"
}
} else {
maven { url "https://dl.bintray.com/wordpress-mobile/react-native-mirror/" }
}
}
configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r224109'
}
}
task checkstyle(type: Checkstyle) {
source 'src'
classpath = files()
}
checkstyle {
toolVersion = '8.3'
configFile file("${project.rootDir}/config/checkstyle.xml")
}
}
subprojects {
configurations {
ktlint
}
dependencies {
ktlint 'com.github.shyiko:ktlint:0.29.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"
}
task ciktlint(type: JavaExec) {
main = "com.github.shyiko.ktlint.Main"
classpath = configurations.ktlint
args "src/**/*.kt", "--reporter=checkstyle,output=${buildDir}/ktlint.xml"
}
}
buildScan {
// Always run Gradle scan on CI builds
if (System.getenv('CI')) {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
tag 'CI'
publishAlways()
}
}
ext {
fluxCVersion = '621d987f4b179933f48243874fee2c9a157f7a75'
}