This repository has been archived by the owner on Apr 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
124 lines (106 loc) · 3.5 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
apply plugin: 'java'
apply plugin: 'idea'
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.3.RELEASE")
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4+"
}
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
// the details about the project
group = 'com.soriole'
version = '2.0.2'
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.0.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.0.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-websocket', version: '2.0.1.RELEASE'
compile(group: 'org.reflections', name: 'reflections', version: '0.9.9-RC1') {
exclude(module: 'javassist')
}
compile group: 'commons-configuration', name: 'commons-configuration', version: '1.10'
compile group: 'com.google.guava', name: 'guava', version: '18.0'
compile group: 'com.google.protobuf', name: 'protobuf-java', version: '3.5.1'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.59'
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.59'
compile group: 'commons-collections', name: 'commons-collections', version: '3.2.1'
compile group: 'org.mapdb', name: 'mapdb', version: '3.0.5'
runtime group: 'com.h2database', name: 'h2', version: '1.4.197'
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.0.1.RELEASE'
}
apply plugin: 'com.google.protobuf'
protobuf {
protoc {
// Download from repositories
artifact = 'com.google.protobuf:protoc:3.0.0'
}
}
/**
* Task to create jarFile that can be used as dependency in another projects
* and to install it to local maven repository
*/
task libraryJar(type: Jar) {
from(sourceSets.main.output) {
include "**"
exclude "*.proto"
exclude "*.properties"
}
}
/**
* Task to create standalone Spring application
*/
apply plugin: 'org.springframework.boot'
bootJar {
baseName = rootProject.name + "-standalone"
version=null
mainClassName = 'com.soriole.kademlia.KademliaApplication'
}
apply plugin: 'maven-publish'
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
apply plugin: "com.jfrog.artifactory"
artifactory {
if (project.hasProperty('contextUrl') &&
project.hasProperty('artifactory_user') &&
project.hasProperty('artifactory_password'))
{
contextUrl = "${artifactory_contextUrl}"
}else{
logger.warn "Artifactory deployment is skipped due to missing user data."
logger.quiet "Please add user data to `gradle.properties` file if you want to publish changes."
return -1;
}
publish {
repository {
repoKey = 'release'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
defaults {
publications('mavenJava')
}
}
resolve {
repository {
repoKey = 'libs-release'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
artifactoryPublish { dependsOn libraryJar }