-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
107 lines (92 loc) · 2.93 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
buildscript {
// TODO: lost track of which repos are needed
repositories {
mavenCentral()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'http://repo.spring.io/plugins-release/' }
}
}
plugins {
id 'maven-publish'
id 'java-gradle-plugin' // applies "java" plugin and adds gradleApi() to dependencies
}
group 'org.jboss.set.gradle'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
// TODO: weed out
mavenLocal()
mavenCentral()
jcenter()
maven { url 'http://repo.spring.io/plugins-release/' }
}
ext {
jbossLoggingVersion = "3.3.2.Final"
jbossLoggingAnnotationsVersion = "2.1.0.Final"
mavenVersion = "3.5.4"
}
dependencies {
compile localGroovy()
compile "org.apache.maven:maven-model:$mavenVersion"
compile "org.apache.maven:maven-model-builder:$mavenVersion"
compile "org.jboss.logging:jboss-logging:$jbossLoggingVersion"
compile "org.jboss.logging:jboss-logging-annotations:$jbossLoggingAnnotationsVersion"
compile "commons-lang:commons-lang:2.6"
annotationProcessor "org.jboss.logging:jboss-logging:$jbossLoggingVersion"
annotationProcessor "org.jboss.logging:jboss-logging-annotations:$jbossLoggingAnnotationsVersion"
annotationProcessor "org.jboss.logging:jboss-logging-processor:$jbossLoggingAnnotationsVersion"
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile gradleTestKit()
}
// plugin descriptor
gradlePlugin {
plugins {
versionManipulationPlugin {
id = 'version-manipulation'
implementationClass = 'org.jboss.set.gradle.versionmanipulation.VersionManipulationPlugin'
}
}
}
// separate source set and task for functional tests
sourceSets {
functionalTest {
java.srcDir file('src/functTest/java')
resources.srcDir file('src/functTest/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntime
runtimeClasspath += output + compileClasspath
}
}
task functionalTest(type: Test) {
description = 'Runs functional tests'
group = 'verification'
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
mustRunAfter test
}
check.dependsOn functionalTest
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
// publishing in PNC
maven {
name = "PNC"
url = System.getProperty('AProxDeployUrl')
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "Bearer " + System.getProperty('accessToken')
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
task install {
description 'Publishes to maven local repository'
dependsOn publishToMavenLocal
}