-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
153 lines (136 loc) · 4.41 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
buildscript {
ext {
springBootVersion = '1.5.6.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
/*
* WARNING: the 'net.researchgate.release' plugin is not working properly yet. It produces invalid
* signatures. If you bypass it -- by running '$ ./gradlew clean uploadArchives' -- you can succeed.
*/
plugins {
id 'net.researchgate.release' version '2.4.0'
}
description = "Apereo Soffit Samples version ${version} for uPortal"
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
war {
baseName = 'soffit-samples'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
configurations {
providedRuntime
}
dependencies {
compile("jstl:jstl:${jstlVersion}")
compile("net.sf.ehcache:ehcache:${ehcacheVersion}")
compile("org.apache.httpcomponents:httpclient:${httpclientVersion}")
compile("org.jasig.portal:uPortal-soffit-renderer:${soffitVersion}")
compile('org.springframework.boot:spring-boot-starter-cache')
compile('org.springframework.boot:spring-boot-starter-web')
compile("com.github.ulisesbocchio:jasypt-spring-boot-starter:${jasyptSpringBootVersion}")
compile("org.aspectj:aspectjweaver:${aspectjVersion}")
providedRuntime('org.apache.tomcat.embed:tomcat-embed-jasper')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
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'
}
}
/*
* Release Management
*
* Based on Sonatype's guide for publishing w/ Gradle: http://central.sonatype.org/pages/gradle.html
*/
ext {
publishingUsername = project.hasProperty('ossrhUsername') ? project.getProperty('ossrhUsername') : ""
publishingPassword = project.hasProperty('ossrhPassword') ? project.getProperty('ossrhPassword') : ""
}
signing {
required { gradle.taskGraph.hasTask('uploadArchives') }
sign configurations.archives
}
tasks.withType(Jar) {
from(project.projectDir) {
include "${rootDir}/LICENSE"
into 'META-INF'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: publishingUsername, password: publishingPassword)
}
pom.project {
name 'soffit-samples'
packaging 'war'
// optionally artifactId can be defined here
description 'Sample Soffit applications for Apereo uPortal.'
url 'https://github.com/uPortal-Project/soffit-samples'
scm {
connection 'scm:[email protected]:uPortal-Project/soffit-samples.git'
url 'https://github.com/uPortal-Project/soffit-samples'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
organization 'uPortal Developers'
organizationUrl 'https://github.com/Jasig/uPortal/graphs/contributors'
}
}
}
}
}
}
/*
* Configuration for the 'gradle-release' plugin (https://github.com/researchgate/gradle-release)
*/
release {
git {
requireBranch = ''
}
}
afterReleaseBuild.dependsOn uploadArchives