M8Test Help

getInitBuildFile

_project.getPlugins().apply("kotlin") _project.setConfig { setEntry("com/example/script/primary.kts") setPackageName("com.example.script.kotlin") setLogo("logo.png") } val initBuildFile = _project.getInitBuildFile() if (initBuildFile != null) { _console.log("getInitBuildFile", initBuildFile.getCanonicalPath()) } else { _console.log("getInitBuildFile null") }
$project.getPlugins().apply("groovy") $project.setConfig { setEntry("com/example/script/primary.groovy") setPackageName("com.example.script.groovy") setLogo("logo.png") } def initBuildFile = $project.getInitBuildFile() if (initBuildFile != null) { $console.log("getInitBuildFile", initBuildFile.getCanonicalPath()) } else { $console.log("getInitBuildFile null") }
$project.getPlugins().apply("javascript") $project.setConfig(config => { config.setEntry("com/example/script/primary.js") config.setPackageName("com.example.script.js") config.setLogo("logo.png") }) let initBuildFile = $project.getInitBuildFile() if (initBuildFile != null) { $console.log("getInitBuildFile", initBuildFile.getCanonicalPath()) } else { $console.log("getInitBuildFile null") }
_project:getPlugins():apply("lua") _project:setConfig(function(c) c:setEntry("com/example/script/primary.lua") c:setPackageName("com.example.script.lua") c:setLogo("logo.png") end) local initBuildFile = _project:getInitBuildFile() if initBuildFile == nil then _console:log("getInitBuildFile nil") else _console:log("getInitBuildFile", initBuildFile:getCanonicalPath()) end
<?php $project->getPlugins()->apply("php"); $project->setConfig(function ($c) { $c->setEntry("com/example/script/primary.php"); $c->setPackageName("com.example.script.php"); $c->setLogo("logo.png"); }); $initBuildFile = $project->getInitBuildFile(); if ($initBuildFile == null) { $console->log("getInitBuildFile null"); } else { $console->log("getInitBuildFile", $initBuildFile->getCanonicalPath()); }
_project.getPlugins().apply("python") def configuration(config): config.setEntry("com/example/script/primary.py") config.setPackageName("com.example.script.py") config.setLogo("logo.png") _project.setConfig(configuration) initBuildFile = _project.getInitBuildFile() if initBuildFile != None: _console.log("getInitBuildFile", initBuildFile.getCanonicalPath()) else: _console.log("getInitBuildFile null")
$project.getPlugins().apply("ruby") $project.setConfig { |config| config.setEntry("com/example/script/primary.rb") config.setPackageName("com.example.script.rb") config.setLogo("logo.png") } initBuildFile = $project.getInitBuildFile() if !initBuildFile.nil? $console.log("getInitBuildFile", initBuildFile.getCanonicalPath()) else $console.log("getInitBuildFile nil") end
Last modified: 29 April 2025