-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
83 lines (68 loc) · 1.72 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.ajoberstar:gradle-git:0.8.0'
}
}
plugins {
id 'java'
id 'maven'
id 'eclipse'
id 'idea'
id 'net.franz-becker.gradle-lombok' version '1.5'
}
archivesBaseName = "creatubbles-wsapi"
group = 'com.creatubbles.api'
description = "WS API for Creatubbles"
sourceCompatibility = 1.6
targetCompatibility = 1.6
import org.ajoberstar.grgit.Grgit
if (System.getenv('BUILD_NUMBER') != null) {
version += "-${System.getenv('BUILD_NUMBER')}"
} else if (new File(projectDir, '.git').exists()) {
def repo = Grgit.open(project.file('.'))
version += "-${repo.log().find().abbreviatedId}"
} else {
version += "-CUSTOM"
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'com.google.code.gson', name: 'gson', version: '2.2.4'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.22.1'
}
lombok {
version = "1.16.8"
sha256 = "fe32b29b7b33eb2b19866cbc5345c59c9984a6036cc396856a04c0d09f99ea68"
}
import net.franz_becker.gradle.lombok.task.DelombokTask
task delombok(type: DelombokTask) {
args("src/main/java", "-d", "build/sources/delomboked/java")
}
tasks.eclipse.dependsOn installLombok
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
build.dependsOn sourceJar, javadoc
artifacts {
archives jar
archives sourceJar
}
uploadArchives {
mavendir = System.getenv('MAVENDIR') ?: project.getProperty('mavendir')
onlyIf {
return mavendir
}
repositories {
mavenDeployer {
repository(url: 'file://' + mavendir)
}
}
}