-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
126 lines (109 loc) · 3.83 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
/*
* Copyright 2017 The Hyve
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
buildscript {
repositories {
google()
mavenCentral()
mavenLocal()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradle_android_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.github.bjoernq:unmockplugin:$unmock_plugin_version"
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:$dokka_android_gradle_plugin_version"
classpath("org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version")
}
}
plugins {
id("io.github.gradle-nexus.publish-plugin") version "$publish_plugin_version"
id("com.github.ben-manes.versions") version "$versions_plugin_version"
}
allprojects {
ext.githubRepoName = 'RADAR-base/radar-commons-android'
ext.githubUrl = 'https://github.com/' + githubRepoName + '.git'
ext.issueUrl = 'https://github.com/' + githubRepoName + '/issues'
ext.website = 'http://radar-base.org'
version = "$project_version"
group = 'org.radarbase'
ext.versionCode = 54
}
subprojects {
if (it.name == 'radar-android-avro') {
return
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'idea'
//---------------------------------------------------------------------------//
// Sources and classpath configurations //
//---------------------------------------------------------------------------//
repositories {
google()
mavenCentral()
mavenLocal()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
idea {
module {
downloadSources = true
}
}
tasks.matching { it instanceof Test }.all {
testLogging {
showExceptions = true
showStandardStreams = true
showCauses = true
showStackTraces = true
exceptionFormat 'full'
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "$java_version"
apiVersion = '1.8'
languageVersion = '1.8'
}
}
}
// Configuration for the gradle-versions plugin https://github.com/ben-manes/gradle-versions-plugin
def isNonStable = { String version ->
def stableKeyword = ["RELEASE", "FINAL", "GA"].any { version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
// Configuration for the gradle-versions plugin https://github.com/ben-manes/gradle-versions-plugin
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
nexusPublishing {
repositories {
sonatype {
username = project.hasProperty("ossrh.user") ? project.property("ossrh.user") : System.getenv("OSSRH_USER")
password = project.hasProperty("ossrh.password") ? project.property("ossrh.password") : System.getenv("OSSRH_PASSWORD")
}
}
}
wrapper {
gradleVersion "$gradle_version"
}