From 045b8ce6d58a4f319d60cff1a1903f87e63f265c Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Wed, 18 Dec 2024 15:03:52 +0530 Subject: [PATCH 1/3] [Automated] Update dependencies --- gradle.properties | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/gradle.properties b/gradle.properties index d21f082..e88e189 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.caching=true group=org.ballerinalang version=1.11.0-SNAPSHOT -ballerinaLangVersion=2201.11.0-20241209-162400-0c015833 +ballerinaLangVersion=2201.11.0-20241218-101200-109f6cc7 checkStylePluginVersion=10.12.0 spotbugsPluginVersion=6.0.18 @@ -11,32 +11,32 @@ releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.0.1 # Level 01 -stdlibIoVersion=1.7.0-20241209-171400-26de7d8 -stdlibTimeVersion=2.6.0-20241209-171400-4b43c7d -stdlibUrlVersion=2.5.0-20241209-171400-b09a145 +stdlibIoVersion=1.7.0-20241218-111600-1da6a3f +stdlibTimeVersion=2.6.0-20241218-111600-f57d32a +stdlibUrlVersion=2.5.0-20241218-111600-4f962bc # Level 02 -stdlibConstraintVersion=1.6.0-20241209-172100-2facdca -stdlibCryptoVersion=2.8.0-20241209-172100-28a92b5 -stdlibLogVersion=2.11.0-20241209-174200-4ab1866 -stdlibOsVersion=1.9.0-20241209-172200-af4e3f3 -stdlibTaskVersion=2.6.0-20241209-172700-f6bf4fc +stdlibConstraintVersion=1.6.0-20241218-112400-cd313f2 +stdlibCryptoVersion=2.8.0-20241218-112400-d6f4922 +stdlibLogVersion=2.11.0-20241218-115100-06c729e +stdlibOsVersion=1.9.0-20241218-112400-c81f077 +stdlibTaskVersion=2.6.0-20241218-112900-84f2aea # Level 03 -stdlibCacheVersion=3.9.0-20241209-173700-f1bd537 -stdlibFileVersion=1.11.0-20241209-180600-1aa2676 -stdlibMimeVersion=2.11.0-20241209-180600-aa73132 -stdlibUuidVersion=1.9.0-20241209-175500-c039f34 +stdlibCacheVersion=3.9.0-20241218-114600-9f52392 +stdlibFileVersion=1.11.0-20241218-125000-364d941 +stdlibMimeVersion=2.11.0-20241218-125100-e28a03b +stdlibUuidVersion=1.9.0-20241218-124000-a38f1c9 # Level 04 -stdlibAuthVersion=2.13.0-20241209-180400-7e56348 +stdlibAuthVersion=2.13.0-20241218-124900-9203135 stdlibDataJsonDataVersion=1.0.0-20241125-114000-0c2f457 -stdlibJwtVersion=2.14.0-20241209-180600-f1a51a1 -stdlibOAuth2Version=2.13.0-20241209-180800-22f19ac +stdlibJwtVersion=2.14.0-20241218-125000-c952d1e +stdlibOAuth2Version=2.13.0-20241218-125400-c7625c1 # Level 05 -stdlibHttpVersion=2.13.0-20241209-200000-1b8535c +stdlibHttpVersion=2.13.0-20241218-142000-8d9c012 # Ballerinax Observer -observeVersion=1.4.0-20241209-171500-9472db2 -observeInternalVersion=1.4.0-20241209-172400-71fe9c4 +observeVersion=1.4.0-20241218-111700-4d29d40 +observeInternalVersion=1.4.0-20241218-112700-be9da2c From 71334231e2eb1b40fbc120eee8b7577727f6ec7e Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Wed, 18 Dec 2024 16:00:04 +0530 Subject: [PATCH 2/3] [Automated] Update the native jar versions --- transaction-ballerina/Dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transaction-ballerina/Dependencies.toml b/transaction-ballerina/Dependencies.toml index 7f7717b..aba8882 100644 --- a/transaction-ballerina/Dependencies.toml +++ b/transaction-ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20241209-162400-0c015833" +distribution-version = "2201.11.0-20241218-101200-109f6cc7" [[package]] org = "ballerina" From 8ff45cc95a159a860fc8270d4699bddfaa883325 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Wed, 18 Dec 2024 16:14:35 +0530 Subject: [PATCH 3/3] Update the build scripts to handle dependency updates --- .../TransactionNegativeBallerina.toml | 26 +++++ build.gradle | 27 +---- gradle.properties | 2 + settings.gradle | 20 ++++ transaction-ballerina/build.gradle | 18 +--- transaction-negative-tests/Ballerina.toml | 6 +- transaction-negative-tests/Dependencies.toml | 102 ++++++++++++++++++ transaction-negative-tests/build.gradle | 36 +++---- 8 files changed, 172 insertions(+), 65 deletions(-) create mode 100644 build-config/resources/TransactionNegativeBallerina.toml diff --git a/build-config/resources/TransactionNegativeBallerina.toml b/build-config/resources/TransactionNegativeBallerina.toml new file mode 100644 index 0000000..b133dbd --- /dev/null +++ b/build-config/resources/TransactionNegativeBallerina.toml @@ -0,0 +1,26 @@ +[package] +org = "ballerinai" +name = "transaction_negative_tests" +version = "1.11.0" + +[platform.java21] +graalvmCompatible = true + +[[platform.java21.dependency]] +path = "../transaction-native/build/libs/transaction-native-@project.version@.jar" +groupId = "ballerina" +artifactId = "transaction" +version = "@project.version@" + +[[platform.java21.dependency]] +path = "../transaction-test-utils/build/libs/transaction-test-utils-@project.version@.jar" +groupId = "org.ballerinalang.stdlib.transaction" +scope = "testOnly" +artifactId = "transaction" +version = "@project.version@" + +[[platform.java21.dependency]] +path = "./lib/io-native-@stdlib.io.version@.jar" +groupId = "io.ballerina.stdlib" +artifactId = "io-native" +version = "@stdlib.io.version@" diff --git a/build.gradle b/build.gradle index 49e076b..bafdca0 100644 --- a/build.gradle +++ b/build.gradle @@ -16,31 +16,12 @@ */ plugins { - id "com.github.spotbugs" version "${spotbugsPluginVersion}" - id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}" - id "de.undercouch.download" version "${downloadPluginVersion}" - id "net.researchgate.release" version "${releasePluginVersion}" + id "com.github.spotbugs" + id "com.github.johnrengelman.shadow" + id "de.undercouch.download" + id "net.researchgate.release" } -ext.ballerinaLangVersion = project.ballerinaLangVersion -ext.checkStylePluginVersion = project.checkStylePluginVersion -ext.testngVersion = "7.6.1" -ext.slf4jVersion = "1.7.30" -ext.stdlibIoVersion = project.stdlibIoVersion -ext.stdlibOsVersion = project.stdlibOsVersion -ext.stdlibUuidVersion = project.stdlibUuidVersion -ext.stdlibHttpVersion = project.stdlibHttpVersion - -ext.stdlibMimeVersion = project.stdlibMimeVersion -ext.stdlibLogVersion = project.stdlibLogVersion -ext.stdlibAuthVersion = project.stdlibAuthVersion -ext.stdlibCacheVersion = project.stdlibCacheVersion -ext.stdlibTimeVersion = project.stdlibTimeVersion -ext.stdlibFileVersion = project.stdlibFileVersion -ext.stdlibTaskVersion = project.stdlibTaskVersion -ext.stdlibJwtVersion = project.stdlibJwtVersion -ext.stdlibOAuth2Version = project.stdlibOAuth2Version - allprojects { group = 'org.ballerinalang' version = project.version diff --git a/gradle.properties b/gradle.properties index e88e189..4de3b7b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,8 @@ shadowJarPluginVersion=8.1.1 downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.0.1 +testngVersion=7.6.1 +slf4jVersion=1.7.30 # Level 01 stdlibIoVersion=1.7.0-20241218-111600-1da6a3f diff --git a/settings.gradle b/settings.gradle index e53ea1b..22de2a8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,6 +7,26 @@ * in the user manual at https://docs.gradle.org/6.3/userguide/multi_project_builds.html */ +pluginManagement { + plugins { + id "com.github.spotbugs" version "${spotbugsPluginVersion}" + id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}" + id "de.undercouch.download" version "${downloadPluginVersion}" + id "net.researchgate.release" version "${releasePluginVersion}" + id "io.ballerina.plugin" version "${ballerinaGradlePluginVersion}" + } + repositories { + gradlePluginPortal() + maven { + url = 'https://maven.pkg.github.com/ballerina-platform/*' + credentials { + username System.getenv("packageUser") + password System.getenv("packagePAT") + } + } + } +} + plugins { id "com.gradle.enterprise" version "3.13.2" } diff --git a/transaction-ballerina/build.gradle b/transaction-ballerina/build.gradle index 51b5e3e..0c40a93 100644 --- a/transaction-ballerina/build.gradle +++ b/transaction-ballerina/build.gradle @@ -14,21 +14,11 @@ * limitations under the License. * */ + import org.apache.tools.ant.taskdefs.condition.Os -buildscript { - repositories { - maven { - url = 'https://maven.pkg.github.com/ballerina-platform/plugin-gradle' - credentials { - username System.getenv("packageUser") - password System.getenv("packagePAT") - } - } - } - dependencies { - classpath "io.ballerina:plugin-gradle:${project.ballerinaGradlePluginVersion}" - } +plugins { + id 'io.ballerina.plugin' } description = 'Ballerina - Transaction Ballerina Generator' @@ -39,8 +29,6 @@ def tomlVersion = "0.0.0" def ballerinaTomlFilePlaceHolder = new File("${project.rootDir}/build-config/resources/Ballerina.toml") def ballerinaTomlFile = new File("$project.projectDir/Ballerina.toml") -apply plugin: 'io.ballerina.plugin' - ballerina { packageOrganization = packageOrg module = packageName diff --git a/transaction-negative-tests/Ballerina.toml b/transaction-negative-tests/Ballerina.toml index 73ce4f5..2207f44 100644 --- a/transaction-negative-tests/Ballerina.toml +++ b/transaction-negative-tests/Ballerina.toml @@ -20,7 +20,7 @@ artifactId = "transaction" version = "1.11.0-SNAPSHOT" [[platform.java21.dependency]] -path = "./lib/io-native-1.7.0-20241209-171400-26de7d8.jar" -groupId = "org.ballerinalang" +path = "./lib/io-native-1.7.0-20241218-111600-1da6a3f.jar" +groupId = "io.ballerina.stdlib" artifactId = "io-native" -version = "1.7.0-20241121-173300-0fbd5d4" +version = "1.7.0-20241218-111600-1da6a3f" diff --git a/transaction-negative-tests/Dependencies.toml b/transaction-negative-tests/Dependencies.toml index e69de29..1bfe0d9 100644 --- a/transaction-negative-tests/Dependencies.toml +++ b/transaction-negative-tests/Dependencies.toml @@ -0,0 +1,102 @@ +# AUTO-GENERATED FILE. DO NOT MODIFY. + +# This file is auto-generated by Ballerina for managing dependency versions. +# It should not be modified by hand. + +[ballerina] +dependencies-toml-version = "2" +distribution-version = "2201.11.0-20241218-101200-109f6cc7" + +[[package]] +org = "ballerina" +name = "io" +version = "1.7.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"} +] +modules = [ + {org = "ballerina", packageName = "io", moduleName = "io"} +] + +[[package]] +org = "ballerina" +name = "jballerina.java" +version = "0.0.0" +scope = "testOnly" +modules = [ + {org = "ballerina", packageName = "jballerina.java", moduleName = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.__internal" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] + +[[package]] +org = "ballerina" +name = "lang.array" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.__internal"} +] + +[[package]] +org = "ballerina" +name = "lang.error" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.object" +version = "0.0.0" +scope = "testOnly" + +[[package]] +org = "ballerina" +name = "lang.value" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "test" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.error"} +] +modules = [ + {org = "ballerina", packageName = "test", moduleName = "test"} +] + +[[package]] +org = "ballerinai" +name = "transaction_negative_tests" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "test"} +] +modules = [ + {org = "ballerinai", packageName = "transaction_negative_tests", moduleName = "transaction_negative_tests"} +] + diff --git a/transaction-negative-tests/build.gradle b/transaction-negative-tests/build.gradle index dfdf6ea..1c05d7c 100644 --- a/transaction-negative-tests/build.gradle +++ b/transaction-negative-tests/build.gradle @@ -56,12 +56,10 @@ task copyToLib(type: Copy) { } def tomlVersion = stripBallerinaExtensionVersion("${project.version}") -def ballerinaConfigFile = new File("$project.projectDir/Ballerina.toml") -def ballerinaDependencyFile = new File("$project.projectDir/Dependencies.toml") -def configTOMLFile = new File("$project.projectDir/tests/Config.toml") -def originalConfig = ballerinaConfigFile.text -def originalDependencies = ballerinaDependencyFile.text -def initialTOMLcontent = configTOMLFile.text +def ballerinaTomlPlaceHolder = new File("${project.rootDir}/build-config/resources/TransactionNegativeBallerina.toml") +def ballerinaTomlFile = new File("${project.rootDir}/transaction-negative-tests/Ballerina.toml") +def configTomlFile = new File("$project.projectDir/tests/Config.toml") +def originalConfigFileText = configTomlFile.text def graalvmFlag = "" def testParams = "--code-coverage --includes=ballerinai.*:org.ballerinalang.stdlib.transaction.*" @@ -88,32 +86,22 @@ def stripBallerinaExtensionVersion(String extVersion) { task updateTomlVersions { doLast { - def stdlibNativeIoVersion = project.stdlibIoVersion - - def stdlibDependentIoVersion = stripBallerinaExtensionVersion(project.stdlibIoVersion) - def stdlibDependentOsVersion = stripBallerinaExtensionVersion(project.stdlibOsVersion) - - def newConfig = ballerinaConfigFile.text.replace("@project.version@", project.version) + def newConfig = ballerinaTomlPlaceHolder.text.replace("@project.version@", project.version) newConfig = newConfig.replace("@toml.version@", tomlVersion) - newConfig = newConfig.replace("@io.native.version@", stdlibNativeIoVersion) - ballerinaConfigFile.text = newConfig - - def newDependencyConfig = ballerinaDependencyFile.text.replace("@stdlib.io.version@", stdlibDependentIoVersion) - newDependencyConfig = newDependencyConfig.replace("@stdlib.os.version@", stdlibDependentOsVersion) - ballerinaDependencyFile.text = newDependencyConfig + newConfig = newConfig.replace("@stdlib.io.version@", stdlibIoVersion) + ballerinaTomlFile.text = newConfig } } task revertTomlFile { doLast { - ballerinaConfigFile.text = originalConfig - configTOMLFile.text = initialTOMLcontent - ballerinaDependencyFile.text = originalDependencies + configTomlFile.text = originalConfigFileText } } -def setExecPath(configTOMLFile, distributionBinPath) { - configTOMLFile.text = configTOMLFile.text.replace("@exec.path@", distributionBinPath) +def setExecPath(configTomlFile, originalConfigFileText, distributionBinPath) { + def newConfig = originalConfigFileText.replace("@exec.path@", distributionBinPath) + configTomlFile.text = newConfig } task ballerinaNegativeTests { @@ -132,7 +120,7 @@ task ballerinaNegativeTests { doLast { def distributionBinPath = "$project.rootDir/target/ballerina-runtime/bin" - setExecPath(configTOMLFile,distributionBinPath) + setExecPath(configTomlFile, originalConfigFileText, distributionBinPath) exec { workingDir project.projectDir environment "JAVA_OPTS", "-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true"