-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle
90 lines (75 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
buildscript {
apply from: rootProject.file('dependencies.gradle')
repositories {
mavenCentral()
google()
maven { url "https://plugins.gradle.org/m2" }
}
dependencies {
classpath dep.androidPlugin
classpath dep.kotlinCompiler
}
}
plugins {
id("io.github.gradle-nexus.publish-plugin") version '1.0.0'
id("org.jetbrains.dokka") version "1.6.0"
}
allprojects {
repositories {
mavenCentral()
google()
maven { url "https://plugins.gradle.org/m2" }
}
ext.applyForPlugin = { String plugin, Closure<Project> action ->
applyForPlugins([plugin], action)
}
ext.applyForPlugins = { Iterable<String> plugins, Closure<Project> action ->
for (String plugin : plugins) {
if (project.plugins.hasPlugin(plugin)) {
action.call(project)
} else {
project.plugins.withId(plugin, {
action.call(project)
})
}
}
}
tasks.withType(Javadoc).configureEach {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
subprojects {
applyForPlugins(['com.android.library']) { project ->
project.with {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
testInstrumentationRunner dep.testInstrumentationRunner
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility rootProject.ext.sourceCompatibilityVersion
targetCompatibility rootProject.ext.targetCompatibilityVersion
}
}
}
}
applyForPlugins(['java']) { project ->
project.with {
sourceCompatibility = rootProject.ext.sourceCompatibilityVersion
targetCompatibility = rootProject.ext.targetCompatibilityVersion
}
}
}
apply from: rootProject.file('nexus-publish.gradle')
tasks.named("dokkaHtmlMultiModule") {
outputDirectory.set(file("docs"))
}