-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathbuild.gradle
72 lines (59 loc) · 1.71 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
}
plugins {
id "com.vanniktech.maven.publish" version '0.9.0' apply false
id 'com.github.ben-manes.versions' version '0.28.0' apply false
id 'org.owasp.dependencycheck' version '5.3.0' apply false
id "com.github.spotbugs" version "3.0.0" apply false
}
def buildProjects() {
subprojects.findAll { new File(it.projectDir, 'build.gradle').file }
}
def exampleProjects() {
buildProjects().findAll { it.name.endsWith("-example") || it.projectDir.path.substring(rootProject.projectDir.path.length()).contains('examples') }
}
def libraryProjects() {
buildProjects().findAll { !exampleProjects().contains(it) }
}
configure(buildProjects()) {
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'org.owasp.dependencycheck'
apply plugin: 'com.github.spotbugs'
repositories {
google()
jcenter()
mavenCentral()
}
}
configure(exampleProjects()) {
apply plugin: 'com.android.application'
}
configure(libraryProjects()) {
apply plugin: 'com.android.library'
apply plugin: 'com.vanniktech.maven.publish'
}
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
eclipse {
classpath {
downloadSources = true
downloadJavadoc = true
}
}
// Tell idea to output to build/classes/main instead of /out/
idea {
module {
outputDir file('build/classes/main')
testOutputDir file('build/classes/test')
}
}
}