Skip to content

Commit ceee517

Browse files
committed
maven config
1 parent 44bf849 commit ceee517

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

build.gradle

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
plugins {
22
id 'java-library'
3+
id "com.vanniktech.maven.publish" version "0.34.0"
34
}
45

5-
description = 'Java Workflows'
6+
description = 'Java GitHub Action Workflows'
67
group = 'org.jlab'
78
version = new File("${projectDir}/VERSION").text.trim()
89
ext.releaseDate = new Date().format('MMM dd yyyy')
@@ -12,38 +13,57 @@ tasks.withType(JavaCompile).configureEach {
1213
options.encoding = 'UTF-8'
1314
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
1415
}
15-
16-
java {
17-
withJavadocJar()
18-
withSourcesJar()
19-
}
20-
2116
repositories {
2217
mavenCentral()
2318
}
24-
2519
dependencies {
2620
testImplementation 'junit:junit:4.13.2'
2721
}
28-
2922
test {
3023
testLogging {
3124
events "passed", "skipped", "failed"
3225
exceptionFormat = "full"
3326
}
3427
}
35-
3628
tasks.register('hello', JavaExec) {
3729
group = 'Application'
3830
description = 'Hello World Test'
3931
mainClass = 'org.jlab.workflows.Hello'
4032
classpath = sourceSets.test.runtimeClasspath
4133
}
42-
4334
javadoc {
4435
options.overview = "src/overview.html"
4536
options.source = 8
4637
options.with {
4738
links 'https://devdocs.io/openjdk~8/'
4839
}
40+
}
41+
mavenPublishing {
42+
publishToMavenCentral(true)
43+
signAllPublications()
44+
coordinates("org.jlab", "java-workflows", version)
45+
46+
pom {
47+
name = project.name
48+
description = project.description
49+
url = "https://github.com/JeffersonLab/java-workflows/"
50+
licenses {
51+
license {
52+
name = "The MIT License"
53+
url = "https://github.com/JeffersonLab/jmyapi/blob/master/LICENSE"
54+
}
55+
}
56+
developers {
57+
developer {
58+
id = "slominskir"
59+
name = "Ryan Slominski"
60+
url = "https://github.com/slominskir/"
61+
}
62+
}
63+
scm {
64+
url = "https://github.com/JeffersonLab/java-workflows"
65+
connection = "scm:git:git://github.com/JeffersonLab/java-workflows.git"
66+
developerConnection = "scm:git:ssh://git@github.com/JeffersonLab/java-workflows.git"
67+
}
68+
}
4969
}

0 commit comments

Comments
 (0)