Skip to content

Commit

Permalink
Generate aggregate Java doc for all modules (#3023)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Nov 1, 2024
1 parent e974436 commit 936aeb6
Show file tree
Hide file tree
Showing 326 changed files with 34 additions and 13 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
working-directory: ./java
run: |
make -C ../cpp slice2java
./gradlew dist
./gradlew :alljavadoc
# This will perform a full sync of the documentation to S3 every time the workflow is run since
# the timestamps will always be different. Using --size-only is not sufficient since the
Expand All @@ -106,9 +106,7 @@ jobs:
aws s3 sync ./swift/docs/$target s3://${AWS_S3_DOC_BUCKET}/api/ice/main/swift/$target --delete
done
for target in Glacier2 Ice IceBT IceBox IceGrid IceStorm; do
aws s3 sync ./java/src/$target/build/docs/javadoc s3://${AWS_S3_DOC_BUCKET}/api/ice/main/java/$target --delete
done
aws s3 sync ./java/build/docs/javadoc s3://${AWS_S3_DOC_BUCKET}/api/ice/main/java --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
23 changes: 23 additions & 0 deletions java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,26 @@ if(!System.env.ICE_BIN_DIST?.split(" ").find{ it == 'all' || it.contains('java')

project(":test").compileJava.dependsOn(dist)
}

def exportedProjects = [
":glacier2",
":ice",
":icebox",
":icebt",
":icegrid",
":icestorm"
]

task alljavadoc(type: Javadoc) {
// Add the source files from all subprojects
source = exportedProjects.collect { project(it).sourceSets.main.allJava }
// Output directory for the aggregated Javadocs
destinationDir = file("$buildDir/docs/javadoc")
options.encoding = 'UTF-8'
// Where to find source files for the different modules
options.addStringOption('-module-source-path', './src/*/src/main/java/:./src/*/build/generated-src/')
options.addBooleanOption('html5', true)
options.header = 'Ice for Java'
options.docTitle = "Ice ${iceVersion} API Reference"
}
alljavadoc.dependsOn = exportedProjects.collect { project(it).assemble.dependsOn }
2 changes: 1 addition & 1 deletion java/gradle/library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ javadoc {

options.linksOffline(
"https://doc.zeroc.com/api/ice/main/java/${artifactProject.ext.displayName}/",
"${rootProject.projectDir}/src/${artifactProject.ext.displayName}/build/docs/javadoc")
"${rootProject.projectDir}/src/${artifactProject.ext.moduleName}/build/docs/javadoc")
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions java/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
if(!System.env.ICE_BIN_DIST?.split(" ").find{ it == 'all' || it.contains('java')}) {
// Main source
include ':ice'
project(':ice').projectDir = new File('src/Ice')
project(':ice').projectDir = new File('src/com.zeroc.ice')
include ':icediscovery'
project(':icediscovery').projectDir = new File('src/IceDiscovery')
project(':icediscovery').projectDir = new File('src/com.zeroc.icediscovery')
include ':icelocatordiscovery'
project(':icelocatordiscovery').projectDir = new File('src/IceLocatorDiscovery')
project(':icelocatordiscovery').projectDir = new File('src/com.zeroc.icelocatordiscovery')
include ':icebt'
project(':icebt').projectDir = new File('src/IceBT')
project(':icebt').projectDir = new File('src/com.zeroc.icebt')
include ':icebox'
project(':icebox').projectDir = new File('src/IceBox')
project(':icebox').projectDir = new File('src/com.zeroc.icebox')
include ':glacier2'
project(':glacier2').projectDir = new File('src/Glacier2')
project(':glacier2').projectDir = new File('src/com.zeroc.glacier2')
include ':icestorm'
project(':icestorm').projectDir = new File('src/IceStorm')
project(':icestorm').projectDir = new File('src/com.zeroc.icestorm')
include ':icegrid'
project(':icegrid').projectDir = new File('src/IceGrid')
project(':icegrid').projectDir = new File('src/com.zeroc.icegrid')
include ':IceGridGUI'
project(':IceGridGUI').projectDir = new File('src/IceGridGUI')
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 936aeb6

Please sign in to comment.