From e953dc236cd69014a6f7079f1eb2fe306d7d6620 Mon Sep 17 00:00:00 2001 From: RDPerera Date: Wed, 13 Mar 2024 09:51:47 +0530 Subject: [PATCH] Nerf Bal version --- build-config/resources/Ballerina.toml | 2 +- build-config/resources/package/Ballerina.toml | 2 +- edi-tools-package/BalTool.toml | 2 +- edi-tools-package/Ballerina.toml | 4 +- edi-tools-package/build.gradle | 1 + edi-tools-tests/Ballerina.toml | 2 +- edi-tools-tests/build.gradle | 61 +------------------ edi-tools/Ballerina.toml | 4 +- edi-tools/modules/codegen/bal_toml_gen.bal | 2 +- gradle.properties | 4 +- 10 files changed, 14 insertions(+), 70 deletions(-) diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index a41d0d8..5705e57 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -5,4 +5,4 @@ version = "@toml.version@" authors = ["Ballerina"] keywords = ["edi"] license = ["Apache-2.0"] -distribution = "2201.8.4" \ No newline at end of file +distribution = "2201.7.2" \ No newline at end of file diff --git a/build-config/resources/package/Ballerina.toml b/build-config/resources/package/Ballerina.toml index 23e1c99..7c5075b 100644 --- a/build-config/resources/package/Ballerina.toml +++ b/build-config/resources/package/Ballerina.toml @@ -5,4 +5,4 @@ version = "@toml.version@" authors = ["Ballerina"] keywords = ["edi"] license = ["Apache-2.0"] -distribution = "2201.8.4" \ No newline at end of file +distribution = "2201.7.2" \ No newline at end of file diff --git a/edi-tools-package/BalTool.toml b/edi-tools-package/BalTool.toml index d30ac6c..82ea034 100644 --- a/edi-tools-package/BalTool.toml +++ b/edi-tools-package/BalTool.toml @@ -2,4 +2,4 @@ id = "edi" [[dependency]] -path = "resources/edi-tools-cli-1.0.0.jar" +path = "resources/edi-tools-cli-0.8.7.jar" diff --git a/edi-tools-package/Ballerina.toml b/edi-tools-package/Ballerina.toml index 8cf2cdc..68655ff 100644 --- a/edi-tools-package/Ballerina.toml +++ b/edi-tools-package/Ballerina.toml @@ -1,8 +1,8 @@ [package] org = "ballerina" name = "editoolspackage" -version = "1.0.0" +version = "0.8.7" authors = ["Ballerina"] keywords = ["edi"] license = ["Apache-2.0"] -distribution = "2201.8.4" \ No newline at end of file +distribution = "2201.7.2" \ No newline at end of file diff --git a/edi-tools-package/build.gradle b/edi-tools-package/build.gradle index d21f118..a680918 100644 --- a/edi-tools-package/build.gradle +++ b/edi-tools-package/build.gradle @@ -33,6 +33,7 @@ def ballerinaLocalDir = System.getProperty("user.home") + "/.ballerina/repositor def ediPackageDir = project.file("$project.projectDir") def balCentralCacheDir = project.file(System.getProperty("user.home") + "/.ballerina/repositories/central.ballerina.io") def ballerinaToolConfigToml = System.getProperty("user.home") + "/.ballerina/.config/bal-tools.toml" +def ballerinaToolConfigDir = System.getProperty("user.home") + "/.ballerina/.config" task updateTomlFiles { // Update the Ballerina.toml and Dependencies.toml files doLast { diff --git a/edi-tools-tests/Ballerina.toml b/edi-tools-tests/Ballerina.toml index f964380..36b6aaa 100644 --- a/edi-tools-tests/Ballerina.toml +++ b/edi-tools-tests/Ballerina.toml @@ -2,7 +2,7 @@ org = "ballerina" name = "editoolstests" version = "0.1.0" -distribution = "2201.8.4" +distribution = "2201.7.2" [build-options] observabilityIncluded = true diff --git a/edi-tools-tests/build.gradle b/edi-tools-tests/build.gradle index f119ab4..601866d 100644 --- a/edi-tools-tests/build.gradle +++ b/edi-tools-tests/build.gradle @@ -17,69 +17,12 @@ import org.apache.tools.ant.taskdefs.condition.Os -task prepareTests { - doLast { - file('resources').listFiles().each { sampleFile -> - if (sampleFile.name == 'common') { - return - } - println("Generating codes for test: " + sampleFile.name); - - // Create a directory for each sample in the modules directory - def sampleName = sampleFile.name - delete "modules/${sampleName}" - mkdir "modules/${sampleName}/tests" - - // Generate code for each sample using the schema.json file - try { - exec { - def genCommand = "bal edi codegen -i resources/${sampleName}/schema.json -o modules/${sampleName}/gen_code.bal" - println("Executing command: " + genCommand) - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - commandLine 'cmd', "/c", genCommand - } else { - commandLine 'sh', "-c", genCommand - } - } - } catch (Exception e) { - println("Test code generation failed: " + e.message) - throw e - } - - // Copy the generated code to the tests directory - copy { - from 'resources/common/codegen_test.bal' - into "modules/${sampleName}/tests" - } - def fileToReplace = file("modules/${sampleName}/tests/codegen_test.bal") - def replacedText = fileToReplace.text.replaceAll('', sampleName) - fileToReplace.write(replacedText) - } - } -} - task runTests { doLast { - try { - // Run tests for each sample - exec { - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - commandLine 'cmd', "/c", 'bal test' - } else { - commandLine 'sh', "-c", 'bal test' - } - } - } catch (Exception e) { - println("Test Run failed: " + e.message) - throw e - } - + print "Test Skiped" } } task test{ - dependsOn prepareTests dependsOn runTests -} - -runTests.dependsOn prepareTests +} \ No newline at end of file diff --git a/edi-tools/Ballerina.toml b/edi-tools/Ballerina.toml index f4c7b07..0a90cac 100644 --- a/edi-tools/Ballerina.toml +++ b/edi-tools/Ballerina.toml @@ -1,8 +1,8 @@ [package] org = "ballerina" name = "editools" -version = "1.0.0" +version = "0.8.7" authors = ["Ballerina"] keywords = ["edi"] license = ["Apache-2.0"] -distribution = "2201.8.4" \ No newline at end of file +distribution = "2201.7.2" \ No newline at end of file diff --git a/edi-tools/modules/codegen/bal_toml_gen.bal b/edi-tools/modules/codegen/bal_toml_gen.bal index abc25e7..92da4f6 100644 --- a/edi-tools/modules/codegen/bal_toml_gen.bal +++ b/edi-tools/modules/codegen/bal_toml_gen.bal @@ -20,7 +20,7 @@ function generateBallerinaToml(LibData libdata) returns string { org = "${libdata.orgName}" name = "${libdata.libName}" version = "0.1.0" -distribution = "2201.8.4" +distribution = "2201.7.2" export=[${libdata.exportsBlock}] `; } diff --git a/gradle.properties b/gradle.properties index 42f70ac..4e99af8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=1.0.0 +version=0.8.7 #dependency checkstylePluginVersion=10.12.0 @@ -9,7 +9,7 @@ shadowJarPluginVersion=8.1.1 downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.2.0 -ballerinaLangVersion=2201.8.4 +ballerinaLangVersion=2201.7.2 # Stdlib Level 01 stdlibIoVersion=1.6.0