-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
166 lines (146 loc) · 5.08 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
154
155
156
157
158
159
160
161
162
163
164
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "io.github.gradle-nexus:publish-plugin:1.0.0"
}
}
version "4.0.0"
group "com.bertramlabs.plugins"
apply plugin: "org.grails.grails-plugin"
apply plugin: "org.grails.grails-gsp"
apply plugin: 'maven-publish'
apply plugin: 'java-library'
apply plugin: 'signing'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "org.grails.grails-plugin"
// Used for publishing to central repository, remove if not needed
ext {
isBuildSnapshot = version.endsWith('-SNAPSHOT')
isReleaseVersion = !isBuildSnapshot
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:gsp"
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:web-plugin"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.10"
compileOnly "io.micronaut:micronaut-inject-groovy"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.mockito:mockito-core"
testCompile "org.grails:grails-web-testing-support"
console "org.grails:grails-console"
}
if (isReleaseVersion) {
apply plugin: "io.github.gradle-nexus.publish-plugin"
nexusPublishing {
repositories {
sonatype {
if(project.hasProperty('mavenUser')) {
username = mavenUser
password = mavenPassword
}
}
}
}
} else {
}
publishing {
publications {
maven(MavenPublication) {
artifactId 'grails-security-bridge'
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'grails-security-bridge'
description 'A Common Security Bridge Interface originally based off of platform-core for grails.'
url 'https://github.com/bertramdev/grails-security-bridge'
scm {
url 'https://github.com/bertramdev/grails-security-bridge'
connection 'scm:https://[email protected]/bertramdev/grails-security-bridge.git'
developerConnection 'scm:git://github.com/bertramdev/grails-security-bridge.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/license/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'davydotcom'
name 'David Estes'
email '[email protected]'
}
}
}
}
from components.java
}
}
repositories {
maven {
if( !isReleaseVersion ) {
url = "http://nexus.bertramlabs.com/content/repositories/snapshots"
if(project.hasProperty('labsNexusUser')) {
credentials {
username = labsNexusUser
password = labsNexusPassword
}
}
}
}
}
}
java {
withSourcesJar()
withJavadocJar()
}
afterEvaluate {
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
sign publishing.publications.maven
}
}
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
//do not generate extra load on Nexus with new staging repository if signing fails
tasks.withType(io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository).configureEach {
shouldRunAfter(tasks.withType(Sign))
}