-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven Publishing #25
Maven Publishing #25
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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" | ||
|
@@ -78,3 +81,69 @@ spotless { | |
|
||
compileJava.dependsOn 'spotlessApply' | ||
check.dependsOn requireJavadoc | ||
|
||
// This groupId is just for temporal use | ||
group = 'njit.edu' | ||
version = '1.0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a version like |
||
|
||
|
||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifactId = 'Specimin' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use all lower-case for artifactId. |
||
from components.java | ||
versionMapping { | ||
usage('java-api') { | ||
fromResolutionOf('runtimeClasspath') | ||
} | ||
usage('java-runtime') { | ||
fromResolutionResult() | ||
} | ||
} | ||
pom { | ||
name = 'Specimin' | ||
description = 'A specification minimizer for Java language' | ||
url = '' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This license is incorrect: Specimin is MIT licensed (see |
||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
// I am not sure which id and email you would like to use | ||
id = '' | ||
name = 'Martin Kellogg' | ||
email = '' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
} | ||
} | ||
scm { | ||
connection = 'scm:git:[email protected]:kelloggm/specimin.git' | ||
developerConnection = 'scm:git:[email protected]:kelloggm/specimin.git' | ||
url = '' | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
// I think ultimately these urls should be the Maven repos, though I have no ideas how to create those repos | ||
def releasesRepoUrl = layout.buildDirectory.dir('.') | ||
def snapshotsRepoUrl = layout.buildDirectory.dir('.') | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
} | ||
} | ||
} | ||
|
||
javadoc { | ||
if(JavaVersion.current().isJava9Compatible()) { | ||
options.addBooleanOption('html5', true) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be more specific than
njit.edu
. Also, group names should be "reversed urls": that is, they should be in the opposite order compared to what you'd type into a web browser. (So, e.g.,com.example.*
rather thanexample.com.*
.)Let's use
edu.njit.jerse
as the groupId for now.