This repository has been archived by the owner on Dec 30, 2023. It is now read-only.
forked from gpc/fields
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
174 lines (149 loc) · 5.09 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
165
166
167
168
169
170
171
172
173
174
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1'
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
}
}
plugins {
id 'org.asciidoctor.jvm.convert' version '3.2.0'
}
version project.projectVersion
group 'org.grails.plugins'
apply plugin: 'org.grails.grails-plugin'
apply plugin: 'org.grails.grails-gsp'
apply plugin: "org.grails.grails-doc"
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "io.github.gradle-nexus.publish-plugin"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
provided 'org.springframework.boot:spring-boot-starter-logging'
provided "org.springframework.boot:spring-boot-starter-actuator"
provided "org.springframework.boot:spring-boot-autoconfigure"
provided "org.springframework.boot:spring-boot-starter-tomcat"
provided "org.grails:grails-web-boot"
provided "org.grails:grails-dependencies"
provided "javax.servlet:javax.servlet-api:$servletApiVersion"
compile "org.grails:scaffolding-core"
testCompile "org.grails:grails-web-testing-support"
testCompile "org.grails:grails-gorm-testing-support"
console "org.grails:grails-console"
testCompile 'org.javassist:javassist:3.29.0-GA'
testCompile "org.codehaus.groovy:groovy-dateutil"
testCompile "cglib:cglib-nodep:2.2.2"
testCompile("org.jodd:jodd-wot:$joddWotVersion") {
exclude module: 'slf4j-api'
exclude module: 'asm'
}
}
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
publishing {
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = 'jms'
version = project.version
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'Jms'
description = 'JMS integration for Grails'
url = 'https://github.com/gpc/jms'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'brownj'
name = 'Jeff Scott Brown'
email = '[email protected]'
}
developer {
id = 'sbglasius'
name = 'Søren Berg Glasius'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/gpc/jms.git'
developerConnection = 'scm:git:https://github.com/gpc/jms.git'
url = 'https://github.com/gpc/jms'
}
}
}
}
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
import io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository
tasks.withType(InitializeNexusStagingRepository).configureEach {
onlyIf { isReleaseVersion }
shouldRunAfter(tasks.withType(Sign))
}
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileIdExternalConfig") ? project.sonatypeOssStagingProfileIdExternalConfig : ''
nexusUrl = uri("https://oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
}
}
}
asciidoctor {
resources {
from('src/docs/images')
into "./images"
}
sources {
include 'index.adoc'
}
attributes 'experimental': 'true',
'compat-mode': 'true',
'toc': 'left',
'icons': 'font',
'version': project.version,
'sourcedir': 'src/main/groovy'
baseDirFollowsSourceDir()
outputDir = "${buildDir}/asciidoc"
}
task apiDocs(type: Copy) {
from groovydoc.outputs.files
into file("${buildDir}/asciidoc/api")
}
asciidoctor.dependsOn(apiDocs)
task snapshotVersion {
doLast {
if (isReleaseVersion) {
ant.propertyfile(file: "gradle.properties") {
entry(key: "version", value: "${project.version}-SNAPSHOT")
}
}
}
}