Skip to content

Commit

Permalink
Merge pull request #5281 from khadijahazward/master
Browse files Browse the repository at this point in the history
Update API Doc UI
  • Loading branch information
NipunaMadhushan committed Apr 10, 2024
2 parents bf82539 + 12ed39a commit ed0003a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
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 @@ -1502,6 +1516,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 @@ -79,6 +79,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

# GraphQL Tool
graphqlVersion=0.8.1

Expand Down

0 comments on commit ed0003a

Please sign in to comment.