This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
78 lines (66 loc) · 1.7 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
import java.text.SimpleDateFormat
project.ext {
groupId = 'org.hypoport'
artifactId = 'hal-service-document-consumer'
version = newVersion()
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
repositories {
mavenLocal()
// mavenCentral()
maven { url "http://nexus-beta.hypoport.local/nexus/content/groups/europace2/" }
}
dependencies {
def springVersion = '3.2.10.RELEASE'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.3.3'
compile('com.theoryinpractise:halbuilder-standard:4.0.1') {
exclude module: 'jackson-annotations'
}
compile 'com.damnhandy:handy-uri-templates:2.0.2'
testCompile 'org.testng:testng:5.14.2'
testCompile 'org.easytesting:fest-assert:1.4'
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'de.hypoport.testutils:testng-testutils:1.5'
testCompile 'commons-io:commons-io:2.4'
}
def newVersion() {
return new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date())
}
publishing {
repositories {
maven {
url project.nexusUrl
credentials {
username project.nexusUsername
password project.nexusPassword
}
}
}
publications {
mavenJava(MavenPublication) {
groupId project.ext.groupId
artifactId project.ext.artifactId
version project.ext.version
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
}
task writeVersionTxt << {
new File("version.txt").withWriter { out ->
out.print project.ext.version
}
}
tasks.publish.dependsOn writeVersionTxt
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}