diff --git a/build-config/checkstyle/build.gradle b/build-config/checkstyle/build.gradle index 1187ab6f054d..4b5109846402 100644 --- a/build-config/checkstyle/build.gradle +++ b/build-config/checkstyle/build.gradle @@ -8,12 +8,12 @@ tasks.register('downloadFile', Download) { 'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.4/checkstyle/jdk-17/checkstyle.xml', 'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.4/checkstyle/jdk-17/suppressions.xml' ]) - dest buildDir + dest getLayout().getBuildDirectory().get() overwrite false - outputs.files("$project.buildDir/checkstyle.xml") + outputs.files("${project.getLayout().getBuildDirectory().get()}/checkstyle.xml") } -artifacts.add('default', file("$project.buildDir/checkstyle.xml")) { +artifacts.add('default', file("${project.getLayout().getBuildDirectory().get()}/checkstyle.xml")) { builtBy('downloadFile') } diff --git a/build.gradle b/build.gradle index b1baae0578e4..4489e4f5adaf 100644 --- a/build.gradle +++ b/build.gradle @@ -55,18 +55,12 @@ subprojects { buildTasks = ['build'] git { // To release from any branch - requireBranch = null + requireBranch.set('') } } } -dependencies { - constraints { - //implementation 'org.springframework:spring-web:5.0.2.RELEASE' - } -} - def classFilesArray = [] def execFilesArray = [] def skipDirectories = [ @@ -80,7 +74,7 @@ def skipDirectories = [ tasks.register('copyExecFilesAndJavaClassFiles') { subprojects.forEach { subproject -> - fileTree("${subproject.buildDir}/jacoco").matching { + fileTree("${subproject.getLayout().getBuildDirectory().get()}/jacoco").matching { include "**/*.exec" }.each { execFilesArray.push(it) @@ -98,7 +92,7 @@ tasks.register('copyExecFilesAndJavaClassFiles') { if (skipProject) { return } - fileTree("${subproject.buildDir}/classes").matching { + fileTree("${subproject.getLayout().getBuildDirectory().get()}/classes").matching { exclude '**/java/test/**' exclude '**/default/**' exclude '**/module-info.class' @@ -110,9 +104,9 @@ tasks.register('copyExecFilesAndJavaClassFiles') { tasks.register('copyBallerinaClassFiles') { subprojects.forEach { subproject -> - def ballerinaSourceDirectory = new File("${subproject.buildDir}/ballerina-src") + def ballerinaSourceDirectory = new File("${subproject.getLayout().getBuildDirectory().get()}/ballerina-src") if (ballerinaSourceDirectory.exists() && subproject.projectDir.getParentFile().getName() == "langlib") { - fileTree("${subproject.buildDir}/ballerina-src/target").include("**/*.zip").forEach { zip -> + fileTree("${subproject.getLayout().getBuildDirectory().get()}/ballerina-src/target").include("**/*.zip").forEach { zip -> def jarFiles = zipTree(zip).matching { include '**/*.jar' } jarFiles.forEach { jar -> zipTree(jar).matching { @@ -130,8 +124,8 @@ tasks.register('createCodeCoverageReport', JacocoReport) { reports { xml.required = true html.required = true - xml.destination new File("${rootDir}/.jacoco/reports/jacoco/report.xml") - html.destination new File("${rootDir}/.jacoco/reports/jacoco/report.html") + xml.outputLocation = new File("${rootDir}/.jacoco/reports/jacoco/report.xml") + html.outputLocation = new File("${rootDir}/.jacoco/reports/jacoco/report.html") } onlyIf = { true diff --git a/cli/ballerina-cli/build.gradle b/cli/ballerina-cli/build.gradle index d788d007c3be..18f2c5dd3594 100644 --- a/cli/ballerina-cli/build.gradle +++ b/cli/ballerina-cli/build.gradle @@ -68,7 +68,7 @@ dependencies { testImplementation libs.commons.codec testImplementation libs.jline - distributionBala project(path: ':ballerina-langlib:test', configuration: 'distributionBala') + distributionBala project(path: ':ballerina-lang:test', configuration: 'distributionBala') distributionBala project(path: ':testerina:testerina-core', configuration: 'distributionBala') distributionBirJar project(path: ':testerina:testerina-core', configuration: 'distributionBirJar') @@ -93,17 +93,17 @@ dependencies { tasks.register('createTestDistributionCache', Copy) { dependsOn configurations.distributionBala from configurations.distributionBala - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } tasks.register('copyCompilerPluginJars', Copy) { from configurations.compilerPluginJar - into "$buildDir/compiler-plugin-jars" + into "${getLayout().getBuildDirectory().get()}/compiler-plugin-jars" } tasks.register('copyProfilerResources', Copy) { from project(':jballerina-tools').file('resources/profiler') - into "$buildDir/resources/profiler" + into "${getLayout().getBuildDirectory().get()}/resources/profiler" } tasks.register('createTestBre', Copy) { @@ -111,7 +111,7 @@ tasks.register('createTestBre', Copy) { from configurations.testRt from configurations.testCore from configurations.distributionBirJar - into "$buildDir/bre/lib" + into "${getLayout().getBuildDirectory().get()}/bre/lib" } test { @@ -120,7 +120,7 @@ test { dependsOn copyCompilerPluginJars dependsOn copyProfilerResources - systemProperty "ballerina.home", "$buildDir" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}".toString() useTestNG() { suites 'src/test/resources/testng.xml' diff --git a/cli/central-client/build.gradle b/cli/central-client/build.gradle index 29b533a76a84..2b15f1fdd953 100644 --- a/cli/central-client/build.gradle +++ b/cli/central-client/build.gradle @@ -50,7 +50,7 @@ dependencies { tasks.register('createTestDistributionCache', Copy) { dependsOn configurations.distributionBala from configurations.distributionBala - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } tasks.register('createBirCache') { @@ -60,13 +60,13 @@ tasks.register('createBirCache') { configurations.bir.each { artifact -> copy { from artifact - into "$buildDir/bir-cache/" + into "${getLayout().getBuildDirectory().get()}/bir-cache/" } } } inputs.files configurations.bir - outputs.dir "$buildDir/bir-cache" + outputs.dir "${getLayout().getBuildDirectory().get()}/bir-cache" outputs.cacheIf { false } } @@ -76,7 +76,7 @@ test { dependsOn configurations.birJar dependsOn configurations.birJarCompile - systemProperty "ballerina.home", "$buildDir" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}".toString() useTestNG() { suites 'src/test/resources/testng.xml' } diff --git a/distribution/zip/jballerina-tools/build.gradle b/distribution/zip/jballerina-tools/build.gradle index f0f2c4d4c83b..8f582d381e47 100644 --- a/distribution/zip/jballerina-tools/build.gradle +++ b/distribution/zip/jballerina-tools/build.gradle @@ -228,7 +228,7 @@ dependencies { tasks.register('configured') { configurations.distBal.allDependencies.withType(ProjectDependency) { - def path = it.getDependencyProject().path + // def path = it.getDependencyProject().path // dependencies.add("bir", dependencies.project(path: path, configuration: 'bir')) // dependencies.add("birJar", dependencies.project(path: path, configuration: 'birJar')) } @@ -246,7 +246,9 @@ def copyBalaSpec = { path -> copySpec { from configurations.distBal into(path + 'lib') - fileMode 0644 + filePermissions { + unix(0644) + } } } @@ -378,7 +380,7 @@ def apiDocsSpec = { } tasks.register('extractBalxBirs', Copy) { -// def path = "$buildDir/bir-cache" +// def path = "${getLayout().getBuildDirectory().get()}/bir-cache" // from configurations.balxBir.files // into path } @@ -398,7 +400,7 @@ tasks.register('pathingJar', Jar) { tasks.register('copyApiDocs', Copy) { dependsOn configurations.balDoc from configurations.balDoc.files - into "$buildDir/api-docs" + into "${getLayout().getBuildDirectory().get()}/api-docs" exclude "index.html" exclude "html-template-resources" exclude "syntax-highlighter" @@ -408,12 +410,12 @@ tasks.register('generateDocs', JavaExec) { dependsOn pathingJar dependsOn copyApiDocs dependsOn ':docerina-gradle-plugin:build' - outputs.dir("$buildDir/api-docs") + outputs.dir("${getLayout().getBuildDirectory().get()}/api-docs") outputs.cacheIf { true } - systemProperty("ballerina.home", "$buildDir") + systemProperty("ballerina.home", "${getLayout().getBuildDirectory().get()}".toString()) classpath = files(pathingJar.archiveFile) mainClass = 'org.ballerinalang.plugin.gradle.doc.DocerinaGen' - args("$buildDir/api-docs") + args("${getLayout().getBuildDirectory().get()}/api-docs") } tasks.register('createApiDocsZip', Zip) { @@ -469,7 +471,7 @@ tasks.register('updateBalHome', Copy) { tasks.register('createDistribution', Copy) { mustRunAfter(':language-server:language-server-core:createZip') - def filePath = "$buildDir/extracted-distributions/${project.name}-${project.version}" + def filePath = "${getLayout().getBuildDirectory().get()}/extracted-distributions/${project.name}-${project.version}" file(filePath).mkdirs() with copyJarSpec("") with copyBirSpec("") @@ -501,8 +503,8 @@ build { artifacts { bala configurations.distBal.files - zip file: file("$buildDir/distributions/${project.name}-${project.version}.zip"), builtBy: createZip - unzipped file: file("$buildDir/extracted-distributions/${project.name}-${project.version}"), builtBy: createDistribution + zip file: file("${getLayout().getBuildDirectory().get()}/distributions/${project.name}-${project.version}.zip"), builtBy: createZip + unzipped file: file("${getLayout().getBuildDirectory().get()}/extracted-distributions/${project.name}-${project.version}"), builtBy: createDistribution } // This section makes sure that checkstyle/spotbug runs when dist is build. diff --git a/distribution/zip/jballerina/build.gradle b/distribution/zip/jballerina/build.gradle index 640e78d72155..33c52204d62b 100644 --- a/distribution/zip/jballerina/build.gradle +++ b/distribution/zip/jballerina/build.gradle @@ -147,7 +147,7 @@ artifacts { bin file('bin') staticFiles configurations.staticArtifacts.files resourceFiles file('resources') - zip file: file("$buildDir/distributions/${basePath}.zip"), builtBy: createZip + zip file: file("${getLayout().getBuildDirectory().get()}/distributions/${basePath}.zip"), builtBy: createZip } build { diff --git a/docs/bir-spec/build.gradle b/docs/bir-spec/build.gradle index 3b4329246918..ee7f4066c573 100644 --- a/docs/bir-spec/build.gradle +++ b/docs/bir-spec/build.gradle @@ -40,9 +40,9 @@ kaitai { cacheDir = new File("${project.gradle.gradleUserHomeDir}/kaitai-cache") executionTimeout = 10_000 version = "${libs.versions.kaitaiStructCompilerVersion.get()}" - url = new URL("https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/"+ + url = URI.create("https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/"+ "${libs.versions.kaitaiStructCompilerVersion.get()}"+"/kaitai-struct-compiler-" + - "${libs.versions.kaitaiStructCompilerVersion.get()}"+".zip") + "${libs.versions.kaitaiStructCompilerVersion.get()}"+".zip").toURL() } sourceSets.main.java.srcDirs += 'build/generated/kaitai' diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 597bdd87fb00..498ae9dc7eaa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -108,7 +108,7 @@ ow2AsmUtilVersion="9.7" ow2AsmVersion="9.7" picocliVersion="4.0.1" puppycrawlCheckstyleVersion="10.12.0" -researchgateReleaseVersion="2.8.0" +researchgateReleaseVersion = "3.0.2" scalaLibraryVersion="2.11.7" slf4jApiVersion="2.0.7" slf4jJdk14Version="2.0.7" diff --git a/gradle/plugins/java-convention/src/main/groovy/ballerinaLangLibBuild.gradle b/gradle/plugins/java-convention/src/main/groovy/ballerinaLangLibBuild.gradle index 0000e1ccd39c..cf6e52af76c6 100644 --- a/gradle/plugins/java-convention/src/main/groovy/ballerinaLangLibBuild.gradle +++ b/gradle/plugins/java-convention/src/main/groovy/ballerinaLangLibBuild.gradle @@ -102,7 +102,7 @@ tasks.register('createDistributionCache') { configurations.distributionBala.each { artifact -> copy { from zipTree( artifact.getPath() ) - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } } } @@ -117,7 +117,7 @@ def jarFileName = modOrg + "-" + project.ext.modName + "-" + modVersion tasks.register('copyBallerinaProject', Copy) { from project.projectDir.toString() + "/src/main/ballerina/" - into project.buildDir.toString() + "/ballerina-src" + into project.getLayout().getBuildDirectory().get().toString() + "/ballerina-src" } tasks.register('ballerinaLangLibBuild', BallerinaLangLibBuildTask) { @@ -129,13 +129,13 @@ tasks.register('ballerinaLangLibBuild', BallerinaLangLibBuildTask) { } artifacts { - distributionBala file("$buildDir/ballerina-src/target/" + modName + ".zip"), { + distributionBala file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/" + modName + ".zip"), { builtBy(ballerinaLangLibBuild) } - distributionBirJar file("$buildDir/ballerina-src/target/${jarFileName}.jar"), { + distributionBirJar file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/${jarFileName}.jar"), { builtBy(ballerinaLangLibBuild) } - balDoc file("$buildDir/ballerina-src/target/apidocs/"), { + balDoc file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/apidocs/"), { builtBy(ballerinaLangLibBuild) } } diff --git a/gradle/plugins/java-convention/src/main/groovy/ballerinaLangLibLoad.gradle b/gradle/plugins/java-convention/src/main/groovy/ballerinaLangLibLoad.gradle index b2dd0ac6a4fd..5d38bfc43dc2 100644 --- a/gradle/plugins/java-convention/src/main/groovy/ballerinaLangLibLoad.gradle +++ b/gradle/plugins/java-convention/src/main/groovy/ballerinaLangLibLoad.gradle @@ -108,7 +108,7 @@ tasks.register('loadDistributionCache') { configurations.distributionBala.each { artifact -> copy { from zipTree( artifact.getPath() ) - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } } } @@ -117,7 +117,7 @@ tasks.register('loadDistributionCache') { test { dependsOn loadDistributionCache systemProperty "java.util.logging.config.file", "src/test/resources/logging.properties" - systemProperty "ballerina.home", "$buildDir" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}".toString() afterSuite { suite, result -> result.exception?.printStackTrace() diff --git a/gradle/plugins/java-convention/src/main/groovy/ballerinaNativeStdLibBuild.gradle b/gradle/plugins/java-convention/src/main/groovy/ballerinaNativeStdLibBuild.gradle index 5520c66c566e..d9f6c3519323 100644 --- a/gradle/plugins/java-convention/src/main/groovy/ballerinaNativeStdLibBuild.gradle +++ b/gradle/plugins/java-convention/src/main/groovy/ballerinaNativeStdLibBuild.gradle @@ -129,7 +129,7 @@ tasks.register('createDistributionCache') { configurations.distributionBala.each { artifact -> copy { from zipTree(artifact.getPath()) - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } } } @@ -141,14 +141,14 @@ tasks.register('copyRuntime') { configurations.dist.each { artifact -> copy { from artifact.getPath() - into "$buildDir/bre/lib" + into "${getLayout().getBuildDirectory().get()}/bre/lib" } } } } tasks.register('copyInteropImports', Copy) { - into "$buildDir/libs" + into "${getLayout().getBuildDirectory().get()}/libs" from configurations.interopImports } @@ -168,7 +168,7 @@ def jarFileName = modOrg + "-" + project.ext.modName + "-" + modVersion tasks.register('copyBallerinaProject', Copy) { from project.projectDir.toString() + "/src/main/ballerina/" - into project.buildDir.toString() + "/ballerina-src" + into project.getLayout().getBuildDirectory().get().toString() + "/ballerina-src" } tasks.register('ballerinaLangLibBuild', BallerinaLangNativeLibBuildTask) { @@ -185,13 +185,13 @@ tasks.register('ballerinaLangLibBuild', BallerinaLangNativeLibBuildTask) { } artifacts { - distributionBala file("$buildDir/ballerina-src/target/${project.ext.modName}.zip"), { + distributionBala file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/${project.ext.modName}.zip"), { builtBy(ballerinaLangLibBuild) } - distributionBirJar file("$buildDir/ballerina-src/target/${jarFileName}.jar"), { + distributionBirJar file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/${jarFileName}.jar"), { builtBy(ballerinaLangLibBuild) } - balDoc file("$buildDir/ballerina-src/target/apidocs/"), { + balDoc file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/apidocs/"), { builtBy(ballerinaLangLibBuild) } } diff --git a/gradle/plugins/java-convention/src/main/groovy/ballerinaStdLibBuild.gradle b/gradle/plugins/java-convention/src/main/groovy/ballerinaStdLibBuild.gradle index b4bf163e2b21..2ae6a45169b5 100644 --- a/gradle/plugins/java-convention/src/main/groovy/ballerinaStdLibBuild.gradle +++ b/gradle/plugins/java-convention/src/main/groovy/ballerinaStdLibBuild.gradle @@ -131,7 +131,7 @@ tasks.register('createDistributionCache') { configurations.distributionBala.each { artifact -> copy { from zipTree( artifact.getPath() ) - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } } } @@ -143,14 +143,14 @@ tasks.register('copyRuntime') { configurations.dist.each { artifact -> copy { from artifact.getPath() - into "$buildDir/bre/lib" + into "${getLayout().getBuildDirectory().get()}/bre/lib" } } } } tasks.register('copyInteropImports', Copy) { - into "$buildDir/libs" + into "${getLayout().getBuildDirectory().get()}/libs" from configurations.interopImports } @@ -179,7 +179,7 @@ def jarFileName = modOrg + "-" + modName + "-" + modVersion tasks.register('copyBallerinaProject', Copy) { from project.projectDir.toString() + "/src/main/ballerina/" - into project.buildDir.toString() + "/ballerina-src" + into project.getLayout().getBuildDirectory().get().toString() + "/ballerina-src" } tasks.register('ballerinaLangLibBuild', BallerinaLangStdLibBuildTask) { @@ -196,13 +196,13 @@ tasks.register('ballerinaLangLibBuild', BallerinaLangStdLibBuildTask) { } artifacts { - distributionBala file("$buildDir/ballerina-src/target/" + modName + ".zip"), { + distributionBala file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/" + modName + ".zip"), { builtBy(ballerinaLangLibBuild) } - distributionBirJar file("$buildDir/ballerina-src/target/${jarFileName}.jar"), { + distributionBirJar file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/${jarFileName}.jar"), { builtBy(ballerinaLangLibBuild) } - balDoc file("$buildDir/ballerina-src/target/apidocs/"), { + balDoc file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/apidocs/"), { builtBy(ballerinaLangLibBuild) } } diff --git a/gradle/plugins/java-convention/src/main/groovy/ballerinaStdLibBuildInternal.gradle b/gradle/plugins/java-convention/src/main/groovy/ballerinaStdLibBuildInternal.gradle index 75decc0202e9..d7f0f5d05b6b 100644 --- a/gradle/plugins/java-convention/src/main/groovy/ballerinaStdLibBuildInternal.gradle +++ b/gradle/plugins/java-convention/src/main/groovy/ballerinaStdLibBuildInternal.gradle @@ -131,7 +131,7 @@ tasks.register('createDistributionCache') { configurations.distributionBala.each { artifact -> copy { from zipTree( artifact.getPath() ) - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } } } @@ -143,14 +143,14 @@ tasks.register('copyRuntime') { configurations.dist.each { artifact -> copy { from artifact.getPath() - into "$buildDir/bre/lib" + into "${getLayout().getBuildDirectory().get()}/bre/lib" } } } } tasks.register('copyInteropImports', Copy) { - into "$buildDir/libs" + into "${getLayout().getBuildDirectory().get()}/libs" from configurations.interopImports } @@ -177,7 +177,7 @@ def jarFileName = modOrg + "-" + modName + "-" + modVersion tasks.register('copyBallerinaProject', Copy) { from project.projectDir.toString() + "/src/main/ballerina/" - into project.buildDir.toString() + "/ballerina-src" + into project.getLayout().getBuildDirectory().get().toString() + "/ballerina-src" } tasks.register('ballerinaLangLibBuild', BallerinaLangLibBuildInternalTask) { @@ -194,13 +194,13 @@ tasks.register('ballerinaLangLibBuild', BallerinaLangLibBuildInternalTask) { } artifacts { - distributionBala file("$buildDir/ballerina-src/target/" + modName + ".zip"), { + distributionBala file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/" + modName + ".zip"), { builtBy(ballerinaLangLibBuild) } - distributionBirJar file("$buildDir/ballerina-src/target/${jarFileName}.jar"), { + distributionBirJar file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/${jarFileName}.jar"), { builtBy(ballerinaLangLibBuild) } - balDoc file("$buildDir/ballerina-src/target/apidocs/"), { + balDoc file("${getLayout().getBuildDirectory().get()}/ballerina-src/target/apidocs/"), { builtBy(ballerinaLangLibBuild) } } diff --git a/gradle/plugins/java-convention/src/main/groovy/javaProject.gradle b/gradle/plugins/java-convention/src/main/groovy/javaProject.gradle index 2e21689daefa..2c0b65e205b3 100644 --- a/gradle/plugins/java-convention/src/main/groovy/javaProject.gradle +++ b/gradle/plugins/java-convention/src/main/groovy/javaProject.gradle @@ -165,7 +165,7 @@ test { showStackTraces = true showStandardStreams = true } - systemProperty "ballerina.home", "$buildDir" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}".toString() systemProperty "org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog" systemProperty "LANG_REPO_BUILD", "true" testLogging { @@ -174,7 +174,7 @@ test { } jacoco { - destinationFile = file("$buildDir/jacoco/jacoco.exec") + destinationFile = file("${getLayout().getBuildDirectory().get()}/jacoco/jacoco.exec") } } @@ -195,7 +195,7 @@ check { } tasks.register('jacocoMergeExec', JacocoReport) { - getExecutionData().setFrom(fileTree("$buildDir/jacoco/").matching { + getExecutionData().setFrom(fileTree("${getLayout().getBuildDirectory().get()}/jacoco/").matching { include "**.exec" } as FileCollection) } diff --git a/gradle/plugins/java-convention/src/main/groovy/javaProjectWithExtBala.gradle b/gradle/plugins/java-convention/src/main/groovy/javaProjectWithExtBala.gradle index cb4769674c5f..694b8879304b 100644 --- a/gradle/plugins/java-convention/src/main/groovy/javaProjectWithExtBala.gradle +++ b/gradle/plugins/java-convention/src/main/groovy/javaProjectWithExtBala.gradle @@ -38,7 +38,7 @@ dependencies { } compileJava { - def generatedSources = "$buildDir/generated-from-annot" + def generatedSources = "${getLayout().getBuildDirectory().get()}/generated-from-annot".toString() def generatedOutputDir = file("$generatedSources") def pkgName = project.name.replace("ballerina", "").replaceAll("-","") options.compilerArgs += ["-AnativeEntityProviderClass=StandardNativeElementProvider", @@ -53,13 +53,13 @@ compileJava { tasks.register('createBalHome', Copy) { dependsOn configurations.balaImplementation from configurations.balaImplementation - into "$buildDir/ballerina-home/main/lib" + into "${getLayout().getBuildDirectory().get()}/ballerina-home/main/lib" } tasks.register('createTestBalHome', Copy) { dependsOn configurations.balaTestImplementation from configurations.balaTestImplementation - into "$buildDir/ballerina-home/test/lib/" + into "${getLayout().getBuildDirectory().get()}/ballerina-home/test/lib/" } test { @@ -67,7 +67,7 @@ test { inputs.files(configurations.balaTestImplementation); - systemProperty "ballerina.home", "$buildDir/ballerina-home/test" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}/ballerina-home/test".toString() systemProperty "java.util.logging.config.file", "src/test/resources/logging.properties" systemProperty "LANG_REPO_BUILD", "true" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b82aa23a4f05..e2847c820046 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/langlib/lang.test/build.gradle b/langlib/lang.test/build.gradle index ac63b3a976ae..e8b22f432367 100644 --- a/langlib/lang.test/build.gradle +++ b/langlib/lang.test/build.gradle @@ -31,7 +31,7 @@ dependencies { tasks.register('updateVersion') { doLast { ant.replaceregexp( - file: "${project.buildDir}/ballerina-src/Ballerina.toml", + file: "${project.getLayout().getBuildDirectory().get()}/ballerina-src/Ballerina.toml", match: "${project.name}-(.*).jar", replace: "${project.name}-${project.version}.jar" ) diff --git a/language-server/modules/langserver-commons/build.gradle b/language-server/modules/langserver-commons/build.gradle index 35049003a4d0..a5963590f028 100644 --- a/language-server/modules/langserver-commons/build.gradle +++ b/language-server/modules/langserver-commons/build.gradle @@ -33,7 +33,7 @@ dependencies { description = 'Ballerina - Language server - Commons' test { - systemProperty "ballerina.home", "$buildDir/" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}/".toString() systemProperty "ballerina.version", project.version useTestNG() { suites 'src/test/resources/testng.xml' diff --git a/language-server/modules/langserver-core/build.gradle b/language-server/modules/langserver-core/build.gradle index d6dc20c5354f..72a2a854c28d 100644 --- a/language-server/modules/langserver-core/build.gradle +++ b/language-server/modules/langserver-core/build.gradle @@ -111,7 +111,7 @@ tasks.register('createZip', Zip) { tasks.register('testJar', Jar) { dependsOn testClasses - archiveBaseName = "test-${project.archivesBaseName}" + archiveBaseName = "test-${project.base.archivesName}" from sourceSets.test.output } @@ -148,7 +148,7 @@ tasks.register('copyRuntime') { configurations.dist.each { artifact -> copy { from artifact.getPath() - into "$buildDir/bre/lib" + into "${getLayout().getBuildDirectory().get()}/bre/lib" } } } @@ -158,7 +158,7 @@ test { dependsOn deleteGeneratedModules dependsOn loadDistributionCache dependsOn copyRuntime - systemProperty "ballerina.home", "$buildDir/" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}/".toString() systemProperty "experimental", "true" systemProperty "ballerina.version", project.version systemProperty "responseTimeThreshold", 2000 diff --git a/language-server/modules/langserver-stdlib/build.gradle b/language-server/modules/langserver-stdlib/build.gradle index 387b62112900..1b7ee170cfb3 100644 --- a/language-server/modules/langserver-stdlib/build.gradle +++ b/language-server/modules/langserver-stdlib/build.gradle @@ -44,7 +44,7 @@ configurations.testCompileClasspath { tasks.register('updateVersion') { doLast { ant.replaceregexp( - file: "${project.buildDir}/ballerina-src/Ballerina.toml", + file: "${project.getLayout().getBuildDirectory().get()}/ballerina-src/Ballerina.toml", match: "${project.name}-(.*).jar", replace: "${project.name}-${project.version}.jar" ) diff --git a/misc/ballerinalang-data-mapper/build.gradle b/misc/ballerinalang-data-mapper/build.gradle index afbaa2e4ecb3..b127d9d9d526 100644 --- a/misc/ballerinalang-data-mapper/build.gradle +++ b/misc/ballerinalang-data-mapper/build.gradle @@ -41,7 +41,7 @@ dependencies { test { dependsOn loadDistributionCache - systemProperty "ballerina.home", "$buildDir/" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}/".toString() systemProperty "experimental", "true" systemProperty "ballerina.version", project.version useTestNG() { diff --git a/misc/diagram-util/build.gradle b/misc/diagram-util/build.gradle index daeb6de4521f..d8a84995f2e6 100644 --- a/misc/diagram-util/build.gradle +++ b/misc/diagram-util/build.gradle @@ -50,7 +50,7 @@ ext.moduleName = 'diagram-util' test { dependsOn loadDistributionCache - systemProperty "ballerina.home", "$buildDir/" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}/".toString() systemProperty "experimental", "true" systemProperty "ballerina.version", project.version useTestNG() { diff --git a/misc/docerina/build.gradle b/misc/docerina/build.gradle index fcf1f1c8aa41..fddee68074e9 100644 --- a/misc/docerina/build.gradle +++ b/misc/docerina/build.gradle @@ -56,7 +56,7 @@ dependencies { tasks.register('createTestDistributionCache', Copy) { dependsOn configurations.distributionBala from configurations.distributionBala - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } tasks.register('createTestBre', Copy) { @@ -64,7 +64,7 @@ tasks.register('createTestBre', Copy) { from configurations.testRt from configurations.testCore from configurations.distributionBirJar - into "$buildDir/bre/lib" + into "${getLayout().getBuildDirectory().get()}/bre/lib" } test { @@ -72,7 +72,7 @@ test { dependsOn createTestDistributionCache dependsOn createTestBre - systemProperty "ballerina.home", "$buildDir" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}".toString() testLogging { events "failed" @@ -101,7 +101,7 @@ processResources { tasks.register('copyBala', Copy) { from configurations.distBal - into("$buildDir/lib") + into("${getLayout().getBuildDirectory().get()}/lib") } description = 'Ballerina - Docerina' diff --git a/misc/formatter/modules/formatter-core/build.gradle b/misc/formatter/modules/formatter-core/build.gradle index 6430de584221..f4e70a67d0a2 100755 --- a/misc/formatter/modules/formatter-core/build.gradle +++ b/misc/formatter/modules/formatter-core/build.gradle @@ -48,7 +48,7 @@ ext.moduleName = 'ballerina.metrics' tasks.register('parserTests', Copy) { from "../../../../compiler/ballerina-parser/src/test/resources" - into "$buildDir/resources/test/parser-tests" + into "${getLayout().getBuildDirectory().get()}/resources/test/parser-tests" include "**/*.bal" } diff --git a/misc/testerina/modules/testerina-core/build.gradle b/misc/testerina/modules/testerina-core/build.gradle index 93bce1833c11..19f6f82b0061 100644 --- a/misc/testerina/modules/testerina-core/build.gradle +++ b/misc/testerina/modules/testerina-core/build.gradle @@ -52,7 +52,7 @@ jar { tasks.register('updateVersion') { doLast { ant.replaceregexp( - file: "${project.buildDir}/ballerina-src/Ballerina.toml", + file: "${project.getLayout().getBuildDirectory().get()}/ballerina-src/Ballerina.toml", match: "${project.name}-(.*).jar", replace: "${project.name}-${project.version}.jar" ) diff --git a/project-api/project-api-test/build.gradle b/project-api/project-api-test/build.gradle index 588f15677cbc..ace908f6cb60 100644 --- a/project-api/project-api-test/build.gradle +++ b/project-api/project-api-test/build.gradle @@ -87,7 +87,7 @@ dependencies { tasks.register('createTestDistributionCache', Copy) { dependsOn configurations.distributionBala from configurations.distributionBala - into "$buildDir/repo" + into "${getLayout().getBuildDirectory().get()}/repo" } tasks.register('createTestBre', Copy) { @@ -95,12 +95,12 @@ tasks.register('createTestBre', Copy) { from configurations.testRt from configurations.testCore from configurations.distributionBirJar - into "$buildDir/bre/lib" + into "${getLayout().getBuildDirectory().get()}/bre/lib" } tasks.register('copyCompilerPluginJars', Copy) { from configurations.compilerPluginJar - into "$buildDir/compiler-plugin-jars" + into "${getLayout().getBuildDirectory().get()}/compiler-plugin-jars" } test { diff --git a/settings.gradle b/settings.gradle index 21d05ef00350..de43c14cf188 100644 --- a/settings.gradle +++ b/settings.gradle @@ -38,7 +38,7 @@ include(':ballerina-lang:bool') include(':ballerina-lang:runtime') include(':ballerina-lang:regexp') include(':ballerina-lang-test') -include(':ballerina-langlib:test') +include(':ballerina-lang:test') include(':ballerina-io-internal') include(':json-mapper') include(':xml-to-record-converter') @@ -62,7 +62,6 @@ include(':language-server:language-server-core') include(':language-server:language-server-stdio-launcher') include(':language-server:language-server-cli') include(':language-server:language-server-launchers') -include(':language-server:language-server-test-coverage') include(':language-server') include(':ballerina-shell:shell-rt') include(':ballerina-shell:shell-core') @@ -70,28 +69,20 @@ include(':ballerina-shell:shell-cli') include(':ballerina-shell') include(':docerina-gradle-plugin') include(':docerina') -include(':ballerina-formatter') include(':ballerinalang-data-mapper') -include ':ballerina-config-schema-builder' include(':testerina:testerina-core') include(':testerina') -include(':testerina:report-tools') include(':testerina:testerina-compiler-plugin') include(':testerina:testerina-runtime') include(':ballerina-spec-conformance-tests') include(':metrics-extensions:ballerina-metrics-extension') include(':metrics-extensions') include(':toml-parser') -include(':composer-library') -include(':ballerina-stringutils') -include(':ballerina') include(':jballerina') include(':jballerina-tools') -include(':nballerina-tools') include(':jballerina-integration-test') include(':central-client') include(':testerina:testerina-runtime') -include(':testerina:report-tools') include(':testerina-integration-test') include(':jballerina-debugger-integration-test') include(':language-server-integration-tests') @@ -100,20 +91,26 @@ include(':language-server-integration-tests') include(':benchmarks') include(':build-config:checkstyle') +include(':debug-adapter') include(':debug-adapter:debug-adapter-core') include(':debug-adapter:debug-adapter-cli') include(':debug-adapter:debug-adapter-runtime') +include('semver-checker') include('semver-checker:semver-checker-cli') include('semver-checker:semver-checker-core') +include(':compiler-plugins') include(':compiler-plugins:package-semantic-analyzer') include(':compiler-plugins:configurable-schema-generator') +include(':formatter') include(':formatter:formatter-core') include(':formatter:formatter-cli') +include(':ls-extensions') include(':ls-extensions:json-to-record-converter') include(':ls-extensions:performance-analyzer-services') include(':ls-extensions:partial-parser') include(':ls-extensions:trigger-service') include(':ls-extensions:bal-shell-service') +include(':project-api-test-artifact') include(':project-api-test-artifact:event-logger-compiler-plugin') include(':project-api-test-artifact:compiler-plugin-with-one-dependency') include(':project-api-test-artifact:compiler-plugin-with-codeactions') @@ -152,6 +149,7 @@ project(':ballerina-compiler-api-test').projectDir = file('tests/ballerina-compi project(':ballerina-lang').projectDir = file('compiler/ballerina-lang') project(':ballerina-linter').projectDir = file('compiler/linter-plugin') project(':project-api-test').projectDir = file('project-api/project-api-test') +project(':project-api-test-artifact').projectDir = file('project-api/test-artifacts') project(':project-api-test-artifact:event-logger-compiler-plugin').projectDir = file('project-api/test-artifacts/event-logger-compiler-plugin') project(':project-api-test-artifact:compiler-plugin-with-one-dependency').projectDir = file('project-api/test-artifacts/compiler-plugin-with-one-dependency') project(':project-api-test-artifact:compiler-plugin-with-codeactions').projectDir = file('project-api/test-artifacts/compiler-plugin-with-codeactions') @@ -202,7 +200,7 @@ project(':ballerina-lang:bool').projectDir = file('langlib/lang.boolean') project(':ballerina-lang:runtime').projectDir = file('langlib/lang.runtime') project(':ballerina-lang:regexp').projectDir = file('langlib/lang.regexp') project(':ballerina-lang-test').projectDir = file('langlib/lang.test') -project(':ballerina-langlib:test').projectDir = file('langlib/langlib-test') +project(':ballerina-lang:test').projectDir = file('langlib/langlib-test') project(':ballerina-runtime').projectDir = file('bvm/ballerina-runtime') project(':ballerina-rt').projectDir = file('bvm/ballerina-rt') project(':ballerina-treegen').projectDir = file('compiler/ballerina-treegen') @@ -227,12 +225,10 @@ project(':language-server:language-server-core').projectDir = file('language-ser project(':language-server:language-server-stdio-launcher').projectDir = file('language-server/modules/launchers/stdio-launcher') project(':language-server:language-server-cli').projectDir = file('language-server/modules/langserver-cli') project(':language-server:language-server-launchers').projectDir = file('language-server/modules/launchers') -project(':language-server:language-server-test-coverage').projectDir = file('language-server/modules/test-coverage') project(':ballerina-shell:shell-rt').projectDir = file('ballerina-shell/modules/shell-rt') project(':ballerina-shell:shell-core').projectDir = file('ballerina-shell/modules/shell-core') project(':ballerina-shell:shell-cli').projectDir = file('ballerina-shell/modules/shell-cli') project(':ballerinalang-data-mapper').projectDir = file('misc/ballerinalang-data-mapper') -project(':ballerina-config-schema-builder').projectDir = file('misc/ballerina-config-schema-builder') project(':docerina-gradle-plugin').projectDir = file('misc/ballerina-gradle-plugins/docerina-gradle-plugin') project(':docerina').projectDir = file('misc/docerina') project(':testerina:testerina-compiler-plugin').projectDir = file('misc/testerina/modules/testerina-compiler-plugin') @@ -242,28 +238,30 @@ project(':ballerina-spec-conformance-tests').projectDir = file('tests/ballerina- project(':metrics-extensions:ballerina-metrics-extension').projectDir = file('misc/metrics-extensions/modules/ballerina-metrics-extension') project(':metrics-extensions').projectDir = file('misc/metrics-extensions') project(':toml-parser').projectDir = file('misc/toml-parser') -project(':composer-library').projectDir = file('composer') project(':jballerina').projectDir = file('distribution/zip/jballerina') project(':jballerina-tools').projectDir = file('distribution/zip/jballerina-tools') -project(':nballerina-tools').projectDir = file('distribution/zip/nballerina-tools') project(':jballerina-integration-test').projectDir = file('tests/jballerina-integration-test') project(':language-server-integration-tests').projectDir = file('tests/language-server-integration-tests') project(':testerina:testerina-runtime').projectDir = file('misc/testerina/modules/testerina-runtime') -project(':testerina:report-tools').projectDir = file('misc/testerina/modules/report-tools') project(':testerina-integration-test').projectDir = file('tests/testerina-integration-test') project(':jballerina-debugger-integration-test').projectDir = file('tests/jballerina-debugger-integration-test') project(':bir-spec').projectDir = file('docs/bir-spec') project(':identifier-util').projectDir = file('misc/identifier-util') +project(':debug-adapter').projectDir = file('misc/debug-adapter') project(':debug-adapter:debug-adapter-core').projectDir = file('misc/debug-adapter/modules/debug-adapter-core') project(':debug-adapter:debug-adapter-cli').projectDir = file('misc/debug-adapter/modules/debug-adapter-cli') project(':debug-adapter:debug-adapter-runtime').projectDir = file('misc/debug-adapter/modules/debug-adapter-runtime') +project(':semver-checker').projectDir = file('misc/semver-checker') project(':semver-checker:semver-checker-core').projectDir = file('misc/semver-checker/modules/semver-checker-core') project(':semver-checker:semver-checker-cli').projectDir = file('misc/semver-checker/modules/semver-checker-cli') +project(':compiler-plugins').projectDir = file('misc/compiler-plugins') project(':compiler-plugins:package-semantic-analyzer').projectDir = file('misc/compiler-plugins/modules/package-semantic-analyzer') project(':compiler-plugins:configurable-schema-generator').projectDir = file('misc/compiler-plugins/modules/configurable-schema-generator') +project(':formatter').projectDir = file('misc/formatter') project(':formatter:formatter-core').projectDir = file('misc/formatter/modules/formatter-core') project(':formatter:formatter-cli').projectDir = file('misc/formatter/modules/formatter-cli') +project(':ls-extensions').projectDir = file('misc/ls-extensions') project(':ls-extensions:json-to-record-converter').projectDir = file('misc/ls-extensions/modules/json-to-record-converter') project(':ls-extensions:performance-analyzer-services').projectDir = file('misc/ls-extensions/modules/performance-analyzer-services') project(':ls-extensions:partial-parser').projectDir = file('misc/ls-extensions/modules/partial-parser') diff --git a/tests/ballerina-tools-integration-test/build.gradle b/tests/ballerina-tools-integration-test/build.gradle index d595f4bf099f..e6df4271c10a 100644 --- a/tests/ballerina-tools-integration-test/build.gradle +++ b/tests/ballerina-tools-integration-test/build.gradle @@ -54,12 +54,12 @@ test { // ":examples-test:test" ] - systemProperty 'project.build.directory', "$buildDir" + systemProperty 'project.build.directory', "${getLayout().getBuildDirectory().get()}".toString() systemProperty 'server.zip', configurations.ballerinaTools.asPath systemProperty 'jballerina.server.zip', configurations.jballerinaTools.asPath - systemProperty 'java.util.logging.config.file', "$buildDir/resources/test/logging.properties" + systemProperty 'java.util.logging.config.file', "${getLayout().getBuildDirectory().get()}/resources/test/logging.properties".toString() systemProperty 'integration.test.utils.service.file', configurations.testUtilsBal.asPath - systemProperty 'javax.net.ssl.trustStore', "${configurations.ballerina.asPath}/security/ballerinaTruststore.p12" + systemProperty 'javax.net.ssl.trustStore', "${configurations.ballerina.asPath}/security/ballerinaTruststore.p12".toString() systemProperty 'javax.net.ssl.trustStorePassword', 'ballerina' systemProperty 'ballerina.agent.path', configurations.testUtilsJar.asPath useTestNG() { diff --git a/tests/jballerina-benchmark-test/build.gradle b/tests/jballerina-benchmark-test/build.gradle index 7802baa77c03..4662fc89e39d 100644 --- a/tests/jballerina-benchmark-test/build.gradle +++ b/tests/jballerina-benchmark-test/build.gradle @@ -54,7 +54,7 @@ dependencies { } tasks.register('copyToLib', Copy) { - into "${buildDir}/libs" + into "${getLayout().getBuildDirectory().get()}/libs" from configurations.testLibs } @@ -74,10 +74,10 @@ test { def benchmarkIterations = 400000 def ballerinaHome = "${configurations.ballerinaTools.asPath}" def sourceLocation = "${project.projectDir}/src/main/ballerina/" - def resultsLocation = "${buildDir}/results" + def resultsLocation = "${getLayout().getBuildDirectory().get()}/results" def resultsFileName = "benchmark_ballerina_${project.version}" - def gcLogsLocation = "${buildDir}/gc-logs" - def gcViewerJar = "${buildDir}/libs/gcviewer-1.36.jar" + def gcLogsLocation = "${getLayout().getBuildDirectory().get()}/gc-logs" + def gcViewerJar = "${getLayout().getBuildDirectory().get()}/libs/gcviewer-1.36.jar" if (project.hasProperty("warmup.iterations")) { warmupIterations = project.findProperty("warmup.iterations") } diff --git a/tests/jballerina-debugger-integration-test/build.gradle b/tests/jballerina-debugger-integration-test/build.gradle index 50c65476534c..06970356d018 100644 --- a/tests/jballerina-debugger-integration-test/build.gradle +++ b/tests/jballerina-debugger-integration-test/build.gradle @@ -22,7 +22,7 @@ plugins { description = 'Ballerina - Debugger Test' -def extractedDist = "$buildDir/extractedDistribution/jballerina-tools-${project.version}" +def extractedDist = "${getLayout().getBuildDirectory().get()}/extractedDistribution/jballerina-tools-${project.version}" configurations { jballerinaTools @@ -41,7 +41,7 @@ dependencies { tasks.register('extractDistribution', Copy) { dependsOn ':jballerina-tools:build' from zipTree(configurations.jballerinaTools.asPath) - into "$buildDir/extractedDistribution" + into "${getLayout().getBuildDirectory().get()}/extractedDistribution" } @@ -51,11 +51,11 @@ test { dependsOn extractDistribution maxParallelForks = 1 - systemProperty 'basedir', "$buildDir" - systemProperty 'libdir', "$buildDir" + systemProperty 'basedir', "${getLayout().getBuildDirectory().get()}".toString() + systemProperty 'libdir', "${getLayout().getBuildDirectory().get()}".toString() systemProperty 'server.zip', configurations.jballerinaTools.asPath systemProperty 'jballerina.server.zip', configurations.jballerinaTools.asPath - systemProperty 'java.util.logging.config.file', "$buildDir/src/test/resources/logging.properties" + systemProperty 'java.util.logging.config.file', "${getLayout().getBuildDirectory().get()}/src/test/resources/logging.properties".toString() useTestNG() { suites 'src/test/resources/testng.xml' diff --git a/tests/jballerina-integration-test/build.gradle b/tests/jballerina-integration-test/build.gradle index ae1d588e8c90..ecf82768da07 100644 --- a/tests/jballerina-integration-test/build.gradle +++ b/tests/jballerina-integration-test/build.gradle @@ -81,7 +81,7 @@ dependencies { tasks.register('createBre', Copy) { from configurations.balRuntime - into '$buildDir/bre/lib' + into '${getLayout().getBuildDirectory().get()}/bre/lib' } test { @@ -89,11 +89,11 @@ test { dependsOn ':jballerina-tools:build' maxParallelForks = 1 - systemProperty 'basedir', "$buildDir" - systemProperty 'libdir', "$buildDir" + systemProperty 'basedir', "${getLayout().getBuildDirectory().get()}".toString() + systemProperty 'libdir', "${getLayout().getBuildDirectory().get()}".toString() systemProperty 'server.zip', configurations.jballerinaTools.asPath systemProperty 'jballerina.server.zip', configurations.jballerinaTools.asPath - systemProperty 'java.util.logging.config.file', "$buildDir/resources/test/logging.properties" + systemProperty 'java.util.logging.config.file', "${getLayout().getBuildDirectory().get()}/resources/test/logging.properties".toString() systemProperty 'ballerina.agent.path', configurations.testUtils.asPath systemProperty 'observability.test.utils.bala', configurations.observeTestUtilsBala.asPath systemProperty 'observability.test.utils.jar', configurations.observeTestUtilsJar.asPath @@ -113,7 +113,7 @@ configurations.all { } tasks.register('copyToLib', Copy) { - into "${buildDir}/libs" + into "${getLayout().getBuildDirectory().get()}/libs" from configurations.testLibs } diff --git a/tests/language-server-integration-tests/build.gradle b/tests/language-server-integration-tests/build.gradle index 87bfc94205c6..494e4b70921e 100644 --- a/tests/language-server-integration-tests/build.gradle +++ b/tests/language-server-integration-tests/build.gradle @@ -56,13 +56,13 @@ description = 'Ballerina - Language Server Integration Tests' tasks.register('copyCompilerPluginJars', Copy) { from configurations.compilerPluginJar - into "$buildDir/compiler-plugin-jars" + into "${getLayout().getBuildDirectory().get()}/compiler-plugin-jars" } test { dependsOn copyCompilerPluginJars dependsOn loadDistributionCache - systemProperty "ballerina.home", "$buildDir/" + systemProperty "ballerina.home", "${getLayout().getBuildDirectory().get()}/".toString() systemProperty "experimental", "true" systemProperty "ballerina.version", project.version useTestNG() { diff --git a/tests/testerina-integration-test/build.gradle b/tests/testerina-integration-test/build.gradle index 7b1812f5f6a6..76e798043fb2 100644 --- a/tests/testerina-integration-test/build.gradle +++ b/tests/testerina-integration-test/build.gradle @@ -22,7 +22,7 @@ plugins { description = 'Ballerina - Testerina Test' -def extractedDist = "$buildDir/extractedDistribution/jballerina-tools-${project.version}" +def extractedDist = "${getLayout().getBuildDirectory().get()}/extractedDistribution/jballerina-tools-${project.version}" configurations { jballerinaTools @@ -62,13 +62,13 @@ jacoco { tasks.register('copyCompilerPluginJars', Copy) { from configurations.compilerPluginJar - into "$buildDir/compiler-plugin-jars" + into "${getLayout().getBuildDirectory().get()}/compiler-plugin-jars" } tasks.register('extractDistribution', Copy) { dependsOn ':jballerina-tools:build' from zipTree(configurations.jballerinaTools.asPath) - into "$buildDir/extractedDistribution" + into "${getLayout().getBuildDirectory().get()}/extractedDistribution" } @@ -87,11 +87,11 @@ test { systemProperty 'enableTesterinaTests', 'true' maxParallelForks = 1 - systemProperty 'basedir', "$buildDir" - systemProperty 'libdir', "$buildDir" + systemProperty 'basedir', "${getLayout().getBuildDirectory().get()}".toString() + systemProperty 'libdir', "${getLayout().getBuildDirectory().get()}".toString() systemProperty 'server.zip', configurations.jballerinaTools.asPath systemProperty 'jballerina.server.zip', configurations.jballerinaTools.asPath - systemProperty 'java.util.logging.config.file', "$buildDir/src/test/resources/logging.properties" + systemProperty 'java.util.logging.config.file', "${getLayout().getBuildDirectory().get()}/src/test/resources/logging.properties".toString() useTestNG() { suites 'src/test/resources/testng.xml'