-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
116 lines (105 loc) · 2.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
buildscript {
ext {
commonsIoVersion = "2.8.0"
jcommanderVersion = "1.81"
jacksonVersion = "2.12.2"
}
}
plugins {
id "org.springframework.boot" version "2.4.5"
id "java"
id "idea"
id "application"
id "maven-publish"
id "io.freefair.lombok" version "5.1.1"
id "pl.allegro.tech.build.axion-release" version "1.14.2"
}
scmVersion {
tag {
prefix.set("v")
versionSeparator.set("")
branchPrefix.set([
'release/.*': 'release-v',
'hotfix/.*' : 'hotfix-v'
])
}
nextVersion {
suffix.set("SNAPSHOT")
separator.set("-")
}
}
repositories {
if (project.hasProperty('jenkins-ci')) {
maven {
url "${System.properties['nexus.url']}/repository/cognizone-group"
credentials {
username = System.properties['nexus.username']
password = System.properties['nexus.password']
}
allowInsecureProtocol(true)
}
}
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.spring.io/release" }
}
lombok {
generateLombokConfig.enabled = false
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
group = "zone.cogni.tool.foldersyncotron"
project.version = scmVersion.version
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
idea {
project {
jdkName = '11'
languageLevel = '11'
}
}
application {
mainClass = "cogni.zone.tools.foldersyncotron.app.FolderSyncotron"
}
dependencies {
implementation("commons-io:commons-io:${commonsIoVersion}")
implementation("com.beust:jcommander:${jcommanderVersion}")
implementation("com.fasterxml.jackson.core:jackson-core:${jacksonVersion}")
implementation("com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}")
implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = group
artifactId = 'foldersyncotron'
version = scmVersion.version
artifact(bootJar)
}
}
repositories {
if (project.hasProperty("publishToCognizoneArchiva")) {
maven {
credentials {
username = System.properties['archiva.username']
password = System.properties['archiva.password']
}
name = 'cognizone'
url = System.properties['archiva.url']
}
}
if (project.hasProperty("publishToCognizoneNexus")) {
maven {
credentials {
username = System.properties['nexus.username']
password = System.properties['nexus.password']
}
def releasesRepoUrl = "${System.properties['nexus.url']}/repository/cognizone-release"
def snapshotsRepoUrl = "${System.properties['nexus.url']}/repository/cognizone-snapshot"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
allowInsecureProtocol(true)
}
}
}
}