-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
173 lines (146 loc) · 4.9 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.41"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
}
}
plugins {
id 'java'
id 'java-library'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.3.41'
id 'com.jfrog.artifactory' version '4.16.1'
id 'signing'
}
repositories {
jcenter()
}
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'maven-publish'
apply plugin: 'maven'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'signing'
repositories {
jcenter()
}
group = 'com.atlassian.bootgraph'
version = '1.2.4'
dependencyManagement {
dependencies {
dependency 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
dependency 'org.jetbrains.kotlin:kotlin-reflect:1.3.41'
dependency 'guru.nidi:graphviz-java:0.12.1'
// Modules should import this in compileOnly scope to let users
// import their own version of Spring!
dependency 'org.springframework.boot:spring-boot-starter:2.2.2.RELEASE'
dependency 'org.springframework.boot:spring-boot-starter-test:2.2.2.RELEASE'
dependency 'org.junit.jupiter:junit-jupiter-api:5.5.2'
dependency 'org.junit.jupiter:junit-jupiter-params:5.5.2'
dependency 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
dependency 'org.jetbrains.kotlin:kotlin-test:1.3.41'
dependency 'org.jetbrains.kotlin:kotlin-test-junit5:1.3.41'
dependency 'com.willowtreeapps.assertk:assertk:0.22'
}
}
// default dependencies for all modules
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
testCompile 'org.junit.jupiter:junit-jupiter-api'
testCompile 'org.junit.jupiter:junit-jupiter-params'
testCompile 'org.junit.jupiter:junit-jupiter-engine'
testCompile 'org.jetbrains.kotlin:kotlin-test'
testCompile 'org.jetbrains.kotlin:kotlin-test-junit5'
testCompile 'org.jetbrains.kotlin:kotlin-test-junit5'
testCompile 'com.willowtreeapps.assertk:assertk:0.22'
}
test {
useJUnitPlatform()
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
javadoc.failOnError = false
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
def pomConfig = {
licenses {
license {
name "Apache License 2.0"
url "http://www.apache.org/licenses/"
distribution "repo"
}
}
developers {
developer {
id "thombergs"
name "Tom Hombergs"
email "tom.hombergs@gmail.com"
}
}
scm {
url "https://github.com/atlassian-labs/bootgraph"
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
groupId project.group
artifactId project.name
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'A library for visualizing Spring Boot application code')
root.appendNode('name', project.name)
root.appendNode('url', 'https://github.com/atlassian-labs/bootgraph')
root.children().last() + pomConfig
}
}
}
}
artifactory {
publish {
contextUrl = 'https://packages.atlassian.com/'
repository {
repoKey = 'central'
username = System.env.ARTIFACTORY_USER
password = System.env.ARTIFACTORY_KEY
}
defaults {
publications('maven')
publishIvy = false
publishBuildInfo = false
}
}
}
signing {
useInMemoryPgpKeys("$System.env.SIGNING_KEY", "$System.env.SIGNING_PASSWORD")
sign publishing.publications.maven
}
}