-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle
134 lines (109 loc) · 4.1 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// 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:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// publish plugin for bintray
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
google()
}
// this is needed for running plugin tests
configurations.all {
resolutionStrategy {
force 'org.codehaus.groovy:groovy-all:2.4.12'
}
}
if (!['Blade', 'sample', 'module'].contains(project.name)) {
println " --> $project.name "
group = LIB_GROUP_ID
version = LIB_VERSION
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
/* Prevents sporadic compilation error:
* 'Bad service configuration file, or exception thrown while constructing
* Processor object: javax.annotation.processing.Processor: Error reading
* configuration file'
*
* See https://discuss.gradle.org/t/gradle-not-compiles-with-solder-tooling-jar/7583/20
*/
tasks.withType(JavaCompile) { options.fork = true }
File privateProperties = rootProject.file('private.properties')
if (privateProperties.exists()) {
ext.priv = parseConfig(privateProperties)
task srcJar(type: Jar) {
from sourceSets.main.allJava
classifier "sources"
}
task docJar(type: Jar) {
classifier "javadoc"
}
artifacts {
archives srcJar
archives docJar
}
bintray {
dryRun false
user = priv.BINTRAY_USER
key = priv.BINTRAY_KEY
configurations = ['archives']
pkg {
repo = LIB_REPO_NAME
name = LIB_PACKAGE_NAME
licenses = LIB_LICENSES
vcsUrl = LIB_GIT_URL
version {
name = LIB_VERSION
desc = LIB_VERSION_DESC
}
}
}
}
}
}
ext.deps = [
/* Android */
// Android 4.0.x (http://mvnrepository.com/artifact/com.google.android/android)
android_runtime : 'com.google.android:android:4.0.1.2',
google_support_v4 : 'com.google.android:support-v4:r7',
support_annotations: 'com.android.support:support-annotations:23.0.1',
// Javax Annotations (@Generated)
javax_annotations : 'org.glassfish:javax.annotation:10.0-b28',
// Square
javapoet : 'com.squareup:javapoet:1.11.1',
// Dagger2
dagger2 : 'com.google.dagger:dagger:2.11',
dagger2_compiler : 'com.google.dagger:dagger-compiler:2.11',
// Plugin
javassist_helper : 'eu.f3rog.javassist:helper:0.1.10',
gradle_plugin : 'com.android.tools.build:gradle:3.2.1',
snakeyaml : 'org.yaml:snakeyaml:1.17',
// Test dependencies
junit : 'junit:junit:4.12',
guava : 'com.google.guava:guava:26.0',
truth : 'com.google.truth:truth:0.42',
compiletesting : 'com.google.testing.compile:compile-testing:0.15',
autoservice : 'com.google.auto.service:auto-service:1.0-rc4',
autocommon : 'com.google.auto:auto-common:0.10',
groovy_all : 'org.codehaus.groovy:groovy-all:2.4.12',
spock : 'org.spockframework:spock-core:1.2-groovy-2.4'
]
def parseConfig(File config) {
config.withReader {
def prop = new Properties()
prop.load(it)
return (new ConfigSlurper().parse(prop))
}
}