Skip to content

Commit

Permalink
Merge pull request #42887 from Shadow-Devil/deprecated-main-in-gradle
Browse files Browse the repository at this point in the history
Fix deprecated usage of `main` and replace it with `mainClass` in gradle files
  • Loading branch information
warunalakshitha authored Jun 11, 2024
2 parents 1cadb9e + b1ee7fd commit 7402686
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ballerina-shell/modules/shell-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test {

def mainCliClass = 'io.ballerina.shell.cli.ReplShellApplication'
task run(type: JavaExec) {
main = mainCliClass
mainClass = mainCliClass
standardInput = System.in
classpath = sourceSets.main.runtimeClasspath
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/ballerina-treegen/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "$rootDir/gradle/javaProject.gradle"
description = 'Ballerina - Syntax Tree Generator'

task treegen(type: JavaExec) {
main = "io.ballerinalang.compiler.internal.treegen.TreeGen"
mainClass = "io.ballerinalang.compiler.internal.treegen.TreeGen"
classpath = sourceSets.main.runtimeClasspath
}

Expand Down
2 changes: 1 addition & 1 deletion distribution/zip/jballerina-tools/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ task generateDocs(type: JavaExec) {
outputs.cacheIf { true }
systemProperty("ballerina.home", "$buildDir")
classpath = files(pathingJar.archivePath)
main = 'org.ballerinalang.plugin.gradle.doc.DocerinaGen'
mainClass = 'org.ballerinalang.plugin.gradle.doc.DocerinaGen'
args("$buildDir/api-docs")
}

Expand Down
2 changes: 1 addition & 1 deletion docs/bir-spec/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ checkstyleMain.exclude '**/kaitai/**'
task genBirSpec(type: JavaExec) {
dependsOn classes
classpath += sourceSets.main.runtimeClasspath
main = 'org.ballerinalang.birspec.BIRSpecGenerator'
mainClass = 'org.ballerinalang.birspec.BIRSpecGenerator'

inputs.dir('src/main/resources')
outputs.files('../compiler/bir-spec.md')
Expand Down
2 changes: 1 addition & 1 deletion gradle/balNativeLibProject.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CreateBalaTask extends JavaExec {
def newParser = 'true'

CreateBalaTask() {
setMain('org.ballerinalang.stdlib.utils.GenerateBala')
setMainClass('org.ballerinalang.stdlib.utils.GenerateBala')
setEnableAssertions(true)
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/ballerinaNativeStdLibBuild.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class BallerinaLangLibBuildTask extends JavaExec {
@Internal def skipBootstrap = 'false'

BallerinaLangLibBuildTask() {
setMain('org.ballerinalang.stdlib.utils.BuildLangLib')
setMainClass('org.ballerinalang.stdlib.utils.BuildLangLib')
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion gradle/ballerinaStdLibBuildInternal.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class BallerinaLangLibBuildTask extends JavaExec {
@Internal def skipBootstrap = 'false'

BallerinaLangLibBuildTask() {
setMain('org.ballerinalang.stdlib.utils.BuildLangLib')
setMainClass('org.ballerinalang.stdlib.utils.BuildLangLib')
}

@Override
Expand Down

0 comments on commit 7402686

Please sign in to comment.