Skip to content

Commit

Permalink
Merge pull request #25 from LoiNguyenCS/publishing
Browse files Browse the repository at this point in the history
Maven Publishing
  • Loading branch information
LoiNguyenCS authored Oct 3, 2023
2 parents fcc9ec4 + 70fb00b commit a0f6175
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

plugins {
id 'application'
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.diffplug.spotless' version '6.18.0'
id 'org.checkerframework' version '0.6.27'
id("net.ltgt.errorprone") version "2.0.2"
Expand All @@ -10,6 +13,7 @@ plugins {
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
mavenLocal()
}

application {
Expand Down Expand Up @@ -78,3 +82,27 @@ spotless {

compileJava.dependsOn 'spotlessApply'
check.dependsOn requireJavadoc

java {
withJavadocJar()
withSourcesJar()
}

// Run `./gradlew publishToMavenLocal` to publish Specimin to your local Maven repository.
publishing {
publications {
maven(MavenPublication) {
groupId = 'edu.njit.jerse'
artifactId = 'specimin'
version = '0.1'

from components.java
}
}
}

javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}

0 comments on commit a0f6175

Please sign in to comment.