forked from uschi2000/atlasdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
119 lines (102 loc) · 3.72 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
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.google.protobuf:protobuf-gradle-plugin:0.8.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.4.12'
classpath 'com.palantir.gradle.javadist:gradle-java-distribution:1.3.0'
classpath 'gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.8.0'
classpath 'com.palantir:gradle-baseline-java:0.10.0'
classpath 'com.palantir:jacoco-coverage:0.4.0'
classpath "com.netflix.nebula:gradle-dependency-lock-plugin:4.3.2"
classpath 'com.netflix.nebula:nebula-dependency-recommender:3.6.3'
classpath 'com.netflix.nebula:nebula-publishing-plugin:4.9.1'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '1.2.4'
id 'com.palantir.configuration-resolver' version '0.1.0'
id 'com.palantir.git-version' version '0.5.2'
id 'org.inferred.processors' version '1.2.4-rc2'
id 'org.unbroken-dome.test-sets' version '1.2.0'
}
repositories {
mavenCentral()
maven {
url 'https://dl.bintray.com/palantir/releases/'
}
}
apply from: 'gradle/versions.gradle'
group = 'com.palantir.atlasdb'
// if the version ends with a git hash, replace the 'g' with an 'r'
// this is to get around maven regexes that considers -g<hash> a snapshot
version = gitVersion().replaceAll('-g([a-fA-F0-9]+)$', '-r$1')
description = 'Transactional distributed database layer'
task printLastVersion {
doLast {
def details = versionDetails()
println details.lastTag
}
}
apply plugin: 'com.palantir.jacoco-full-report'
jacoco {
toolVersion = libVersions.jacoco
}
allprojects {
apply plugin: 'nebula.dependency-recommender'
dependencyRecommendations {
strategy OverrideTransitives
propertiesFile file: project.rootProject.file('versions.props')
}
configurations.all {
resolutionStrategy {
failOnVersionConflict()
}
}
}
subprojects {
apply plugin: 'com.palantir.configuration-resolver'
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'
}
}