This repository has been archived by the owner on Apr 22, 2022. It is now read-only.
forked from soundcloud/lightcycle
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
102 lines (86 loc) · 2.48 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
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0'
}
}
task wrapper(type: Wrapper) {
description 'Creates the gradle wrapper.'
gradleVersion '4.0'
}
allprojects {
repositories {
mavenLocal()
jcenter()
}
}
ext {
minSdkVersion = 9
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.1'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
}
def supportLibVersion = '25.0.1'
ext.deps = [
// Android
android : 'com.google.android:android:4.1.1.4',
support_v4 : 'com.google.android:support-v4:r7',
preference_v7 : "com.android.support:preference-v7:${supportLibVersion}",
appcompat_v7 : "com.android.support:appcompat-v7:${supportLibVersion}",
support_annotations : "com.android.support:support-annotations:${supportLibVersion}",
// Processor
javapoet : 'com.squareup:javapoet:1.6.1',
// Test dependencies
junit : 'junit:junit:4.12',
mockito : 'org.mockito:mockito-all:1.10.19',
compiletesting : 'com.google.testing.compile:compile-testing:0.7',
roboelectric : 'org.robolectric:robolectric:3.1.2',
robolectric_support : 'org.robolectric:shadows-support-v4:3.1.2',
equalsverifier : 'nl.jqno.equalsverifier:equalsverifier:2.1.8'
]
// Static analysis
subprojects { project ->
apply plugin: 'checkstyle'
apply plugin: 'pmd'
apply plugin: 'findbugs'
checkstyle {
toolVersion = "7.2"
configFile rootProject.file('checkstyle.xml')
}
task checkstyle(type: Checkstyle) {
source 'src/main/java'
ignoreFailures false
showViolations true
include '**/*.java'
classpath = files()
}
task pmd(type: Pmd) {
description 'Finds common programming flaws throw static analysis of code.'
ignoreFailures false
}
findbugs {
ignoreFailures = false
toolVersion = "3.0.0"
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
}
// configure Java projects
[":lightcycle-api", ":lightcycle-processor"].each { name ->
project(name) {
apply plugin: 'provided-base'
apply plugin: 'java'
sourceCompatibility = rootProject.ext.sourceCompatibilityVersion
targetCompatibility = rootProject.ext.targetCompatibilityVersion
}
}