This repository has been archived by the owner on May 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
128 lines (111 loc) · 3.92 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
buildscript {
configurations.classpath {
resolutionStrategy.activateDependencyLocking()
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1"
}
}
plugins {
id 'com.gradle.build-scan' version '2.0.2' // declare before any other plugin
id 'com.google.osdetector' version '1.4.0'
id "com.github.hierynomus.license" version '0.15.0'
id 'com.github.sherter.google-java-format' version '0.8' apply false
id 'me.champeau.gradle.jmh' version '0.4.7' apply false
id 'io.morethan.jmhreport' version '0.6.2.1' apply false
id 'io.spring.dependency-management' version '1.0.7.RELEASE' apply false
id 'com.google.protobuf' version '0.8.8' apply false
}
//buildScan { licenseAgreementUrl = 'https://gradle.com/terms-of-service'; licenseAgree = 'yes' }
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
allprojects {
dependencyLocking {
lockAllConfigurations()
}
}
subprojects {
apply from: "../dependency-management.gradle"
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'com.github.sherter.google-java-format'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'license'
sourceCompatibility = 1.8
targetCompatibility = 1.8
project.version += project.hasProperty('versionSuffix') ? project.property('versionSuffix') : ''
repositories {
jcenter()
maven {
url = 'https://artifactory.netifiinc.com/artifactory/libs-release-local'
credentials {
username = project.findProperty('netifiArtifactoryUsername') ?: System.getenv('NETIFI_ARTIFACTORY_USERNAME')
password = project.findProperty('netifiArtifactoryPassword') ?: System.getenv('NETIFI_ARTIFACTORY_PASSWORD')
}
}
maven {
url = 'https://artifactory.netifiinc.com/artifactory/libs-snapshot-local'
credentials {
username = project.findProperty('netifiArtifactoryUsername') ?: System.getenv('NETIFI_ARTIFACTORY_USERNAME')
password = project.findProperty('netifiArtifactoryPassword') ?: System.getenv('NETIFI_ARTIFACTORY_PASSWORD')
}
}
maven {
url "https://dl.bintray.com/netifi/netifi-oss"
}
maven { url 'http://repo.spring.io/libs-snapshot' }
maven { url 'https://oss.jfrog.org/oss-snapshot-local' }
maven { url 'https://oss.jfrog.org/oss-release-local' }
mavenCentral()
}
googleJavaFormat {
toolVersion = '1.6'
exclude '**/generated'
}
// Build Source Jars
def sourcesJarMap = [name: 'sourcesJar', type: Jar, dependsOn: classes]
project.tasks.create(sourcesJarMap, {
classifier = 'sources'
from sourceSets.main.allSource
version = "${project.version}"
})
// Build Javadoc Jars
def javadocJarMap = [name: 'javadocJar', type: Jar, dependsOn: javadoc]
project.tasks.create(javadocJarMap, {
classifier = 'javadoc'
from javadoc.destinationDir
version = "${project.version}"
})
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
license {
header rootProject.file('resources/HEADER')
strictCheck true
excludes(["**/*.xml", "**/*.json"])
}
license.mapping('java', 'SLASHSTAR_STYLE')
}
apply from: "artifactory.gradle"
apply from: "bintray.gradle"