Skip to content

Commit 15cd3cb

Browse files
committed
Remove / comment out sections of build.gradle to enable it to build on github action runner
1 parent ae8da1a commit 15cd3cb

File tree

1 file changed

+106
-115
lines changed

1 file changed

+106
-115
lines changed

build.gradle

+106-115
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ buildscript {
88
plugins {
99
id "idea"
1010
id "java"
11-
id "maven-publish"
12-
id "com.palantir.git-version" version "0.12.1"
1311
id "io.spring.dependency-management" version "1.0.9.RELEASE"
1412
id "io.franzbecker.gradle-lombok" version "4.0.0"
15-
id "net.linguica.maven-settings" version "0.5"
1613
}
1714

1815
group "org.nrg.xnatx.plugins"
@@ -26,7 +23,6 @@ def vJavassist = "3.21.0-GA"
2623
def vAwaitility = "2.0.0"
2724

2825
repositories {
29-
mavenLocal()
3026
maven { url "https://nrgxnat.jfrog.io/nrgxnat/libs-release" }
3127
maven { url "https://nrgxnat.jfrog.io/nrgxnat/libs-snapshot" }
3228
mavenCentral()
@@ -207,44 +203,44 @@ tasks.register ( 'integrationTest', Test ) {
207203
test
208204
}
209205

210-
// Pulls in the Jenkins BUILD_NUMBER environment variable if available.
211-
def buildDate = new Date()
212-
def buildNumber = System.getenv().BUILD_NUMBER?.toInteger() ?: "Manual"
213-
def isDirty, branchName, gitHash, gitHashFull, commitDistance, lastTag, isCleanTag
214-
215-
try {
216-
def gitDetails = versionDetails()
217-
isDirty = gitVersion().endsWith ".dirty"
218-
branchName = gitDetails.branchName ?: "Unknown"
219-
gitHash = gitDetails.gitHash
220-
gitHashFull = gitDetails.gitHashFull
221-
commitDistance = gitDetails.commitDistance
222-
lastTag = gitDetails.lastTag
223-
isCleanTag = gitDetails.isCleanTag
224-
} catch (IllegalArgumentException e) {
225-
logger.info "Got an error trying to read VCS metadata from git. It's possible this project is not under VCS control. Using placeholder values for manifest entries."
226-
isDirty = true
227-
branchName = "Unknown"
228-
gitHash = "None"
229-
gitHashFull = "None"
230-
commitDistance = 0
231-
lastTag = "None"
232-
isCleanTag = false
233-
}
234-
235-
ext.gitManifest = manifest {
236-
attributes "Application-Name": pluginAppName,
237-
"Build-Date": buildDate,
238-
"Build-Number": buildNumber,
239-
"Implementation-Version": project.version,
240-
"Implementation-Sha": gitHash,
241-
"Implementation-Sha-Full": gitHashFull,
242-
"Implementation-Commit": commitDistance,
243-
"Implementation-LastTag": lastTag,
244-
"Implementation-Branch": branchName,
245-
"Implementation-CleanTag": isCleanTag,
246-
"Implementation-Dirty": isDirty
247-
}
206+
//// Pulls in the Jenkins BUILD_NUMBER environment variable if available.
207+
//def buildDate = new Date()
208+
//def buildNumber = System.getenv().BUILD_NUMBER?.toInteger() ?: "Manual"
209+
//def isDirty, branchName, gitHash, gitHashFull, commitDistance, lastTag, isCleanTag
210+
//
211+
//try {
212+
// def gitDetails = versionDetails()
213+
// isDirty = gitVersion().endsWith ".dirty"
214+
// branchName = gitDetails.branchName ?: "Unknown"
215+
// gitHash = gitDetails.gitHash
216+
// gitHashFull = gitDetails.gitHashFull
217+
// commitDistance = gitDetails.commitDistance
218+
// lastTag = gitDetails.lastTag
219+
// isCleanTag = gitDetails.isCleanTag
220+
//} catch (IllegalArgumentException e) {
221+
// logger.info "Got an error trying to read VCS metadata from git. It's possible this project is not under VCS control. Using placeholder values for manifest entries."
222+
// isDirty = true
223+
// branchName = "Unknown"
224+
// gitHash = "None"
225+
// gitHashFull = "None"
226+
// commitDistance = 0
227+
// lastTag = "None"
228+
// isCleanTag = false
229+
//}
230+
//
231+
//ext.gitManifest = manifest {
232+
// attributes "Application-Name": pluginAppName,
233+
// "Build-Date": buildDate,
234+
// "Build-Number": buildNumber,
235+
// "Implementation-Version": project.version,
236+
// "Implementation-Sha": gitHash,
237+
// "Implementation-Sha-Full": gitHashFull,
238+
// "Implementation-Commit": commitDistance,
239+
// "Implementation-LastTag": lastTag,
240+
// "Implementation-Branch": branchName,
241+
// "Implementation-CleanTag": isCleanTag,
242+
// "Implementation-Dirty": isDirty
243+
//}
248244

249245
task fatJar(type: Jar) {
250246
zip64 true
@@ -257,9 +253,9 @@ task fatJar(type: Jar) {
257253
exclude "META-INF/*.RSA"
258254
}
259255
duplicatesStrategy "exclude"
260-
manifest {
261-
from gitManifest
262-
}
256+
// manifest {
257+
// from gitManifest
258+
// }
263259
with jar
264260
}
265261

@@ -269,9 +265,9 @@ sourceSets.main.java {
269265
}
270266

271267
jar{
272-
manifest {
273-
from gitManifest
274-
}
268+
// manifest {
269+
// from gitManifest
270+
// }
275271
doLast {
276272
if (!gradle.taskGraph.hasTask(":fatJar")) {
277273
logger.warn 'WARNING: You should generally run fatJar instead of jar task for this plugin'
@@ -281,78 +277,73 @@ jar{
281277

282278
task sourceJar(type: Jar, dependsOn: classes) {
283279
classifier = "sources"
284-
manifest {
285-
from gitManifest
286-
}
280+
// manifest {
281+
// from gitManifest
282+
// }
287283
from sourceSets.main.allSource
288284
}
289285

290286
task javadocJar(type: Jar, dependsOn: javadoc) {
291287
classifier = "javadoc"
292-
manifest {
293-
from gitManifest
294-
}
288+
// manifest {
289+
// from gitManifest
290+
// }
295291
from javadoc.destinationDir
296292
}
297293

298-
publishing {
299-
publications {
300-
mavenJava(MavenPublication) {
301-
artifacts {
302-
artifact sourceJar
303-
artifact javadocJar
304-
artifact fatJar
305-
}
306-
307-
pom.withXml {
308-
def root = asNode()
309-
root.appendNode("name", pluginAppName)
310-
root.appendNode("description", "XNAT plugin for launching and managing containers.")
311-
root.appendNode("url", "https://github.com/nrgxnat/container-service")
312-
root.appendNode("inceptionYear", "2016")
313-
314-
def scm = root.appendNode("scm")
315-
scm.appendNode("url", "https://github.com/nrgxnat/container-service")
316-
scm.appendNode("connection", "scm:https://github.com/nrgxnat/container-service.git")
317-
scm.appendNode("developerConnection", "scm:git@github.com:nrgxnat/container-service")
318-
319-
def license = root.appendNode("licenses").appendNode("license")
320-
license.appendNode("name", "Simplified BSD 2-Clause License")
321-
license.appendNode("url", "https://xnat.org/about/license.php")
322-
license.appendNode("distribution", "repo")
323-
324-
def developers = root.appendNode("developers")
325-
def flavin = developers.appendNode("developer")
326-
flavin.appendNode("id", "jflavin")
327-
flavin.appendNode("name", "John Flavin")
328-
flavin.appendNode("email", "jflavin@wustl.edu")
329-
330-
def kelsey = developers.appendNode("developer")
331-
kelsey.appendNode("id", "kelseym")
332-
kelsey.appendNode("name", "Matt Kelsey")
333-
kelsey.appendNode("email", "kelseym@wustl.edu")
334-
335-
def will = developers.appendNode("developer")
336-
will.appendNode("id", "hortonw")
337-
will.appendNode("name", "Will Horton")
338-
will.appendNode("email", "hortonw@wustl.edu")
339-
}
340-
}
341-
}
342-
repositories {
343-
maven {
344-
if (project.version.endsWith("-SNAPSHOT")) {
345-
url "https://nrgxnat.jfrog.io/nrgxnat/libs-snapshot-local"
346-
} else {
347-
url "https://nrgxnat.jfrog.io/nrgxnat/libs-release-local"
348-
}
349-
// The value for name must match <id> in ~/.m2/settings.xml
350-
name = "XNAT_Artifactory"
351-
}
352-
}
353-
}
354-
355-
def propertyWithDefault(def String property, def Object value) {
356-
hasProperty(property) ? getProperty(property) : value
357-
}
358-
294+
//publishing {
295+
// publications {
296+
// mavenJava(MavenPublication) {
297+
// artifacts {
298+
// artifact sourceJar
299+
// artifact javadocJar
300+
// artifact fatJar
301+
// }
302+
//
303+
// pom.withXml {
304+
// def root = asNode()
305+
// root.appendNode("name", pluginAppName)
306+
// root.appendNode("description", "XNAT plugin for launching and managing containers.")
307+
// root.appendNode("url", "https://github.com/nrgxnat/container-service")
308+
// root.appendNode("inceptionYear", "2016")
309+
//
310+
// def scm = root.appendNode("scm")
311+
// scm.appendNode("url", "https://github.com/nrgxnat/container-service")
312+
// scm.appendNode("connection", "scm:https://github.com/nrgxnat/container-service.git")
313+
// scm.appendNode("developerConnection", "scm:git@github.com:nrgxnat/container-service")
314+
//
315+
// def license = root.appendNode("licenses").appendNode("license")
316+
// license.appendNode("name", "Simplified BSD 2-Clause License")
317+
// license.appendNode("url", "https://xnat.org/about/license.php")
318+
// license.appendNode("distribution", "repo")
319+
//
320+
// def developers = root.appendNode("developers")
321+
// def flavin = developers.appendNode("developer")
322+
// flavin.appendNode("id", "jflavin")
323+
// flavin.appendNode("name", "John Flavin")
324+
// flavin.appendNode("email", "jflavin@wustl.edu")
325+
//
326+
// def kelsey = developers.appendNode("developer")
327+
// kelsey.appendNode("id", "kelseym")
328+
// kelsey.appendNode("name", "Matt Kelsey")
329+
// kelsey.appendNode("email", "kelseym@wustl.edu")
330+
//
331+
// def will = developers.appendNode("developer")
332+
// will.appendNode("id", "hortonw")
333+
// will.appendNode("name", "Will Horton")
334+
// will.appendNode("email", "hortonw@wustl.edu")
335+
// }
336+
// }
337+
// }
338+
// repositories {
339+
// maven {
340+
// if (project.version.endsWith("-SNAPSHOT")) {
341+
// url "https://nrgxnat.jfrog.io/nrgxnat/libs-snapshot-local"
342+
// } else {
343+
// url "https://nrgxnat.jfrog.io/nrgxnat/libs-release-local"
344+
// }
345+
// // The value for name must match <id> in ~/.m2/settings.xml
346+
// name = "XNAT_Artifactory"
347+
// }
348+
// }
349+
//}

0 commit comments

Comments
 (0)