forked from uschi2000/atlasdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (74 loc) · 2.42 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
import org.gradle.plugins.ide.idea.model.IdeaModel
buildscript {
repositories {
mavenCentral()
maven {
url 'https://dl.bintray.com/palantir/releases/'
}
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
classpath 'com.palantir:gradle-baseline-java:0.7.1'
classpath 'com.palantir:jacoco-coverage:0.4.0'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
}
}
plugins {
id 'com.palantir.git-version' version '0.1.3'
id 'org.inferred.processors' version '1.1'
}
repositories {
mavenCentral()
maven {
url 'https://dl.bintray.com/palantir/releases/'
}
}
apply from: 'gradle/versions.gradle'
group = 'com.palantir.atlasdb'
version = gitVersion()
description = 'Transactional distributed database layer'
task clean(type: Delete) {
delete buildDir
}
apply plugin: 'com.palantir.jacoco-full-report'
jacoco {
toolVersion = libVersions.jacoco
}
subprojects {
task allDeps(type: DependencyReportTask) {}
}
apply from: 'idea.gradle'
// Setup copyright notice as JavaDoc and no newline after it
project.afterEvaluate {
def ideaRootModel = project.rootProject.extensions.findByType(IdeaModel)
if (ideaRootModel) {
ideaRootModel.project.ipr.withXml { provider ->
def node = provider.asNode()
def copyrightManager = node.component.find { it.'@name' == 'CopyrightManager' }
copyrightManager.append(new XmlParser().parseText("""
<LanguageOptions name="__TEMPLATE__">
<option name="addBlankAfter" value="false" />
<option name="separateBefore" value="true" />
<option name="lenBefore" value="2" />
</LanguageOptions>
""".stripIndent()))
}
}
}
def ideaSetModuleLevel(idea, targetCompatibility) {
if (idea == null) return
idea.module.jdkName = targetCompatibility
idea.module.iml.withXml {
it.asNode().component.find { it.@name == 'NewModuleRootManager' }.@LANGUAGE_LEVEL = ("JDK_" + targetCompatibility).replaceAll('\\.', '_')
}
}
allprojects {
// This allows tests that require an artefact to exist to
// decide whether to call gradle themselves or not
tasks.withType(Test) {
systemProperty 'RUNNING_IN_GRADLE', 'true'
}
}