-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
88 lines (78 loc) · 2.36 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
buildscript {
ext {
}
}
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'idea'
sourceCompatibility = 1.8
jacoco {
toolVersion = "0.7.6.201602180812"
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile("au.com.dius:pact-jvm-model:3.3.1")
compile("com.google.guava:guava:19.0")
compile("junit:junit:4.12")
compile("org.springframework:spring-test:4.3.3.RELEASE")
compile("org.springframework:spring-web:4.3.3.RELEASE")
compile("org.springframework:spring-webmvc:4.3.3.RELEASE")
compile("javax.servlet:javax.servlet-api:3.1.0")
compile("org.codehaus.groovy:groovy-all:2.4.7-indy")
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': version,
'Build-By': System.getProperty('user.name'),
'Build-No': System.getenv().BUILD_NUMBER?.toInteger() ?: 'local build',
'Git-branch': System.getenv().GIT_BRANCH ?: 'local build',
'Git-commit': System.getenv().GIT_COMMIT ?: 'local build',
'Build-Date': new Date(),
'Build-JDK': System.getProperty('java.version'),
'Build-Gradle': gradle.gradleVersion
)
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
publishing {
ext.nexusUrl = project.version.endsWith('-SNAPSHOT') ? 'http://mgrsfxrepnex001.fx.eos.lcl/content/repositories/snapshots/' : 'http://mgrsfxrepnex001.fx.eos.lcl/content/repositories/releases/'
ext.nexusUser = project.hasProperty('nexusUser') ? project.getProperty('nexusUser') : 'noone'
ext.nexusPassword = project.hasProperty('nexusPassword') ? project.getProperty('nexusPassword') : 'geheim'
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
repositories {
maven {
credentials {
username "${nexusUser}"
password "${nexusPassword}"
}
url "${nexusUrl}"
}
}
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
}
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}