Skip to content

Commit

Permalink
Update api doc-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
khadijahazward committed Apr 2, 2024
1 parent 8b2d472 commit ce29f79
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 15 additions & 2 deletions ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ task unpackDevTools(type: Copy) {
}
}

task downloadDocUi {
def response = new JsonSlurper().parseText(new URL(source).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")
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 +282,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 @@ -1467,7 +1479,8 @@ task generateCache(dependsOn: ':cache-generator:build') {
/* Unpack Dependencies */
unpackJballerinaTools.dependsOn unpackBallerinaJre
unpackDevTools.dependsOn unpackJballerinaTools
unpackStdLibs.dependsOn unpackDevTools
downloadDocUi.dependsOn unpackDevTools
unpackStdLibs.dependsOn downloadDocUi
unpackOpenAPILibs.dependsOn unpackStdLibs
unpackC2cLibs.dependsOn unpackOpenAPILibs
unpackC2cTooling.dependsOn unpackC2cLibs
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
source=https://api.central.ballerina.io/2.0/docs/doc-ui

# GraphQL Tool
graphqlVersion=0.8.1

Expand Down

0 comments on commit ce29f79

Please sign in to comment.