forked from luno/luno-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
101 lines (87 loc) · 2.28 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
buildscript {
ext {
springBootVersion = '1.5.3.RELEASE'
snapshot = version.endsWith('-SNAPSHOT')
}
repositories {
maven {
url "${artifactory_contextUrl}/plugins-release"
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
name = "maven-main-cache"
}
jcenter()
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.18"
}
}
plugins {
id "com.jfrog.artifactory" version "4.4.18"
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'org.springframework.boot'
apply plugin: "com.jfrog.artifactory"
version = '1.0.0-SNAPSHOT'
group = 'com.luno'
///////// BUILD SPECIFICS /////////
assert JavaVersion.current().java8Compatible:
"At least Java $javaVersion is required, current JVM is ${JavaVersion.current()}"
jar {
baseName = 'luno-java'
manifest {
attributes 'Implementation-Title': rootProject.name, 'Implementation-Version': rootProject.version
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-web-services')
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'com.github.mmazi:rescu:1.9.0'
testCompile 'junit:junit:4.8.1'
}
task wrapper(type: Wrapper, group: 'Gradle') {
gradleVersion = '3.5'
}
repositories {
mavenLocal()
add buildscript.repositories.getByName("maven-main-cache")
jcenter()
mavenCentral()
}
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = 'libs-snapshot-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
defaults {
publications ('mavenJava')
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}