Skip to content
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

Update API Doc UI #5281

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ task unpackDevTools(type: Copy) {
}
}

task downloadDocUi {
def response = new JsonSlurper().parseText(new URL(docUiApi).text)
def zipFileUrl = response.fileURL
def zipInputStream = new URL(zipFileUrl).openStream()
def outputFile = new File("${buildDir}/target/extracted-distributions/doc-ui-zip/ballerina-doc-ui.zip")
doLast {
outputFile.parentFile.mkdirs()
outputFile.withOutputStream { outputStream ->
outputStream << zipInputStream
}
}
}

task unpackAwsLambdaBala(type: Copy) {
group = "unpack_dependencies"
configurations.awsLambdaBala.resolvedConfiguration.resolvedArtifacts.each { artifact ->
Expand Down Expand Up @@ -271,8 +284,9 @@ task copyDevToolsCoverageReport(type: Copy) {
into "$project.buildDir/target/extracted-distributions/jballerina-tools-zip/jballerina-tools-${ballerinaLangVersion}/lib/tools/coverage"
rename("testerina-report-tools-${devToolsVersion}.zip", "report.zip")
}

task copyDevToolsDocUi(type: Copy) {
from zipTree("$project.buildDir/target/extracted-distributions/ballerina-dev-tools-zip/docs/docerina-ui-${devToolsVersion}.zip")
from zipTree("$project.buildDir/target/extracted-distributions/doc-ui-zip/ballerina-doc-ui.zip")
into "$project.buildDir/target/extracted-distributions/jballerina-tools-zip/jballerina-tools-${ballerinaLangVersion}/lib/tools/doc-ui"
}

Expand Down Expand Up @@ -1487,6 +1501,7 @@ extractJreForWindows.dependsOn extractJreForMacArm
copyOtherRepos.dependsOn extractJreForWindows
copyDevToolsCoverageReport.dependsOn copyOtherRepos
copyDevToolsDocUi.dependsOn copyDevToolsCoverageReport
copyDevToolsDocUi.dependsOn downloadDocUi
buildDistRepo.dependsOn copyDevToolsDocUi
buildDistRepo.dependsOn generateCache
filterApiDocs.dependsOn buildDistRepo
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ persistToolVersion=1.2.0-20230908-152500-2ba8c45
devToolsVersion=1.2.1-20230914-153500-664cd40
ballerinaCommandVersion=1.4.2

# API Doc UI
docUiApi=https://api.dev-central.ballerina.io/2.0/docs/doc-ui
khadijahazward marked this conversation as resolved.
Show resolved Hide resolved

# GraphQL Tool
graphqlVersion=0.8.1

Expand Down
Loading