Skip to content

Commit

Permalink
Merge pull request #724 from MrCreosote/dev-gradle2
Browse files Browse the repository at this point in the history
Build docs
  • Loading branch information
MrCreosote authored Apr 4, 2024
2 parents 7c13811 + 5d9b354 commit 218f09c
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 16 deletions.
60 changes: 50 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

// TODO NOW test shadow jar works in groups - remove JNA - commit 2
var buildDocsDir = "$buildDir/docs/otherdoc/"

// TODO NOW test shadow jar works in groups - need test controller - commit 2
// TODO NOW get docserver working in WAR and test in docker-compose <- edit to start test server - commit 3
// TODO NOW client jar - commit 4
// TODO NOW client jar javadoc - needs java_common source - commit 4
Expand All @@ -32,6 +34,52 @@ compileJava {
options.release = 11
}

javadoc {
/* We don't actually need the full javadoc for anything, so just hijack this task for
* building the client javadocs. If we ever need the full javadocs make a new task for the
* client java docs
*/
/* TODO DOCS currently java-common and auth links don't work. ROI for fixing them is low.
* Ideally, in the future make github actions publish docs on release and ref them
* here.
* https://github.com/marketplace/actions/deploy-publish-javadoc
* https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry
*/
/* TODO DOCS the current sdk documenation looks like invalid html to javadoc
* need to go through and remove
* also some spots with < / > that need to be wrapped with {@code } in internal code
*/
failOnError = false
options {
links "https://docs.oracle.com/en/java/javase/11/docs/api/"
}
include "**/workspace/*.java"
exclude "**/workspace/WorkspaceServer.java"
include "**/common/service/Tuple*.java"
}

task buildDocs {
// ideally we'd add the inputs and outputs spec but that's too much work for too little gain
dependsOn javadoc
doLast {
// need to make sure we remove any docs that no longer exist in the source
delete "$buildDocsDir"
copy {
from "$rootDir/workspace.spec" into "$buildDocsDir"
}
copy {
from "$rootDir/docshtml/" into "$buildDocsDir" include "*"
}
exec {
commandLine "pod2html", "--infile=$rootDir/lib/Bio/KBase/workspace/Client.pm", "--outfile=$buildDocsDir/workspace_perl.html"
}
exec {
commandLine "sphinx-build", "$rootDir/docsource/", "$buildDocsDir"
}
delete fileTree(".").matching { include "pod2htm*.tmp" }
}
}

tasks.withType(Test) {
/*
* TODO TEST Figure out why tests fail without this and remove. Might have something to do
Expand Down Expand Up @@ -114,14 +162,6 @@ sourceSets {
}
}

javadoc {
options {
links "https://docs.oracle.com/en/java/javase/11/docs/api/"
links "https://www.javadoc.io/doc/com.fasterxml.jackson.core/jackson-core/2.9.9/"
links "https://www.javadoc.io/doc/com.fasterxml.jackson.core/jackson-databind/2.9.9/"
}
}

war {
webXml = file('war/web.xml')
}
Expand Down Expand Up @@ -189,7 +229,7 @@ dependencies {
'kbase-common-0.2.0'
)
// Pull from jars repo vs a maven repository to avoid the JNA dependency
// Need to rework the java common logger to not use syslog4j at all since it's abandonware
// TODO DEPS Need to rework the java common logger to not use syslog4j at all since it's abandonware
// and has a ton of CVEs, even in the newer versions.
implementation fromURL(
'https://github.com/kbase/jars/raw/master/lib/jars/syslog4j/syslog4j-0.9.46.jar',
Expand Down
2 changes: 1 addition & 1 deletion docshtml/Workspace.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/Bio/KBase/workspace/Client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10783,7 +10783,7 @@ compatibility.
UnspecifiedObject data - The object's data.
object_metadata metadata - Metadata for object retrieved/
@deprecated Workspaces.ObjectData
@deprecated Workspace.ObjectData
=item Definition
Expand Down
2 changes: 1 addition & 1 deletion lib/biokbase/workspace/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def get_object(self, params, context=None):
the "get_object" function. Provided for backwards compatibility.
UnspecifiedObject data - The object's data. object_metadata
metadata - Metadata for object retrieved/ @deprecated
Workspaces.ObjectData) -> structure: parameter "data" of
Workspace.ObjectData) -> structure: parameter "data" of
unspecified object, parameter "metadata" of type "object_metadata"
(Meta data associated with an object stored in a workspace.
Provided for backwards compatibility. obj_name id - name of the
Expand Down
2 changes: 1 addition & 1 deletion src/us/kbase/workspace/GetObjectOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* compatibility.
* UnspecifiedObject data - The object's data.
* object_metadata metadata - Metadata for object retrieved/
* @deprecated Workspaces.ObjectData
* @deprecated Workspace.ObjectData
* </pre>
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/us/kbase/workspace/WorkspaceServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class WorkspaceServer extends JsonServerServlet {
private static final long serialVersionUID = 1L;
private static final String version = "0.0.1";
private static final String gitUrl = "https://github.com/mrcreosote/workspace_deluxe";
private static final String gitCommitHash = "5154d57474407fb8e21e5bcd238c6db20666fca8";
private static final String gitCommitHash = "8d0c78b928ca21c63ad05b0ee7dbe608065d44d1";

//BEGIN_CLASS_HEADER
//TODO JAVADOC really low priority, sorry
Expand Down
2 changes: 1 addition & 1 deletion workspace.spec
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ module Workspace {
UnspecifiedObject data - The object's data.
object_metadata metadata - Metadata for object retrieved/

@deprecated Workspaces.ObjectData
@deprecated Workspace.ObjectData
*/
typedef structure {
UnspecifiedObject data;
Expand Down

0 comments on commit 218f09c

Please sign in to comment.