-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
156 lines (119 loc) · 4.13 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
import com.mooregreatsoftware.gradle.JavacUtils
// tag::buildfile1[]
buildscript {
repositories {
jcenter()
maven { name = 'Defaults Plugin Repo'; url = 'http://dl.bintray.com/jmoore/java-lib' }
maven { name = 'Gradle Plugin Portal'; url = 'https://plugins.gradle.org/m2/' }
mavenLocal()
}
ext.kotlin_version = '1.1.2'
ext.dokka_version = '0.9.13'
dependencies {
classpath 'com.mooregreatsoftware:gradle-defaults:4.0.0'
// Kotlin support
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
// AsciiDoctor documentation
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
}
}
plugins {
id 'groovy'
id 'com.jfrog.bintray' version '1.7.1'
}
apply plugin: 'com.mooregreatsoftware.defaults'
group = 'com.mooregreatsoftware'
description = 'Plugin providing opinionated defaults for Gradle projects.'
defaults {
// make sure configuration is done for enforcing licenses, BinTray, etc.
openSource = true
compatibilityVersion = 1.8
orgId = 'jdigger'
bintrayRepo = 'java-lib'
bintrayLabels = ['gradle', 'plugin']
developers = [
[id: 'jmoore', name: 'Jim Moore', email: '[email protected]']
]
copyrightYears = '2014-2017'
vcsWriteUrl = "[email protected]:jdigger/gradle-defaults.git"
lombok.version = "1.16.12"
checkerFramework.version = "2.1.8"
}
// end::buildfile1[]
apply plugin: "kotlin"
apply plugin: 'org.jetbrains.dokka'
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'java-gradle-plugin'
githubPages {
deleteExistingFiles = true
pages {
from asciidoctor
}
}
asciidoctor {
sourceDir = file('docs')
separateOutputDirs = false
outputDir = file("$buildDir/docs")
attributes 'source-highlighter': 'coderay'
}
compileKotlin.kotlinOptions.jvmTarget = "1.8"
dokka {
jdkVersion = 8
// linkMapping {
// dir = "src/main/kotlin"
// url = "https://github.com/gradle/gradle/tree/master/subprojects/core/src/main/java"
//// suffix = "#L"
// }
// sourceDirs = files('src/main/kotlin')
}
tasks.withType(Test) {
scanForTestClasses = false
include "**/*Spec.class"
exclude "**/Abstract*Spec.class"
}
classes.mustRunAfter "copyMainKotlinClasses"
JavacUtils.registerAnnotationProcessorOptions(project,
[new JavacUtils.Option("stubs", "${rootProject.projectDir}/gradle/stubs")])
repositories {
maven {
name = 'Plugin Portal'
url = 'https://plugins.gradle.org/m2/'
}
}
dependencies {
compile 'org.ajoberstar:gradle-git:1.3.2'
compile 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.12.1'
compile 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
compile 'io.javaslang:javaslang:2.0.5'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile "org.spockframework:spock-core:1.0-groovy-2.4", {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
testCompile 'com.netflix.nebula:nebula-test:4.2.2'
testCompile "org.gradle:gradle-tooling-api:${gradle.gradleVersion}" // hack to get the source
testCompile "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // hack to get the source
// tiny http server for testing
testCompile 'org.nanohttpd:nanohttpd:2.3.1'
// Lombok and Checker Framework support for tests
def lombok_version = "1.16.8"
def checker_version = "2.1.8"
testCompile "org.projectlombok:lombok:$lombok_version"
testCompile "org.checkerframework:checker:$checker_version"
testCompile "org.checkerframework:checker-qual:$checker_version"
testCompile "org.checkerframework:jdk8:$checker_version"
testCompile "org.checkerframework:compiler:$checker_version"
}
wrapper {
gradleVersion = '2.14.1'
}