janvladimirmostert
07/10/2020, 8:13 PMtask("build").finalizedBy("jsPublicPackageJson")
but it complains Cannot add task 'build' as a task with that name already exists.octylFractal
07/10/2020, 8:13 PMtasks.get("build") or tasks["build"]janvladimirmostert
07/10/2020, 8:14 PMjanvladimirmostert
07/10/2020, 8:17 PMTask with name 'build' not found in root project '....'.
This is for my root build.gradle.kts file, does it not have a build task?
adding it under allprojects { } is giving he same message
gradle.buildFinished works, so it must have a build taskoctylFractal
07/10/2020, 8:17 PMbuild taskjanvladimirmostert
07/10/2020, 8:18 PMgradle build ?octylFractal
07/10/2020, 8:18 PMbuild is just a convenient way to run assemble and then check, it is added by the lifecycle plugin, so if you don't have any plugins applied to the root, it doesn't existoctylFractal
07/10/2020, 8:19 PMgradle build refers to all tasks named build, not a task in the root project named buildoctylFractal
07/10/2020, 8:19 PMgradle :build is specifically the build task in the root projectjanvladimirmostert
07/10/2020, 8:21 PMjanvladimirmostert
07/10/2020, 8:33 PMtasks.get("build").mustRunAfter("jsPublicPackageJson")
thanks for the help, it's much appreciated!octylFractal
07/10/2020, 8:34 PMoctylFractal
07/10/2020, 8:34 PMjsPublicPackageJson dependsOn build for some reason, which should really not be the casejanvladimirmostert
07/10/2020, 8:36 PMaraqnid
07/10/2020, 10:09 PMsubprojects{} in the root instead of allprojects{} if that suits betterjanvladimirmostert
07/10/2020, 10:14 PMgildor
07/11/2020, 5:09 PMtasks.named("build") {
mustRunAfter("jsPublicPackageJson")
}