forked from cfparser/cfparser
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
184 lines (163 loc) · 4.58 KB
/
build.gradle
File metadata and controls
184 lines (163 loc) · 4.58 KB
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
175
176
177
178
179
180
181
182
183
184
plugins {
id "com.github.hierynomus.license" version "0.15.0"
id "com.diffplug.gradle.osgi.bndmanifest" version "3.18.1"
id 'net.researchgate.release' version '3.0.2' apply(false)
}
version = '2.15.0-SNAPSHOT'
license {
header rootProject.file('LICENSE')
exclude "./cfml.dictionary/**"
include "./cfml.parsing/**/*.java"
}
allprojects {
buildDir = rootProject.buildDir.path + File.separator + project.name
apply plugin: 'maven-publish'
group = 'com.github.cfmleditor'
}
subprojects {
apply plugin: 'net.researchgate.release'
release {
pushReleaseVersionBranch = 'master'
preTagCommitMessage = '[Release Cycle] - pre tag commit: '
tagCommitMessage = '[Release Cycle] - creating tag: '
newVersionCommitMessage = '[Release Cycle] - new version commit: '
git {
requireBranch.set('master')
pushToRemote.set('origin')
pushToBranchPrefix.set('')
commitVersionFileOnly.set(false)
signTag.set(false)
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
pom {
name = 'coldfusion-parser'
description = 'Stand-Alone ColdFusion Parser. Combined forks from github.com/denuno/cfml.parsing and github.com/denuno/cfml.dictionary.'
url = 'https://github.com/cfmleditor/cfparser'
inceptionYear = '2012'
organization {
name = 'cfmleditor'
}
licenses {
license {
name = 'The New BSD License'
url = 'http://www.opensource.org/licenses/bsd-license.html'
}
}
developers {
developer {
id = 'ryan'
name = 'Ryan Eberly'
email = 'ryaneberly@gmail.com'
organization = 'cfparser'
organizationUrl = 'https://github.com/ryaneberly'
}
developer {
id = 'jerron'
name = 'Jerron James'
email = 'jjames967@gmail.com'
organization = 'cfparser'
organizationUrl = 'https://github.com/jjames967'
}
developer {
id = 'gareth'
name = 'Gareth Edwards'
email = 'ghedwards@gmail.com'
organization = 'cfmleditor'
organizationUrl = 'https://github.com/ghedwards'
}
}
scm {
connection = 'scm:git:git@github.com:cfmleditor/cfparser.git'
developerConnection = 'scm:git:git@github.com:cfmleditor/cfparser.git'
url = 'git@github.com:cfmleditor/cfparser.git'
tag = 'cfparser-' + version
}
}
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'com.diffplug.gradle.osgi.bndmanifest'
apply plugin: 'signing'
javadoc {
options.addBooleanOption( "Xdoclint:none", true )
options.addBooleanOption( 'html5', true )
}
ext {
cfdistrorcFile = file("${System.properties['user.home']}/.cfdistrorc")
deployToMaven = cfdistrorcFile.exists()
}
jar.manifest.attributes(
'-removeheaders': 'Bnd-LastModified,Bundle-Name,Created-By,Tool,Private-Package',
'Bundle-SymbolicName': project.name,
'Bundle-Vendor': 'cfmleditor',
)
osgiBndManifest {
copyTo 'META-INF/MANIFEST.MF'
}
sourceCompatibility = 11
targetCompatibility = 11
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
artifacts { archives javadocJar, sourcesJar }
repositories {
mavenLocal()
mavenCentral()
maven { url "https://cfmlprojects.org/artifacts" }
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
//pom rootProject.publishing.publications.mavenJava.pom
}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
// https://oss.sonatype.org/service/local/staging/deploy/maven2
// https://oss.sonatype.org/content/repositories/snapshots
def releasesRepoUrl = "$rootProject.buildDir/repos/releases"
def snapshotsRepoUrl = "$rootProject.buildDir/repos/snapshots"
name = 'build'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
if (deployToMaven) {
ext['signing.keyId'] = project.findProperty('signkeyid')
ext['signing.password'] = project.findProperty('pass')
ext['signing.secretKeyRingFile'] = findProperty('secring')
println ext['signing.secretKeyRingFile']
signing { sign configurations.archives }
} else {
task signArchives() {
description = "Add a ${cfdistrorcFile} with signing info to enbable jar signing"
doFirst {
println "Signing is disabled without keys"
}
}
}
}